[PATCH] drm/amdgpu: fw_attestation: fix unused function warning

2020-12-04 Thread Arnd Bergmann
From: Arnd Bergmann Without debugfs, the compiler notices one function that is not used at all: drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused function 'amdgpu_is_fw_attestation_supported' [-Werror,-Wunused-function] In fact the static const

[PATCH 2/2] drm/amd: print error on convert_tiling_flags_to_modifier failure

2020-12-04 Thread Simon Ser
If this function fails, it means the tiling flags didn't make sense. This likely indicates a user-space bug. Log the error alongside with the provided tiling flags to make debugging easier. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas

[PATCH 1/2] drm/amd: use drm_dbg_kms to log addfb2 failures

2020-12-04 Thread Simon Ser
Avoid printing an error with dev_err, because user-space can trigger these at will by issuing an ioctl. Convert a DRM_DEBUG_KMS call to the more modern drm_dbg_kms macro. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Michel Dänzer ---

[PATCH] drm/amdgpu: take runtime pm reference when we attach a buffer

2020-12-04 Thread Alex Deucher
And drop it when we detach. If the shared buffer is in vram, we need to make sure we don't put the device into runtime suspend. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: fix debugfs creation/removal, again

2020-12-04 Thread Alex Deucher
On Fri, Dec 4, 2020 at 1:17 AM Zhou1, Tao wrote: > > [AMD Public Use] > > Reviewed-by: Tao Zhou Applied. Thanks! Alex > > > -Original Message- > > From: Arnd Bergmann > > Sent: Friday, December 4, 2020 7:07 AM > > To: Deucher, Alexander ; Koenig, Christian > > ; David Airlie ;

Re: [PATCH] drm/amdgpu: fw_attestation: fix unused function warning

2020-12-04 Thread Alex Deucher
On Fri, Dec 4, 2020 at 11:51 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Without debugfs, the compiler notices one function that is not used at > all: > > drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused > function 'amdgpu_is_fw_attestation_supported'

[PATCH 17/17] drm/amd/display: 3.2.115

2020-12-04 Thread Eryk Brol
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Eryk Brol --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index

[PATCH 12/17] drm/amd/display: Add wm table for Renoir

2020-12-04 Thread Eryk Brol
From: Sung Lee [Why] Without additional HostVM Latency, Renoir takes 2us longer to exit self-refresh. This causes underflow in certain cases. [How] Add table for Renoir with updated sr exit latencies for WM set A. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Reviewed-by: Roman Li

[PATCH 15/17] drm/amd/display: Revert DCN2.1 dram_clock_change_latency update

2020-12-04 Thread Eryk Brol
From: Michael Strauss [Why] New value breaks VSR on high refresh panels, reverting until a fix is developed Signed-off-by: Michael Strauss Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- 1 file

[PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01

2020-12-04 Thread Eryk Brol
From: Charlene Liu [Why] dcn3_01 supports gpu_vm, but this is not enabled in amdgpu_dm Signed-off-by: Charlene Liu Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 16/17] drm/amd/display: [FW Promotion] Release 0.0.45

2020-12-04 Thread Eryk Brol
From: Anthony Koo - Add define for __forceinline Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Eryk Brol --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

[PATCH 04/17] drm/amd/display: Expose clk_mgr functions for reuse

2020-12-04 Thread Eryk Brol
From: Dmytro Laktyushkin [How & Why] Allow clk_mgr functions to be reused by making then non-static Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Yang Acked-by: Eryk Brol --- .../drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 +-

[PATCH 06/17] drm/amd/display: Set default bits per channel

2020-12-04 Thread Eryk Brol
From: Jing Zhou [Why] Bump into calcReducedBlankingTiming because of mode query failed. In this function, timing.displayColorDepth == DISPLAY_COLOR_DEPTH_UNDEFINED. Then req_bw == 0 because of bits_per_channel == 0. So decide edp link settings, use default RBRx1 for special timing. [How] Set

[PATCH 09/17] drm/amd/display: Use provided offset for DPG generation

2020-12-04 Thread Eryk Brol
From: Wesley Chalmers [Why] Currently, the offset provided to dcn30_set_disp_pattern_generator is not forwarded to OPP for display pattern generation, resulting in misaligned patterns and test failures. [How] Use the provided offset. Signed-off-by: Wesley Chalmers Reviewed-by: Samson Tam

[PATCH 10/17] drm/amd/display: Only one display lights up while using MST hub

