[PATCH] drm/amdgpu: Drop unused function 'static void amdgpu_choose_low_power_state()' in amdgpu/amdgpu.h

2024-02-12 Thread Srinivasan Shanmugam
'static void amdgpu_choose_low_power_state() { }' is nowhere used, thus drop it. Fixing the below: In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:1559:13: error: ‘amdgpu_choose_low_power_state’ defined but not used [-Werror=unused-function] 1559 | static void

Re: [PATCH v2] drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'

2024-02-12 Thread SRINIVASAN SHANMUGAM
On 2/13/2024 12:07 AM, Kees Cook wrote: On Thu, Feb 01, 2024 at 03:28:45PM +0530, Srinivasan Shanmugam wrote: In "u32 otg_inst = pipe_ctx->stream_res.tg->inst;" pipe_ctx->stream_res.tg could be NULL, it is relying on the caller to ensure the tg is not NULL. Fixes: 474ac4a875ca

[PATCH AUTOSEL 5.15 21/22] drm/amdgpu: reset gpu for s3 suspend abort case

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 6ef82ac664bb9568ca3956e0d9c9c478e25077ff ] In the s3 suspend abort case some type of gfx9 power rail not turn off from FCH side and this will put the GPU in an unknown power status, so let's reset the gpu to a known good power state before reinitialize gpu

[PATCH AUTOSEL 5.15 20/22] drm/amdgpu: skip to program GFXDEC registers for suspend abort

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 93bafa32a6918154aa0caf9f66679a32c2431357 ] In the suspend abort cases, the gfx power rail doesn't turn off so some GFXDEC registers/CSB can't reset to default value and at this moment reinitialize GFXDEC/CSB will result in an unexpected error. So let skip

[PATCH AUTOSEL 6.1 25/28] drm/amdgpu: reset gpu for s3 suspend abort case

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 6ef82ac664bb9568ca3956e0d9c9c478e25077ff ] In the s3 suspend abort case some type of gfx9 power rail not turn off from FCH side and this will put the GPU in an unknown power status, so let's reset the gpu to a known good power state before reinitialize gpu

[PATCH AUTOSEL 6.1 24/28] drm/amdgpu: skip to program GFXDEC registers for suspend abort

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 93bafa32a6918154aa0caf9f66679a32c2431357 ] In the suspend abort cases, the gfx power rail doesn't turn off so some GFXDEC registers/CSB can't reset to default value and at this moment reinitialize GFXDEC/CSB will result in an unexpected error. So let skip

[PATCH AUTOSEL 6.6 46/51] drm/amdgpu: Fix HDP flush for VFs on nbio v7.9

2024-02-12 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit 534c8a5b9d5d41d30cdcac93cfa1bca5e17be009 ] HDP flush remapping is not done for VFs. Keep the original offsets in VF environment. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.6 45/51] drm/amdgpu: Fix shared buff copy to user

2024-02-12 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 2dcf82a8e8dc930655787797ef8a3692b527c7a9 ] ta if invoke node buffer | ta type --| | ta id --| | cmd id --| |-- shared buf len -| |-- shared buffer --| ta if invoke node buffer is as above,

[PATCH AUTOSEL 6.6 44/51] drm/amdgpu: reset gpu for s3 suspend abort case

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 6ef82ac664bb9568ca3956e0d9c9c478e25077ff ] In the s3 suspend abort case some type of gfx9 power rail not turn off from FCH side and this will put the GPU in an unknown power status, so let's reset the gpu to a known good power state before reinitialize gpu

[PATCH AUTOSEL 6.6 43/51] drm/amdgpu: skip to program GFXDEC registers for suspend abort

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 93bafa32a6918154aa0caf9f66679a32c2431357 ] In the suspend abort cases, the gfx power rail doesn't turn off so some GFXDEC registers/CSB can't reset to default value and at this moment reinitialize GFXDEC/CSB will result in an unexpected error. So let skip

