[PATCH 3/3] amdgpu/pm: set pp_dpm_dcefclk to readonly on smu_v11 gpus

2021-04-16 Thread Darren Powell
Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch prevents user from successfully writing to file pp_dpm_dcefclk on smu_vv11 parts and gives better user feedback that this operation is not allowed. Signed-off-by: Darren Powell ---

[PATCH 2/3] amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID

2021-04-16 Thread Darren Powell
Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch ignores a .force_clk_levels(SMU_DCEFCLK) call and issues an info message. Signed-off-by: Darren Powell --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 5 -

[PATCH 1/3] amdgpu/pm: add extra info to SMU msg pre-check failed message

2021-04-16 Thread Darren Powell
Insert the value of the response to error message emitted when the SMU msg pre-check failes Signed-off-by: Darren Powell --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

[PATCH 0/3] Prevent set of DCEFCLK on smu_v11 gpus

2021-04-16 Thread Darren Powell
=== Description === Set of simple patches to prevent attempts to set dcefclk on NAVI10 === Test System === * DESKTOP(AMD FX-8350 + NAVI10(731F/ca), BIOS: F2) + ISO(Ubuntu 20.04.1 LTS) + Kernel(5.11.0-custom-amdinternal-dirty) === Patch Summary === linux: (g...@gitlab.freedesktop.org:agd5f)

[PATCH] drm/amdgpu/gmc9: remove dummy read workaround for newer chips

2021-04-16 Thread Alex Deucher
Aldebaran has a hw fix so no longer requires the workaround. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index

Re: 16 bpc fixed point (RGBA16) framebuffer support for core and AMD.

2021-04-16 Thread Ville Syrjälä
On Fri, Apr 16, 2021 at 06:27:23PM +0200, Mario Kleiner wrote: > On Mon, Mar 22, 2021 at 4:52 PM Ville Syrjälä > wrote: > > > > On Fri, Mar 19, 2021 at 10:03:12PM +0100, Mario Kleiner wrote: > > > Hi, > > > > > > this patch series adds the fourcc's for 16 bit fixed point unorm > > > framebuffers

[PATCH 00/40] [Set 16] Rid W=1 warnings from GPU!

2021-04-16 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. Lee Jones (40): drm/nouveau/nvkm/subdev/bios/init: Demote obvious abuse of kernel-doc drm/nouveau/dispnv50/disp: Remove unused variable 'ret'

[PATCH 31/40] drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the docs

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:73: warning: expecting prototype for amdgpu_dummy_page_init(). Prototype was for amdgpu_gart_dummy_page_init() instead drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:96: warning: expecting prototype for

[PATCH 25/40] drm/radeon/radeon_device: Provide function name in kernel-doc header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:1101: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc:

[PATCH 26/40] drm/amd/amdgpu/amdgpu_device: Remove unused variable 'r'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function ‘amdgpu_device_suspend’: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3733:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc:

[PATCH 32/40] drm/amd/amdgpu/amdgpu_ttm: Fix incorrectly documented function 'amdgpu_ttm_copy_mem_to_mem()'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:311: warning: expecting prototype for amdgpu_copy_ttm_mem_to_mem(). Prototype was for amdgpu_ttm_copy_mem_to_mem() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc:

[PATCH 29/40] drm/amd/amdgpu/amdgpu_fence: Provide description for 'sched_score'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:444: warning: Function parameter or member 'sched_score' not described in 'amdgpu_fence_driver_init_ring' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal

[PATCH 33/40] drm/amd/amdgpu/amdgpu_ring: Provide description for 'sched_score'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:169: warning: Function parameter or member 'sched_score' not described in 'amdgpu_ring_init' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc:

[PATCH 35/40] drm/amd/amdgpu/amdgpu_cs: Repair some function naming disparity

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:685: warning: expecting prototype for cs_parser_fini(). Prototype was for amdgpu_cs_parser_fini() instead drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1502: warning: expecting prototype for

[PATCH] drm/amdgpu/pm: use linux/processor.h instead of asm/processor.h

2021-04-16 Thread Colin King
From: Colin Ian King Checkpatch reported that linux/processor.h should be included instead of the asm variant. Fix this to clean up the warning. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: 16 bpc fixed point (RGBA16) framebuffer support for core and AMD.