2020-12-04 Thread Eryk Brol
From: Qingqing Zhuo [Why] With the addition of dc_lock acquire before dc_link_handle_hpd_rx_irq, there will be a deadlock situation where commit state sends a request for payload allocation on MST and wait for HPD to process DOWN_REP. [How] Move forward the MST message handling in

[PATCH 05/17] drm/amd/display: Add support for runtime feature detection command

2020-12-04 Thread Eryk Brol
From: Wyatt Wood [Why] Add support for new fw command for runtime feature detection. [How] Driver sends command through ring buffer, and fw returns data back through this command. Signed-off-by: Wyatt Wood Reviewed-by: Jun Lei Acked-by: Eryk Brol ---

[PATCH 13/17] drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on

2020-12-04 Thread Eryk Brol
From: Roy Chan [Why] When HDCP is on, some display would introduce audio noise during HDCP handling. [How] Mute before HDCP handling when disabling core link. Unmute after HDCP when enabling core link. Signed-off-by: Roy Chan Reviewed-by: Martin Leung Acked-by: Eryk Brol ---

[PATCH 11/17] drm/amd/display: Prevent bandwidth overflow

2020-12-04 Thread Eryk Brol
From: Chris Park [Why] At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate. [How] Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when

[PATCH 1/3] drm/amdgpu/cik: enable BACO reset on Bonaire

2020-12-04 Thread Alex Deucher
Works now that the BACO sequence is fixed. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index 5442df094102..13737b317f7c 100644 ---

[PATCH 2/3] drm/amdgpu: enable runtime pm using BACO on CI dGPUs

2020-12-04 Thread Alex Deucher
Works using BACO. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 705b65353c75..daa89bfe25ca 100644 ---

[PATCH 3/3] ALSA: hda/hdmi - enable runtime pm for CI AMD display audio

2020-12-04 Thread Alex Deucher
We are able to power down the GPU and audio via the GPU driver so flag these asics as supporting runtime pm. Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/hda_intel.c

Re: [PATCH 2/2] drm/amd: print error on convert_tiling_flags_to_modifier failure

2020-12-04 Thread Alex Deucher
On Fri, Dec 4, 2020 at 11:49 AM Simon Ser wrote: > > If this function fails, it means the tiling flags didn't make sense. > This likely indicates a user-space bug. Log the error alongside with the > provided tiling flags to make debugging easier. > > Signed-off-by: Simon Ser > Cc: Alex Deucher

[PATCH 03/17] drm/amd/display: NULL pointer error during compliance test

2020-12-04 Thread Eryk Brol
From: Qingqing Zhuo [Why] Calls to disable/enable stream should be guarded with dc_lock. [How] Add dc_lock before calling into dc_link_handle_hpd_rx_irq. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH 00/17] DC Patches Dec 7, 2020

2020-12-04 Thread Eryk Brol
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Fixes in MST, Compliance, HDCP, audio; * Enhancements in VSIF; * Improvements in seamless boot, DPG; AMD\ramini (1): drm/amd/display: Set FixRate bit in VSIF V3 Anthony Koo (1):

[PATCH 08/17] drm/amd/display: Change to IMMEDIATE mode from FRAME mode

2020-12-04 Thread Eryk Brol
From: Judy Cai [Why] Change in DCN10 to use IMMEDIATE_UPDATE mode for AFMT is not reflected in DCN30 as it uses VPG. [How] Use IMMEDIATE_UPDATE mode for DCN30 in VPG. Signed-off-by: Judy Cai Reviewed-by: Anthony Koo Acked-by: Eryk Brol --- .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.c | 62

[PATCH 07/17] drm/amd/display: Don't check seamless boot in power down HW by timeout

2020-12-04 Thread Eryk Brol
From: John Wu [Why] power_down_on_boot is designed to power down HW when set mode is not called before timeout. It can happen in headless system or booting with the display is output by non-AMD GPU only. The function will be executed only if it's not seamless boot. So in seamless boot, the HW is

[PATCH 02/17] drm/amd/display: Set FixRate bit in VSIF V3

2020-12-04 Thread Eryk Brol
From: "AMD\\ramini" [Why] Signal FreeSync display that we are in Fixed Rate mode, and expand the FreeSync range to 1024. [How] Set the new bit in SB16:bit0, and augment the min and max refresh rate with 2 extra bits. Signed-off-by: AMD\ramini Reviewed-by: Anthony Koo Acked-by: Eryk Brol ---