[PATCH AUTOSEL 6.7 53/58] drm/amdgpu: Fix HDP flush for VFs on nbio v7.9

2024-02-12 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit 534c8a5b9d5d41d30cdcac93cfa1bca5e17be009 ] HDP flush remapping is not done for VFs. Keep the original offsets in VF environment. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.7 52/58] drm/amdgpu: Fix shared buff copy to user

2024-02-12 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 2dcf82a8e8dc930655787797ef8a3692b527c7a9 ] ta if invoke node buffer | ta type --| | ta id --| | cmd id --| |-- shared buf len -| |-- shared buffer --| ta if invoke node buffer is as above,

[PATCH AUTOSEL 6.7 51/58] drm/amdgpu: reset gpu for s3 suspend abort case

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 6ef82ac664bb9568ca3956e0d9c9c478e25077ff ] In the s3 suspend abort case some type of gfx9 power rail not turn off from FCH side and this will put the GPU in an unknown power status, so let's reset the gpu to a known good power state before reinitialize gpu

[PATCH AUTOSEL 6.7 50/58] drm/amdgpu: skip to program GFXDEC registers for suspend abort

2024-02-12 Thread Sasha Levin
From: Prike Liang [ Upstream commit 93bafa32a6918154aa0caf9f66679a32c2431357 ] In the suspend abort cases, the gfx power rail doesn't turn off so some GFXDEC registers/CSB can't reset to default value and at this moment reinitialize GFXDEC/CSB will result in an unexpected error. So let skip

Re: Blank screen after enabling amdgpu.seamless on a Barcelo APU

2024-02-12 Thread Alex Deucher
On Mon, Feb 12, 2024 at 5:11 AM Luya Tshimbalanga wrote: > > Hello team, > > Testing "amdgpu.seamless=1" on Ryzen 7 5825u using kernel 6.7.4 led to a > blank screen after the initial boot screen as tested on Dell Inc. Inspiron 14 > 7425 2-in-1 with the following message from boot: > > "Feb 11

Re: [PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-12 Thread Mario Limonciello
On 2/12/2024 10:31, Mario Limonciello wrote: On 2/10/2024 23:50, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops.  Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that

[PATCH 4/6] drm/amdgpu: add shared fdinfo stats

2024-02-12 Thread Alex Deucher
Add shared stats. Useful for seeing shared memory. v2: take dma-buf into account as well v3: use the new gem helper Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deuc...@amd.com/ Signed-off-by: Alex Deucher Cc: Rob Clark --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c |

[PATCH 6/6] drm/xe: Update shared stats to use the new gem helper

2024-02-12 Thread Alex Deucher
Switch to using the new gem shared memory stats helper rather than hand rolling it. Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deuc...@amd.com/ Signed-off-by: Alex Deucher --- drivers/gpu/drm/xe/xe_drm_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 5/6] drm/i915: Update shared stats to use the new gem helper

2024-02-12 Thread Alex Deucher
Switch to using the new gem shared memory stats helper rather than hand rolling it. Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deuc...@amd.com/ Reviewed-by: Tvrtko Ursulin Signed-off-by: Alex Deucher --- drivers/gpu/drm/i915/i915_drm_client.c | 2 +- 1 file changed, 1

[PATCH 2/6] drm: add drm_gem_object_is_shared_for_memory_stats() helper

2024-02-12 Thread Alex Deucher
Add a helper so that drm drivers can consistently report shared status via the fdinfo shared memory stats interface. In addition to handle count, show buffers as shared if they are shared via dma-buf as well (e.g., shared with v4l or some other subsystem). v2: switch to inline function Link:

[PATCH 3/6] drm: update drm_show_memory_stats() for dma-bufs

2024-02-12 Thread Alex Deucher
Show buffers as shared if they are shared via dma-buf as well (e.g., shared with v4l or some other subsystem). v2: switch to gem helper Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deuc...@amd.com/ Reviewed-by: Rob Clark (v1) Reviewed-by: Tvrtko Ursulin Signed-off-by:

[PATCH 1/6] Documentation/gpu: Update documentation on drm-shared-*

2024-02-12 Thread Alex Deucher
Clarify the documentation in preparation for updated helpers which check the handle count as well as whether a dma-buf has been attached. Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deuc...@amd.com/ Reviewed-by: Tvrtko Ursulin Signed-off-by: Alex Deucher ---

[PATCH 0/6 V4] fdinfo shared stats

2024-02-12 Thread Alex Deucher
We had a request to add shared buffer stats to fdinfo for amdgpu and while implementing that, Christian mentioned that just looking at the GEM handle count doesn't take into account buffers shared with other subsystems like V4L or RDMA. Those subsystems don't use GEM, so it doesn't really matter

RE: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset

2024-02-12 Thread Deucher, Alexander
[AMD Official Use Only - General] Ping? > -Original Message- > From: Deucher, Alexander > Sent: Monday, January 29, 2024 10:56 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset > > This avoids

Re: [PATCH v4 00/24] Support Host Trap Sampling for gfx941/gfx942

2024-02-12 Thread James Zhu
Ping . Best Regards! James Zhu On 2024-02-06 10:58, James Zhu wrote: PC sampling is a form of software profiling, where the threads of an application are periodically interrupted and the program counter that the threads are currently attempting to execute is saved out for profiling.

[PATCH 8/9] drm/amdgpu: add psp_timeout to limit PSP related operation

2024-02-12 Thread Alex Deucher
From: Likun Gao Add a new parameter psp_timeout to limit psp related operation to unify the timeout limition for psp. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c |

[PATCH 9/9] drm/amdgpu: support psp ip block discovery for psp v14

2024-02-12 Thread Alex Deucher
From: Likun Gao Support PSP ip block discovery for psp v14. Add psp ip block for psp v14_0_2 and v14_0_3. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 7/9] drm/amdgpu/psp: set boot_time_tmr flag

2024-02-12 Thread Alex Deucher
From: Likun Gao Set boot_time_tmr flag for the ASIC which MP0 ip version newer than 14.0.2 For runtime TMR: Init tmr and load tmr should did. For boottime TMR: If do not support autoload, skip init TMR. If support autoload, excute init TMR but skip load tmr. Signed-off-by: Likun

[PATCH 4/9] drm/amdgpu: support psp ip block for psp v14

2024-02-12 Thread Alex Deucher
From: Likun Gao Support PSP ip block for psp v14. Add psp ip block for psp v14_0_2 and v14_0_3. v2: sqaush in 14.0.3 firmware fix (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 14 ++

[PATCH 0/9] PSP 14.0 support

2024-02-12 Thread Alex Deucher
This set adds support for PSP 14.0.x. PSP handles firmware validation and various low level asic initialization. The first patch adds register headers and is large so it has been omitted. Hawking Zhang (2): drm/amdgpu: Add mp v14_0_2 ip headers (v5) drm/amdgpu: Add psp v14_0 ip block

[PATCH 6/9] drm/amdgpu/psp: handle TMR type via flag

2024-02-12 Thread Alex Deucher
From: Likun Gao Add flag boot_time_tmr to indicate boot time TMR or runtime TMR instead of function. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 15 --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2

[PATCH 5/9] drm/amdgpu/psp: set autoload support by default

2024-02-12 Thread Alex Deucher
From: Likun Gao Set psp->autoload_supported to true by default, as only a few version of ASIC not support autoload, and the furture version of PSP should support this. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH 2/9] drm/amdgpu: Add psp v14_0 ip block support