2021-04-16 Thread Mario Kleiner
Friendly ping to the AMD people. Nicholas, Harry, Alex, any feedback? Would be great to get this in sooner than later. Thanks and have a nice weekend, -mario On Fri, Mar 19, 2021 at 10:03 PM Mario Kleiner wrote: > > Hi, > > this patch series adds the fourcc's for 16 bit fixed point unorm >

Re: 16 bpc fixed point (RGBA16) framebuffer support for core and AMD.

2021-04-16 Thread Mario Kleiner
On Mon, Mar 22, 2021 at 4:52 PM Ville Syrjälä wrote: > > On Fri, Mar 19, 2021 at 10:03:12PM +0100, Mario Kleiner wrote: > > Hi, > > > > this patch series adds the fourcc's for 16 bit fixed point unorm > > framebuffers to the core, and then an implementation for AMD gpu's > > with DisplayCore. > >

Re: [PATCH 35/40] drm/amd/amdgpu/amdgpu_cs: Repair some function naming disparity

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:685: warning: expecting prototype for cs_parser_fini(). Prototype was for amdgpu_cs_parser_fini() instead drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1502: warning:

Re: [PATCH 33/40] drm/amd/amdgpu/amdgpu_ring: Provide description for 'sched_score'

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:169: warning: Function parameter or member 'sched_score' not described in 'amdgpu_ring_init' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc:

Re: [PATCH 32/40] drm/amd/amdgpu/amdgpu_ttm: Fix incorrectly documented function 'amdgpu_ttm_copy_mem_to_mem()'

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:311: warning: expecting prototype for amdgpu_copy_ttm_mem_to_mem(). Prototype was for amdgpu_ttm_copy_mem_to_mem() instead Cc: Alex Deucher Cc: "Christian

Re: [PATCH 31/40] drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the docs

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:73: warning: expecting prototype for amdgpu_dummy_page_init(). Prototype was for amdgpu_gart_dummy_page_init() instead

Re: [PATCH 29/40] drm/amd/amdgpu/amdgpu_fence: Provide description for 'sched_score'

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:444: warning: Function parameter or member 'sched_score' not described in 'amdgpu_fence_driver_init_ring' Cc: Alex Deucher Cc: "Christian König" Cc: David

Re: [PATCH 25/40] drm/radeon/radeon_device: Provide function name in kernel-doc header

2021-04-16 Thread Christian König
Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:1101: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Alex Deucher Cc: "Christian

Re: [PATCH 31/40] drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the docs

2021-04-16 Thread Nirmoy
Reviewed-by: Nirmoy Das On 4/16/21 4:37 PM, Lee Jones wrote: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:73: warning: expecting prototype for amdgpu_dummy_page_init(). Prototype was for amdgpu_gart_dummy_page_init() instead

RE: [PATCH] drm/amdgpu: fix a error injection failed issue

2021-04-16 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Dennis Li Sent: Friday, April 16, 2021 22:49 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Kuehling, Felix ; Zhang, Hawking ; Koenig, Christian Cc: Li, Dennis Subject: [PATCH]

[PATCH] drm/amdgpu: fix a error injection failed issue

2021-04-16 Thread Dennis Li
because "sscanf(str, "retire_page")" always return 0, if application use the raw data for error injection, it always wrongly falls into "op == 3". Change to use strstr instead. Signed-off-by: Dennis Li diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Re: [PATCH 1/3] drm/amdgpu: make sure we unpin the UVD BO

2021-04-16 Thread Leo Liu
Acked-by: Leo Liu On 2021-04-16 8:54 a.m., Christian König wrote: Ping? Am 15.04.21 um 10:47 schrieb Christian König: Releasing pinned BOs is illegal now. Signed-off-by: Christian König ---   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 +   1 file changed, 1 insertion(+) diff --git

[PATCH 19/19] drm/amd/display: 3.2.132

2021-04-16 Thread Aurabindo Pillai
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai --- 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 16/19] drm/amd/display: Report Proper Quantization Range in AVI Infoframe

2021-04-16 Thread Aurabindo Pillai
From: Dillon Varone [Why?] When a monitor does not set both QS and QY bits, DC does not set Q0, Q1, QY0 and QY1 bits in AVI infoframe. Setting RGB bits should be separate from setting YCC bits. [How?] Separate logic for setting RGB and YCC quantization range bits in the AVI infoframe.

[PATCH 18/19] drm/amd/display: [FW Promotion] Release 0.0.62

2021-04-16 Thread Aurabindo Pillai
From: Anthony Koo Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

