RE: [PATCH 8/8] drm/amd/pm: drop the support for manual fan speed setting on SMU13.0.7

2023-01-09 Thread Quan, Evan
[AMD Official Use Only - General] Anyone else can help to review this patch series? We need these to address the fan speed setting failure reported for the new SMU13 asics. @Deucher, Alexander ? Evan > -Original Message- > From: Quan, Evan > Sent: Thursday, January 5, 2023 11:23 AM >

Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-09 Thread Lazar, Lijo
On 1/10/2023 8:07 AM, Quan, Evan wrote: [AMD Official Use Only - General] -Original Message- From: Lazar, Lijo Sent: Monday, January 9, 2023 6:52 PM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for

Re: [PATCH] drm/amd/pm/smu13: BACO is supported when it's in BACO state

2023-01-09 Thread Lazar, Lijo
On 1/10/2023 9:07 AM, Guchun Chen wrote: This leverages the logc in smu11. No need to talk to SMU to check BACO enablement as it's in BACO state already. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Thanks, Lijo --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 1

RE: [PATCH] drm/amd/pm/smu13: BACO is supported when it's in BACO state

2023-01-09 Thread Feng, Kenneth
[AMD Official Use Only - General] It makes sense. Reviewed-by: Kenneth Feng -Original Message- From: amd-gfx On Behalf Of Guchun Chen Sent: Tuesday, January 10, 2023 11:38 AM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking ; Lazar, Lijo ; Quan, Evan Cc: Chen,

[PATCH] drm/amd/pm/smu13: BACO is supported when it's in BACO state

2023-01-09 Thread Guchun Chen
This leverages the logc in smu11. No need to talk to SMU to check BACO enablement as it's in BACO state already. Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Re: [PATCH] drm/amdkfd: Page aligned VRAM reserve size

2023-01-09 Thread Felix Kuehling
Am 2023-01-09 um 19:01 schrieb Philip Yang: Use page aligned size to reserve VRAM usage because page aligned TTM BO size is used to unreserve VRAM usage, otherwise this cause vram_used accounting unbalanced. Change vram_used definition type to int64_t to be able to trigger WARN_ONCE(adev &&

RE: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-09 Thread Quan, Evan
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Monday, January 9, 2023 6:52 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces > support > > >

[PATCH] drm/amdkfd: Page aligned VRAM reserve size

2023-01-09 Thread Philip Yang
Use page aligned size to reserve VRAM usage because page aligned TTM BO size is used to unreserve VRAM usage, otherwise this cause vram_used accounting unbalanced. Change vram_used definition type to int64_t to be able to trigger WARN_ONCE(adev && adev->kfd.vram_used < 0, "..."), to help debug

Re: [PATCH 2/2] drm_print: fix stale macro-name in comment

2023-01-09 Thread jim . cromie
On Thu, Jan 5, 2023 at 5:46 AM Daniel Vetter wrote: > > On Mon, Dec 05, 2022 at 09:10:05AM -0700, Jim Cromie wrote: > > Cited commit uses stale macro name, fix this, and explain better. > > > > When DRM_USE_DYNAMIC_DEBUG=y, DYNDBG_CLASSMAP_DEFINE() maps DRM_UT_* > > onto BITs in drm.debug. This

Re: [PATCH] drm/amdkfd: Use resource_size() helper function

2023-01-09 Thread Felix Kuehling
Am 2023-01-07 um 15:09 schrieb Deepak R Varma: On Fri, Dec 23, 2022 at 02:45:00AM +0530, Deepak R Varma wrote: Use the resource_size() function instead of a open coded computation resource size. It makes the code more readable. Issue identified using resource_size.cocci coccinelle semantic

Re: [PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Philip Yang
On 2023-01-09 15:23, Felix Kuehling wrote: Am 2023-01-09 um 15:18 schrieb Philip Yang: On 2023-01-09 14:27, Eric Huang wrote: There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang ---  

Re: [PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Felix Kuehling
Am 2023-01-09 um 15:23 schrieb Felix Kuehling: Am 2023-01-09 um 15:18 schrieb Philip Yang: On 2023-01-09 14:27, Eric Huang wrote: There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang ---  

Re: [PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Felix Kuehling
Am 2023-01-09 um 15:18 schrieb Philip Yang: On 2023-01-09 14:27, Eric Huang wrote: There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang ---   drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7

Re: [PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Felix Kuehling
Am 2023-01-09 um 14:27 schrieb Eric Huang: There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang The description is a bit misleading. The problem is not that the initialization is not being

Re: [PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Philip Yang
On 2023-01-09 14:27, Eric Huang wrote: There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +++ 1 file changed, 7 insertions(+) diff

[PATCH] drm/amdkfd: Add sync after creating vram bo

2023-01-09 Thread Eric Huang
There will be data corruption on vram allocated by svm if initialization is not being done. Adding sync is to resolve this issue. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c

RE: [PATCH v7 20/45] drm/amd: Parse both v1 and v2 TA microcode headers using same function

2023-01-09 Thread Limonciello, Mario
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Thursday, January 5, 2023 21:27 > To: Limonciello, Mario ; Deucher, Alexander > ; linux-ker...@vger.kernel.org > Cc: Javier Martinez Canillas ; Carlos Soriano Sanchez > ; amd-gfx@lists.freedesktop.org;

Re: [PATCH v2] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Christian König
Am 09.01.23 um 17:19 schrieb Limonciello, Mario: [Public] -Original Message- From: Alex Deucher Sent: Monday, January 9, 2023 10:04 To: SHANMUGAM, SRINIVASAN Cc: Wentland, Harry ; Deucher, Alexander ; Koenig, Christian ; amd-gfx@lists.freedesktop.org; Limonciello, Mario Subject:

RE: [PATCH v2] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Limonciello, Mario
[Public] > -Original Message- > From: Alex Deucher > Sent: Monday, January 9, 2023 10:04 > To: SHANMUGAM, SRINIVASAN > Cc: Wentland, Harry ; Deucher, Alexander > ; Koenig, Christian > ; amd-gfx@lists.freedesktop.org; Limonciello, > Mario > Subject: Re: [PATCH v2] drm/amd/amdgpu: Fix

Re: [PATCH v2] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Alex Deucher
On Mon, Jan 9, 2023 at 10:58 AM Srinivasan Shanmugam wrote: > > CC drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.o > drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:71: error: variable 'i' is > uninitialized when used here [-Werror,-Wuninitialized] > snprintf(fw_name,

[PATCH v2] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Srinivasan Shanmugam
CC drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.o drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:71: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized] snprintf(fw_name, sizeof(fw_name), "amdgpu/%s%d.bin", ucode_prefix, i);

Re: [RFC PATCH v2 00/18] Add DRM CRTC 3D LUT interface

2023-01-09 Thread Melissa Wen
On 01/09, Melissa Wen wrote: > Hi, > > After collecting comments in different places, here is a second version > of the work on adding DRM CRTC 3D LUT support to the current DRM color > mgmt interface. In comparison to previous proposals [1][2][3], here we > add 3D LUT before gamma 1D LUT, but

Re: [PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-09 Thread Alex Deucher
On Mon, Jan 9, 2023 at 5:13 AM Christian König wrote: > > Am 07.01.23 um 16:15 schrieb Arunpravin Paneer Selvam: > > As we are observing low numbers in viewperf graphics benchmark, we > > are strictly not allowing the top down flag enabled allocations > > to steal the memory space from cpu

[RFC PATCH v2 16/18] drm/amd/display: add user 3D LUT support to the amdgpu_dm color pipeline

2023-01-09 Thread Melissa Wen
Map DRM 3D LUT in the atomic color mgmt pipeline to DC. 3D LUT works better in a non-linear color space, therefore using a degamma to linearize the input space may produce unexpected results. The next patch introduces shaper LUT support that can be used to delinearize the color space before

[RFC PATCH v2 18/18] drm/amd/display: add user shaper LUT support to amdgpu_dm color pipeline

2023-01-09 Thread Melissa Wen
Now, we can use shaper LUT to delinearize and/or normalize the color space for a more efficient 3D LUT support (so far, only for DRM atomic color mgmt). If a degamma 1D LUT is passed to linearize the color space, a custom shaper 1D LUT can be used before applying 3D LUT. Signed-off-by: Melissa

[RFC PATCH v2 17/18] drm/amd/display: decouple steps to reuse in shaper LUT support

2023-01-09 Thread Melissa Wen
Decouple steps of shaper LUT setup and LUT size validation according to HW caps as a preparation for shaper LUT support. Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 22 --- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git

[RFC PATCH v2 14/18] drm/amd/display: expand array of supported 3D LUT modes

2023-01-09 Thread Melissa Wen
AMD MPC block support 3D LUTs of dimensions 17 and 9, and also bit depth 12 and 10, therefore, advertise them to the userspace. Signed-off-by: Melissa Wen --- .../amd/display/modules/color/color_gamma.h | 31 +++ 1 file changed, 31 insertions(+) diff --git

[RFC PATCH v2 10/18] drm/amd/display: update lut3d and shaper lut to stream

2023-01-09 Thread Melissa Wen
It follows the same path of out_transfer_func for stream updates, since shaper LUT and 3D LUT is programmed in funcs.set_output_transfer_func() and this function is called in the atomic commit_tail when update_flags.bits.out_tf is set. Signed-off-by: Melissa Wen ---

[RFC PATCH v2 15/18] drm/amd/display: enable 3D-LUT DRM properties if supported

2023-01-09 Thread Melissa Wen
Enable DRM crtc properties related to 3D LUT resources (shaper LUT, 3D LUT and 3D LUT modes) if it's supported by DCN HW, that means DCN families 3.0+ Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 25

[RFC PATCH v2 13/18] drm/amd/display: Define 3D LUT struct for HDR planes

2023-01-09 Thread Melissa Wen
From: Alex Hung Add a 3D LUT mode supported by amdgpu driver. Note: A patchset "IGT tests for pre-blending 3D LUT interfaces" for this proposal is sent to IGT mailing list. Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/modules/color/color_gamma.h | 12 1 file changed, 12

[RFC PATCH v2 12/18] drm/amd/display: acquire/release 3D LUT resources for ctx on DCN301

2023-01-09 Thread Melissa Wen
Acquire and release 3D LUT and shaper LUT every time we create/remove a new ctx and add/remove stream to/from it. 3D LUT acquire/release can fail and therefore we should check its availability during atomic check considering the new context created not the current one. Signed-off-by: Melissa Wen

[RFC PATCH v2 11/18] drm/amd/display: handle MPC 3D LUT resources for a given context

2023-01-09 Thread Melissa Wen
In the original dc_acquire_release_mpc_3dlut(), only current ctx is considered, which doesn't fit the steps for atomic checking new ctx. Therefore, create a function to handle 3D LUT resource for a given context, so that we can check resources availability in atomic_check time and handle failures

[RFC PATCH v2 09/18] drm/amd/display: encapsulate atomic regamma operation

2023-01-09 Thread Melissa Wen
We are introducing DRM 3D LUT property to DM color pipeline in the next patch, but so far, only for atomic interface. By checking .set_output_transfer_func in DC drivers with MPC 3D LUT support, we can verify that regamma is only programmed when 3D LUT programming fails. As a groundwork to

[RFC PATCH v2 08/18] drm/amd/display: add comments to describe DM crtc color mgmt behavior

2023-01-09 Thread Melissa Wen
Describe some expected behavior of the AMD DM color mgmt programming. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

[RFC PATCH v2 07/18] drm/amd/display: remove unused regamma condition

2023-01-09 Thread Melissa Wen
The function __set_output_tf is only called by amdgpu_dm_update_crtc_color_mgmt() when using atomic regamma. In this situation, func->tf == TRANSFER_FUNCTION_LINEAR (the original if condition) and it never falls into tf != LINEAR (the else condition). Therefore, remove unused condition to avoid

[RFC PATCH v2 00/18] Add DRM CRTC 3D LUT interface

2023-01-09 Thread Melissa Wen
Hi, After collecting comments in different places, here is a second version of the work on adding DRM CRTC 3D LUT support to the current DRM color mgmt interface. In comparison to previous proposals [1][2][3], here we add 3D LUT before gamma 1D LUT, but also a shaper 1D LUT before 3D LUT, that

Re: [PATCH] drm/amdgpu: fix pipeline sync v2

2023-01-09 Thread Alex Deucher
On Mon, Jan 9, 2023 at 8:01 AM Christian König wrote: > > This fixes a potential memory leak of dma_fence objects in the CS code > as well as glitches in firefox because of missing pipeline sync. > > v2: use the scheduler instead of the fence context for the test > > Signed-off-by: Christian

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2023-01-09 Thread Christian König
Am 09.01.23 um 14:13 schrieb Mikhail Gavrilov: On Fri, Jan 6, 2023 at 8:27 PM Christian König wrote: And it looks like Dmitry submitted it initially to the wrong branch. Because of this it wasn't scheduled as fix for 6.2, but rather queued up as new feature for 6.3. This is fixed by now and

[PATCH] drm/amdgpu: fix pipeline sync v2

2023-01-09 Thread Christian König
This fixes a potential memory leak of dma_fence objects in the CS code as well as glitches in firefox because of missing pipeline sync. v2: use the scheduler instead of the fence context for the test Signed-off-by: Christian König Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2323 Fixes:

Re: [RFC PATCH 4/5] drm/drm_color_mgmt: add 3D LUT to color mgmt properties

2023-01-09 Thread Joshua Ashton
On 6/27/22 13:18, Ville Syrjälä wrote: On Sun, Jun 19, 2022 at 09:31:03PM -0100, Melissa Wen wrote: Add 3D LUT for gammar correction using a 3D lookup table. The position in the color correction pipeline where 3D LUT is applied depends on hw design, being after CTM or gamma. If just after

Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-09 Thread Lazar, Lijo
On 1/9/2023 2:27 PM, Quan, Evan wrote: [AMD Official Use Only - General] -Original Message- From: Lazar, Lijo Sent: Monday, January 9, 2023 11:28 AM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for

Re: [PATCH 3/5] drm/amdgpu: Do not include

2023-01-09 Thread Christian König
Am 09.01.23 um 11:12 schrieb Thomas Zimmermann: Remove unnecessary include statements for . No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 -

Re: [PATCH 1/5] drm: Include where needed

2023-01-09 Thread Christian König
Am 09.01.23 um 11:12 schrieb Thomas Zimmermann: Include in source files that need it. Some of DRM's source code gets the backlight header via drm_crtc_helper.h and , which can leed to unnecessary recompilation. If possible, do not include drm_crtc_helper.h any longer. Signed-off-by: Thomas

Re: [PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-09 Thread Christian König
Am 07.01.23 um 16:15 schrieb Arunpravin Paneer Selvam: As we are observing low numbers in viewperf graphics benchmark, we are strictly not allowing the top down flag enabled allocations to steal the memory space from cpu visible region. The approach is, we are sorting each order list entries in

[PATCH 5/5] drm: Include in drm_modes.c

2023-01-09 Thread Thomas Zimmermann
Include in drm_modes.c for of_property_read_u32(). Until now, the OF header got included via . Also comment on the reason for still including . The header file is still required to get KHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location.

[PATCH 2/5] drm: Don't include linux/fb.h in drm_crtc_helper.h

2023-01-09 Thread Thomas Zimmermann
Including in drm_crtc_helper.h is not required. Remove the include statement and avoid rebuilding DRM whenever the fbdev header changes. Signed-off-by: Thomas Zimmermann --- include/drm/drm_crtc_helper.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/drm_crtc_helper.h

[PATCH 3/5] drm/amdgpu: Do not include

2023-01-09 Thread Thomas Zimmermann
Remove unnecessary include statements for . No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 1 -

[PATCH 1/5] drm: Include where needed

2023-01-09 Thread Thomas Zimmermann
Include in source files that need it. Some of DRM's source code gets the backlight header via drm_crtc_helper.h and , which can leed to unnecessary recompilation. If possible, do not include drm_crtc_helper.h any longer. Signed-off-by: Thomas Zimmermann ---

[PATCH 4/5] drm/panel: Do not include

2023-01-09 Thread Thomas Zimmermann
Remove unnecessary include statements for . No functional changes. Include where the driver got the header file via . Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 1 - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 -

[PATCH 0/5] drm: Do not include unnecessarily

2023-01-09 Thread Thomas Zimmermann
Remove unnecessary include statements for . I recently changed this header and had to rebuild a good part of DRM. So avoid this by removing the dependency. Some source files require the OF or backlight headers. Include those instead. Thomas Zimmermann (5): drm: Include where needed drm:

Re: [PATCH] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Christian König
Am 09.01.23 um 09:29 schrieb Srinivasan Shanmugam: CC drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.o drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:71: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized] snprintf(fw_name, sizeof(fw_name),

RE: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces support

2023-01-09 Thread Quan, Evan
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Monday, January 9, 2023 11:28 AM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 2/8] drm/amd/pm: refine the checks for sysfs interfaces > support > > >

Re: [PATCH] drm/amd/display: No need for Null pointer check before kfree

2023-01-09 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 12:09:51AM +0530, Deepak R Varma wrote: > kfree() & vfree() internally performs NULL check on the pointer handed > to it and take no action if it indeed is NULL. Hence there is no need > for a pre-check of the memory pointer before handing it to > kfree()/vfree(). > > Issue

[PATCH] drm/amd/amdgpu: Fix an uninitialized variable

2023-01-09 Thread Srinivasan Shanmugam
CC drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.o drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:71: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized] snprintf(fw_name, sizeof(fw_name), "amdgpu/%s%d.bin", ucode_prefix, i);