2024-02-12 Thread Alex Deucher
From: Hawking Zhang Add psp v14_0 ip block support. v2: rebase (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile| 3 +- drivers/gpu/drm/amd/amdgpu/psp_v14_0.c | 666 +

[PATCH 3/9] drm/amdgpu: use spirom update wait_for helper for psp v14

2024-02-12 Thread Alex Deucher
From: Likun Gao Spirom update typically requires extremely long duration for command execution, and special helper function to wait for it's completion. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/psp_v14_0.c | 6 +-

Re: [PATCH v5 1/3] drm: Add support to get EDID from ACPI

2024-02-12 Thread Mario Limonciello
On 2/10/2024 23:50, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that the DRM EDID helpers should try to fetch it and

Re: [PATCH v2] drm/amdgpu/display: Initialize gamma correction mode variable in dcn30_get_gamcor_current()

2024-02-12 Thread Pillai, Aurabindo
[AMD Official Use Only - General] Reviewed-by: Aurabindo Pillai -- Regards, Jay From: SHANMUGAM, SRINIVASAN Sent: Monday, February 12, 2024 10:33 AM To: Siqueira, Rodrigo ; Pillai, Aurabindo Cc: amd-gfx@lists.freedesktop.org ; SHANMUGAM, SRINIVASAN ; Lakha,

[PATCH v2] drm/amdgpu/display: Initialize gamma correction mode variable in dcn30_get_gamcor_current()

2024-02-12 Thread Srinivasan Shanmugam
The dcn30_get_gamcor_current() function is responsible for determining the current gamma correction mode used by the display controller. However, the 'mode' variable, which stores the gamma correction mode, was not initialized before its first usage, leading to an uninitialized symbol error. Thus

RE: [PATCH] drm/amd/display: Fix && vs || in 'edp_set_replay_allow_active()'

2024-02-12 Thread Li, Roman
[AMD Official Use Only - General] Reviewed-by: Roman Li > -Original Message- > From: amd-gfx On Behalf Of > Srinivasan Shanmugam > Sent: Friday, February 9, 2024 9:53 AM > To: Siqueira, Rodrigo ; Pillai, Aurabindo > > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ; Lakha,

RE: [PATCH] drm/amd/display: Fix possible NULL dereference on device remove/driver unload

2024-02-12 Thread Li, Roman
[AMD Official Use Only - General] Reviewed-by: Roman Li > -Original Message- > From: amd-gfx On Behalf Of > Srinivasan Shanmugam > Sent: Tuesday, February 6, 2024 11:55 PM > To: Siqueira, Rodrigo ; Pillai, Aurabindo > > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ;

RE: [PATCH 00/15] DC Patches for 12 Feb 2024

2024-02-12 Thread Wheeler, Daniel
[Public] Hi all, This week this patchset was tested on the following systems: * Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U * MSI Gaming X Trio RX 6800 * Gigabyte Gaming OC RX 7900 XTX These systems were tested on the following display/connection types: *

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-12 Thread Jani Nikula
On Sat, 10 Feb 2024, Mario Limonciello wrote: > On 2/9/2024 12:57, Daniel Vetter wrote: >> On Fri, Feb 09, 2024 at 09:34:13AM -0600, Mario Limonciello wrote: >>> On 2/9/2024 05:07, Daniel Vetter wrote: On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: > On Wed, 07 Feb 2024,

Blank screen after enabling amdgpu.seamless on a Barcelo APU

2024-02-12 Thread Luya Tshimbalanga
Hello team, Testing "amdgpu.seamless=1" on Ryzen 7 5825u using kernel 6.7.4 led to a blank screen after the initial boot screen as tested on Dell Inc. Inspiron 14 7425 2-in-1 with the following message from boot: "Feb 11 13:43:37 kernel: amdgpu :04:00.0: [drm] *ERROR* [CRTC:73:crtc-0]

[PATCH] drm/amdgpu/swsmu: Fix if statement in smu_baco_get_state()

2024-02-12 Thread Daniil Dulov
In smu_baco_get_state() smu->ppt_funcs->baco_get_state is checked for NULL. If it is NULL then the pointer is dereferenced. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 6c45e480fe23 ("drm/amd/powerplay: clear the swSMU code layer") Signed-off-by: Daniil Dulov ---