[PATCH 15/19] drm/amd/display: Fix call to pass bpp in 16ths of a bit

2021-04-16 Thread Aurabindo Pillai
From: Dillon Varone [Why & How?] Call to dc_dsc_compute_bandwidth_range should have min and max bpp in 16ths of a bit. Multiply min and max bpp from policy. Signed-off-by: Dillon Varone Reviewed-by: Eryk Brol Acked-by: Aurabindo Pillai ---

[PATCH 17/19] drm/amd/display: add helper for enabling mst stream features

2021-04-16 Thread Aurabindo Pillai
From: Bing Guo [Why] Some MST devices uses different method to enable mst specific stream features. [How] Add dm_helpers_mst_enable_stream features. This can be modified later when we are ready to implement those features. Signed-off-by: Bing Guo Reviewed-by: Anthony Koo Acked-by: Aurabindo

[PATCH 14/19] drm/amd/display: fix HDCP drm prop update for MST

2021-04-16 Thread Aurabindo Pillai
From: "Dingchen (David) Zhang" [why] For MST topology with 1 physical link and multiple connectors (>=2), e.g. daisy cahined MST + SST, or 1-to-multi MST hub, if userspace set to enable the HDCP simultaneously on all connected outputs, the commit tail iteratively call the hdcp_update_display()

[PATCH 13/19] drm/amd/display: force CP to DESIRED when removing display.

2021-04-16 Thread Aurabindo Pillai
From: "Dingchen (David) Zhang" [why] It is possible that the commit from userspace to cause link stream disable and hdcp auth reset when the HDCP has been enabled at the moment. We'd expect the CP prop back to DESIRED from ENABLED. [how] In the helper of hdcp display removal, we check and

[PATCH 03/19] drm/amd/display: update hdcp display using correct CP type.

2021-04-16 Thread Aurabindo Pillai
From: "Dingchen (David) Zhang" [why] currently we enforce to update hdcp display using TYPE0, but there is case that connector CP type prop be TYPE1 instead of type0. [how] using the drm prop of CP type of the connector as input argument. Signed-off-by: Dingchen (David) Zhang Reviewed-by:

[PATCH 01/19] drm/amd/display: fixed divide by zero kernel crash during dsc enablement

2021-04-16 Thread Aurabindo Pillai
From: Robin Singh [why] During dsc enable, a divide by zero condition triggered the kernel crash. [how] An IGT test, which enable the DSC, was crashing at the time of restore the default dsc status, becaue of h_totals value becoming 0. So add a check before divide condition. If h_total is zero,

[PATCH 06/19] drm/amd/display: removed unused function dc_link_reallocate_mst_payload.

2021-04-16 Thread Aurabindo Pillai
From: Robin Singh [Why] Found that dc_link_reallocate_mst_payload is not used anymore in any of the use case scenario. [How] removed dc_link_reallocate_mst_payload function definition and declaration. Signed-off-by: Robin Singh Reviewed-by: Harry Wentland Acked-by: Aurabindo Pillai ---

[PATCH 04/19] drm/amd/display: add handling for hdcp2 rx id list validation

2021-04-16 Thread Aurabindo Pillai
From: "Dingchen (David) Zhang" [why] the current implementation of hdcp2 rx id list validation does not have handler/checker for invalid message status, e.g. HMAC, the V parameter calculated from PSP not matching the V prime from Rx. [how] return a generic FAILURE for any message status not

[PATCH 11/19] drm/amd/display: Always poll for rxstatus in authenticate

2021-04-16 Thread Aurabindo Pillai
From: Nicholas Kazlauskas [Why] Requirement from the spec - we shouldn't be potentially exiting out early based on encryption status. [How] Drop the calls from HDCP1 and HDCP2 execution that exit out early based on link encryption status. Signed-off-by: Nicholas Kazlauskas Reviewed-by:

[PATCH 12/19] drm/amd/display: Fixed typo in function name.

2021-04-16 Thread Aurabindo Pillai
From: David Galiffi [How & Why] Changed "prsent" to "present". Signed-off-by: David Galiffi Reviewed-by: Chris Park Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 02/19] drm/amd/display: Add DSC check to seamless boot validation

2021-04-16 Thread Aurabindo Pillai
From: Anthony Wang [Why & How] We want to immediately fail seamless boot validation if DSC is active, as VBIOS currently does not support DSC timings. Add a check for the relevant flag in dc_validate_seamless_boot_timing. Signed-off-by: Anthony Wang Reviewed-by: Martin Leung Acked-by:

[PATCH 10/19] drm/amd/display: Add link rate optimization logs for ILR

2021-04-16 Thread Aurabindo Pillai
From: Michael Strauss [Why] Add logs to verify ILR optimization behaviour on boot Signed-off-by: Michael Strauss Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

[PATCH 08/19] drm/amd/display: Fix FreeSync when RGB MPO in use

2021-04-16 Thread Aurabindo Pillai
From: Aric Cyr [WHY] We should skip programming manual trigger on non-primary planes when MPO is enabled. [HOW] Implement an explicit mechanism for skipping manual trigger programming for planes that shouldn't cause the frame to end. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by:

[PATCH 09/19] drm/amd/display: Unconditionally clear training pattern set after lt

2021-04-16 Thread Aurabindo Pillai
From: Wesley Chalmers [WHY] While Link Training is being performed, and the LTTPRs are in Non-LTTPR or LTTPR Transparent mode, any DPCD registers besides those used for Link Training are not to be accessed. The spec defines the link training registers as DP_TRAINING_PATTERN_SET (102h) to

[PATCH 07/19] drm/amd/display: treat memory as a single-channel for asymmetric memory v2

2021-04-16 Thread Aurabindo Pillai
From: Hugo Hu Previous change had been reverted since it caused hang. Remake change to avoid defect. [Why] 1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as

[PATCH 05/19] drm/amd/display: disable seamless boot for external DP

2021-04-16 Thread Aurabindo Pillai
From: Anthony Wang [Why] Primary feature use case is with eDP panels. [How] Fail seamless boot validation if display is not an eDP panel. Signed-off-by: Anthony Wang Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ 1 file

[PATCH 00/19] DC Patches for 2021 April 19

2021-04-16 Thread Aurabindo Pillai
This DC patchset brings improvements in multiple areas. In summary, we highlight: * DC v3.2.132 * Fw v0.0.62 * Bug fixes across HDCP, DSC, FreeSync, etc -- Anthony Koo (1): drm/amd/display: [FW Promotion] Release 0.0.62 Anthony Wang (2): drm/amd/display: Add DSC check to seamless boot

Re: [PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-16 Thread Thomas Zimmermann
Hi Am 16.04.21 um 15:46 schrieb Christian König: Am 16.04.21 um 15:31 schrieb Thomas Zimmermann: The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err()

Re: [PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-16 Thread Christian König
Am 16.04.21 um 15:46 schrieb Christian König: Am 16.04.21 um 15:31 schrieb Thomas Zimmermann: The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err() with

Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

2021-04-16 Thread Nirmoy
On 4/16/21 1:26 PM, Christian König wrote: Am 16.04.21 um 07:04 schrieb Roy Sun: Update the timestamp of scheduled fence on HW completion of the previous fences This allow more accurate tracking of the fence execution in HW Signed-off-by: David M Nieto Signed-off-by: Roy Sun Reviewed-by:

Re: [PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-16 Thread Christian König
Am 16.04.21 um 15:31 schrieb Thomas Zimmermann: The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err() with drm_err() (Zack) Signed-off-by: Thomas

Re: [PATCH v3 0/7] drm: Clean up mmap for TTM-based GEM drivers

2021-04-16 Thread Christian König
Patches #1-#4 are Reviewed-by: Christian König One more comment on the vmw patches. Regards, Christian. Am 16.04.21 um 15:31 schrieb Thomas Zimmermann: Implement mmap via struct drm_gem_object_functions.mmap in amdgpu, radeon and nouveau. This allows for using common DRM helpers for the

[PATCH v3 3/7] drm/radeon: Implement mmap as GEM object function

2021-04-16 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change also allows to support prime-based mmap via DRM's helper drm_gem_prime_mmap(). Permission checks are implemented by drm_gem_mmap(), with an additional check for

[PATCH v3 7/7] drm/ttm: Remove ttm_bo_mmap() and friends

2021-04-16 Thread Thomas Zimmermann
The function ttm_bo_mmap is unused. Remove it and it's helpers; including the verify_access callback in struct ttm_device_funcs. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 53 -

[PATCH v3 6/7] drm/vmwgfx: Inline vmw_verify_access()

2021-04-16 Thread Thomas Zimmermann
Vmwgfx is the only user of the TTM's verify_access callback. Inline the call and avoid the indirection through the function pointer. Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 9 - drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c

[PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-16 Thread Thomas Zimmermann
The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err() with drm_err() (Zack) Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin ---

[PATCH v3 4/7] drm/nouveau: Implement mmap as GEM object function

2021-04-16 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The GEM object function is provided by GEM TTM helpers. Nouveau's implementation of verify_access is unused and has been removed. Access permissions are validated by the DRM

[PATCH v3 0/7] drm: Clean up mmap for TTM-based GEM drivers

2021-04-16 Thread Thomas Zimmermann
Implement mmap via struct drm_gem_object_functions.mmap in amdgpu, radeon and nouveau. This allows for using common DRM helpers for the mmap-related callbacks in struct file_operations and struct drm_driver. The drivers have their own vm_ops, which are now set automatically by the DRM core

[PATCH v3 1/7] drm/ttm: Don't override vm_ops callbacks, if set

2021-04-16 Thread Thomas Zimmermann
Drivers may want to set their own callbacks for a VM area. Only set TTM's callbacks if the vm_ops field is clear. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c

[PATCH v3 2/7] drm/amdgpu: Implement mmap as GEM object function

2021-04-16 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves several inconsistencies between regular mmap and prime-based mmap. The vm_ops field in vma is now set for all mmap'ed areas. Previously it way only set for

Re: [PATCH 1/3] drm/amdgpu: make sure we unpin the UVD BO

2021-04-16 Thread Christian König
Ping? Am 15.04.21 um 10:47 schrieb Christian König: Releasing pinned BOs is illegal now. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c

Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

2021-04-16 Thread Christian König
Am 16.04.21 um 07:04 schrieb Roy Sun: Update the timestamp of scheduled fence on HW completion of the previous fences This allow more accurate tracking of the fence execution in HW Signed-off-by: David M Nieto Signed-off-by: Roy Sun Reviewed-by: Christian König for the series. Nirmoy if

RE: [PATCH 2/2] drm/amdgpu: only harvest gcea/mmea error status in aldebaran

2021-04-16 Thread Yang, Stanley
[AMD Official Use Only - Internal Distribution Only] Seriers is Reviewed-by: Stanley.Yang Regards, Stanley > -Original Message- > From: Zhang, Hawking > Sent: Friday, April 16, 2021 5:44 PM > To: amd-gfx@lists.freedesktop.org; Yang, Stanley ; > John Clements ; Li, Dennis > > Cc:

[PATCH 2/2] drm/amdgpu: only harvest gcea/mmea error status in aldebaran

2021-04-16 Thread Hawking Zhang
In aldebaran, driver only needs to harvest SDP RdRspStatus, WrRspStatus and first parity error on RdRsp data. Check error type before harvest error information. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 21 -

[PATCH 1/2] drm/amdgpu: only harvest gcea/mmea error status in arcturus

2021-04-16 Thread Hawking Zhang
SDP RdRspStatus/WrRspStatus or first parity error on RdRsp data can cause system fatal error in arcturus. GPU will be freezed in such case. Driver needs to harvest these error information before reset the GPU. Check error type to avoid harvest normal gcea/mmea information. Signed-off-by: Hawking

RE: [PATCH] drm/amdkfd: add edc error interrupt handle for poison propogate mode

2021-04-16 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Dennis Li Sent: Friday, April 16, 2021 11:18 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Kuehling, Felix ; Zhang, Hawking ; Koenig, Christian Cc: Li, Dennis Subject: [PATCH]

RE: [PATCH] drm/amdgpu: use ratelimited print in sdma4 interrupt

2021-04-16 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Feifei Xu Sent: Thursday, April 15, 2021 14:11 To: amd-gfx@lists.freedesktop.org Cc: Xu, Feifei Subject: [PATCH] drm/amdgpu: use ratelimited print in sdma4 interrupt

RE: [PATCH] drm/amdgpu: correct default gfx wdt timeout setting

2021-04-16 Thread Li, Dennis
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Dennis Li -Original Message- From: Zhang, Hawking Sent: Friday, April 16, 2021 2:46 PM To: amd-gfx@lists.freedesktop.org; Li, Dennis Cc: Zhang, Hawking Subject: [PATCH] drm/amdgpu: correct default gfx wdt timeout

[PATCH] drm/amdgpu: correct default gfx wdt timeout setting

2021-04-16 Thread Hawking Zhang
When gfx wdt was configured to fatal_disable, the timeout period should be configured to 0x0 (timeout disabled) Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git