[PATCH v2 09/11] drm/amd/display: Add formats for DCC with 2/3 planes.

2020-09-04 Thread Bas Nieuwenhuizen
For DCC we will use 2/3 planes to avoid X rendering to the frontbuffer with DCC compressed images. To make this work with the core KMS validation we need to add extra formats with the extra planes. However, due to flexibility we set bpp = 0 for the extra planes and do the validation ourselves.

[PATCH v2 08/11] drm/amd/display: Set DC options from modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
This sets the DC tiling options from the modifier, if modifiers are used for the FB. This patch by itself does not expose the support yet though. There is not much validation yet to limit the scope of this patch, but the current validation is at the same level as the BO metadata path. v2: Add

[PATCH v2 05/11] drm/amd/display: Store tiling_flags in the framebuffer.

2020-09-04 Thread Bas Nieuwenhuizen
This moves the tiling_flags to the framebuffer creation. This way the time of the "tiling" decision is the same as it would be with modifiers. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 48 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 3

[PATCH v2 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
This adds modifiers for GFX9+ AMD GPUs. As the modifiers need a lot of parameters I split things out in getters and setters. - Advantage: simplifies the code a lot - Disadvantage: Makes it harder to check that you're setting all the required fields. The tiling modes seem to

[PATCH v2 07/11] drm/amd/display: Refactor surface tiling setup.

2020-09-04 Thread Bas Nieuwenhuizen
Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 211 ++ 1 file changed, 116 insertions(+), 95

[PATCH v2 03/11] drm/amd/display: Honor the offset for plane 0.

2020-09-04 Thread Bas Nieuwenhuizen
With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH v2 01/11] drm/amd/display: Do not silently accept DCC for multiplane formats.

2020-09-04 Thread Bas Nieuwenhuizen
Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH v2 06/11] drm/amd/display: Convert tiling_flags to modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
This way the modifier path gets exercised all the time, improving testing. Furthermore, for modifiers this is required as getfb2 will always return the modifier if the driver sets allow_fb_modifiers. This only triggers once allow_fb_modifiers is set. Signed-off-by: Bas Nieuwenhuizen ---

[PATCH v2 11/11] drm/amd/display: Clean up GFX9 tiling_flags path.

2020-09-04 Thread Bas Nieuwenhuizen
We're unconditionally using modifiers internally for GFX9+ now. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH v2 10/11] drm/amd/display: Expose modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
This expose modifier support on GFX9+. Only modifiers that can be rendered on the current GPU are added. This is to reduce the number of modifiers exposed. The HW could expose more, but the best mechanism to decide what to expose without an explosion in modifiers is still to be decided, and in

[PATCH v2 02/11] drm/amd: Init modifier field of helper fb.

2020-09-04 Thread Bas Nieuwenhuizen
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 00/11] amd/display: Add GFX9+ modifier support.

2020-09-04 Thread Bas Nieuwenhuizen
This adds modifier support to radeonsi. It has been tested on - VEGA10, RAVEN, NAVI14 - weston, sway, X with xf86-video-amdgpu (i.e. legacy path still works) and includes some basic testing of the layout code. The main goal is to keep it somewhat simple and regression free, so on the display

RE: [PATCH 5/6] drm/amdgpu: add user friendly xgmi events

2020-09-04 Thread Kim, Jonathan
[AMD Official Use Only - Internal Distribution Only] Please ignore patches 5 & 6. We'll run into EEXIST if future non xgmi counters are added to amdgpu_x this way. > -Original Message- > From: Kim, Jonathan > Sent: Thursday, September 3, 2020 12:22 PM > To:

[PATCH v2] drm/amdgpu/dc: Require primary plane to be enabled whenever the CRTC is

2020-09-04 Thread Michel Dänzer
From: Michel Dänzer Don't check drm_crtc_state::active for this either, per its documentation in include/drm/drm_crtc.h: * Hence drivers must not consult @active in their various * _mode_config_funcs.atomic_check callback to reject an atomic * commit. atomic_remove_fb disables the CRTC as

[PATCH 2/3] drm/amd/pm: apply no power source workaround if dc reported by gpio

2020-09-04 Thread Evan Quan
If dc reported by gpio is supported, the power source switching will be performed by pmfw automatically. Thus the power source setting workaround for Navi1x will be not needed. Change-Id: Idd6231ce1e33a4e292e7eff3b0f8b779911944f1 Signed-off-by: Evan Quan ---

[PATCH 3/3] drm/amd/pm: move NAVI1X power mode switching workaround to post_init

2020-09-04 Thread Evan Quan
Since that should be the correct place to put ASIC specific workarounds. Change-Id: Ia7cf4bfabf85a4409e57542926238c7e196af719 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 14 - .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 20 ++- 2

[PATCH 1/3] drm/amd/pm: process pending AC/DC switch interrupt

2020-09-04 Thread Evan Quan
Process any pending interrupt that occured before driver register for interrupt from GPIO/SMU. Change-Id: Ie846304408df27c7a7f2b29cec8f7dcb9d08905e Signed-off-by: Evan Quan --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 40 ++- 1 file changed, 30 insertions(+), 10

[PATCH 2/2] drm/amd/pm: correct Renoir UMD Stable Pstate settings

2020-09-04 Thread Evan Quan
Update the UMD stable Pstate settings with correct clocks. Change-Id: Ia14eb8e23c513cad0bd633fbeb99ed694c7e3f7e Signed-off-by: Evan Quan --- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 52 ++- .../gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.h | 1 + 2 files changed, 52

[PATCH 1/2] drm/amd/pm: lower Raven UMD Stable Pstate VCN values

2020-09-04 Thread Evan Quan
SMU FCLK,SOCCLK have dependency on VCN CLKs. Lower VCN values so that FCLK, SOCCLK reflect values set by UMD Stable Pstate. Change-Id: Iddf2757be18aacc0bb66122dd2b690e58503223b Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 4 ++--

Re: [PATCH] drm/amdgpu: Fix L1 policy violations (PSP) on Navi21 SRIOV

2020-09-04 Thread Nirmoy
On 9/3/20 11:11 PM, Rohit Khaire wrote: Please add commit message here. Signed-off-by: Rohit Khaire --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 49 -- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 64 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 42