[PATCH 01/17] drm/amd/display: Implement VSIF V3 extended refresh rate feature

2020-12-04 Thread Eryk Brol
From: Reza Amini [Why] Implement feature of VSIF V3 [How] Set refresh rate MSB for extended range Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Eryk Brol --- .../amd/display/modules/freesync/freesync.c | 100 ++ 1 file changed, 82 insertions(+), 18

Re: [PATCH 5/5] drm/sched: Make use of a "done" list (v2)

2020-12-04 Thread Christian König
Am 04.12.20 um 04:17 schrieb Luben Tuikov: The drm_sched_job_done() callback now moves done jobs from the pending list to a "done" list. In drm_sched_job_timeout, make use of the status returned by a GPU driver job timeout handler to decide whether to leave the oldest job in the pending list,

Re: [PATCH 4/5] drm/scheduler: Job timeout handler returns status (v2)

2020-12-04 Thread Christian König
Thinking more about that I came to the conclusion that the whole approach here isn't correct. See even when the job has been completed or canceled we still want to restart the timer. The reason for this is that the timer is then not restarted for the current job, but for the next job in the

[PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-04 Thread Arnd Bergmann
From: Arnd Bergmann As the DRM_AMD_DC_DCN3_0 code was x86-only and fails to build on arm64, merging it into DRM_AMD_DC means that the top-level symbol is now x86-only as well. Compilation fails on arm64 with clang-12 with

Re: [PATCH] drm/amd: print error on convert_tiling_flags_to_modifier failure

2020-12-04 Thread Michel Dänzer
On 2020-12-03 9:15 p.m., Simon Ser wrote: If this function fails, it means the tiling flags didn't make sense. This likely indicates a user-space bug. Log the error alongside with the provided tiling flags to make debugging easier. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland

Re: [PATCH] drm/amd: print error on convert_tiling_flags_to_modifier failure

2020-12-04 Thread Simon Ser
On Friday, December 4, 2020 12:52 PM, Michel Dänzer wrote: > This should be either a debugging message disabled by default, or > rate-limited somehow, or user-space can spam dmesg. Hm. I just mimicked what amdgpu_display_user_framebuffer_create is doing here: dev_err(>pdev->dev, "No GEM

Re: [PATCH 2/2] drm/amd/display: check cursor FB is linear

2020-12-04 Thread Kazlauskas, Nicholas
On 2020-12-03 3:19 p.m., Simon Ser wrote: Previously we accepted non-linear buffers for the cursor plane. This results in bad output, DC validation failures and oops. Make sure the FB uses a linear layout in the atomic check function. The GFX8- check is inspired from ac_surface_set_bo_metadata

Re: [PATCH] drm/amdgpu/disply: set num_crtc earlier

2020-12-04 Thread Kazlauskas, Nicholas
On 2020-12-04 9:30 a.m., Alex Deucher wrote: To avoid a recently added warning: Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7) WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm] In this case the

Re: [PATCH 4/5] drm/scheduler: Job timeout handler returns status (v2)

2020-12-04 Thread Andrey Grodzovsky
On 12/4/20 3:13 AM, Christian König wrote: Thinking more about that I came to the conclusion that the whole approach here isn't correct. See even when the job has been completed or canceled we still want to restart the timer. The reason for this is that the timer is then not restarted for

[PATCH] drm/amdgpu/disply: set num_crtc earlier

2020-12-04 Thread Alex Deucher
To avoid a recently added warning: Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7) WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm] In this case the warning is harmless, but confusing to users. Bug:

Re: [PATCH] drm/amd: print error on convert_tiling_flags_to_modifier failure

2020-12-04 Thread Michel Dänzer
On 2020-12-04 1:01 p.m., Simon Ser wrote: On Friday, December 4, 2020 12:52 PM, Michel Dänzer wrote: This should be either a debugging message disabled by default, or rate-limited somehow, or user-space can spam dmesg. Hm. I just mimicked what amdgpu_display_user_framebuffer_create is doing

[bug report] drm/amd/display: Do full modeset when DSC debugfs is changed

2020-12-04 Thread Dan Carpenter
Hello Eryk Brol, This is a semi-automatic email about new static checker warnings. The patch 115a385c08d8: "drm/amd/display: Do full modeset when DSC debugfs is changed" from Nov 19, 2020, leads to the following Smatch complaint: