[PATCH v5 17/44] drm/colorop: Add 3x4 CTM type

2024-08-19 Thread Harry Wentland
This type is used to support a 3x4 matrix in colorops. A 3x4 matrix uses the last column as a "bias" column. Some HW exposes support for 3x4. The calculation looks like: out matrixin |R| |0 1 2 3 | | R | |G| = |4 5 6 7 | x | G | |B| |8 9 10 11| | B |

[PATCH v5 14/44] drm/vkms: Add enumerated 1D curve colorop

2024-08-19 Thread Harry Wentland
This patch introduces a VKMS color pipeline that includes two drm_colorops for named transfer functions. For now the only ones supported are sRGB EOTF, sRGB Inverse EOTF, and a Linear TF. We will expand this in the future but I don't want to do so without accompanying IGT tests. We introduce a new

[PATCH v5 18/44] drm/vkms: Use s32 for internal color pipeline precision

2024-08-19 Thread Harry Wentland
Certain operations require us to preserve values below 0.0 and above 1.0 (0x0 and 0x respectively in 16 bpc unorm). One such operation is a BT709 encoding operation followed by its decoding operation, or the reverse. We'll use s32 values as intermediate in and outputs of our color operations,

[PATCH v5 22/44] drm/colorop: pass plane_color_pipeline client cap to atomic check

2024-08-19 Thread Harry Wentland
Drivers will need to know whether an atomic check/commit originated from a client with DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE so they can ignore deprecated properties, like COLOR_ENCODING and COLOR_RANGE. Pass the plane_color_pipeline bit to drm_atomic_state. v5: - Fix kernel docs Signed-off-by: H

[PATCH v5 23/44] drm/colorop: define a new macro for_each_new_colorop_in_state

2024-08-19 Thread Harry Wentland
From: Alex Hung Create a new macro for_each_new_colorop_in_state to access new drm_colorop_state updated from uapi. Signed-off-by: Alex Hung --- include/drm/drm_atomic.h | 20 1 file changed, 20 insertions(+) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.

[PATCH v5 20/44] drm/tests: Add a few tests around drm_fixed.h

2024-08-19 Thread Harry Wentland
While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers using signed-magnitude or twos-complement. It is twos-complement. In order to make someone else's day easier I am adding the drm_test_int2fixp test

[PATCH v5 12/44] drm/plane: Add COLOR PIPELINE property

2024-08-19 Thread Harry Wentland
We're adding a new enum COLOR PIPELINE property. This property will have entries for each COLOR PIPELINE by referencing the DRM object ID of the first drm_colorop of the pipeline. 0 disables the entire COLOR PIPELINE. Userspace can use this to discover the available color pipelines, as well as set

[PATCH v5 21/44] drm/vkms: Add tests for CTM handling

2024-08-19 Thread Harry Wentland
A whole slew of tests for CTM handling that greatly helped in debugging the CTM code. The extent of tests might seem a bit silly but they're fast and might someday help save someone else's day when debugging this. v5: - Make apply_3x4_matrix static v4: - Comment on origin of bt709_enc matrix (P

[PATCH v5 31/44] drm/amd/display: Enable support for PQ 125 EOTF and Inverse

2024-08-19 Thread Harry Wentland
This patchset enables support for the PQ_125 EOTF and its inverse on all existing plane 1D curve colorops, i.e., on DEGAM, SHAPER, and BLND blocks. With this patchset the following IGT subtests are passing: kms_colorop --run plane-XR30-XR30-pq_125_eotf kms_colorop --run plane-XR30-XR30-pq_125_inv_

[PATCH v5 28/44] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose a 2nd curve colorop with support for DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF and program HW to perform the sRGB Inverse EOTF on the shaper block when the colorop is not in bypass. With this change the follow IGT tests pass: kms_colorop --run plane-XR30-XR30-srgb_inv_eotf kms_co

[PATCH v5 33/44] drm/amd/display: Add support for BT.709 and BT.2020 TFs

2024-08-19 Thread Harry Wentland
This adds support for the BT.709/BT.2020 transfer functions on all current 1D curve plane colorops, i.e., on DEGAM, SHAPER, and BLND blocks. With this change the following IGT subtests pass: kms_colorop --run plane-XR30-XR30-bt2020_inv_oetf kms_colorop --run plane-XR30-XR30-bt2020_oetf Signed-off

[PATCH v5 30/44] drm/colorop: Add PQ 125 EOTF and its inverse

2024-08-19 Thread Harry Wentland
The PQ function defines a mapping of code values to nits (cd/m^2). The max code value maps to 10,000 nits. Windows DWM's canonical composition color space (CCCS) defaults to composing SDR contents to 80 nits and uses a float value of 1.0 to represent this. For this reason AMD HW hard-codes a PQ f

[PATCH v5 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose a 3rd 1D curve colorop, with support for DRM_COLOROP_1D_CURVE_SRGB_EOTF and program the BLND block to perform the sRGB transform when the colorop is not in bypass With this change the following IGT test passes: kms_colorop --run plane-XR30-XR30-srgb_eotf-srgb_inv_eotf-srgb

[PATCH v5 32/44] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2024-08-19 Thread Harry Wentland
The BT.709 and BT.2020 OETFs are the same, the only difference being that the BT.2020 variant is defined with more precision for 10 and 12-bit per color encodings. Both are used as encoding functions for video content, and are therefore defined as OETF (opto-electronic transfer function) instead o

[PATCH v5 27/44] drm/amd/display: Add support for sRGB EOTF in DEGAM block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose one 1D curve colorop with support for DRM_COLOROP_1D_CURVE_SRGB_EOTF and program HW to perform the sRGB transform when the colorop is not in bypass. With this change the following IGT test passes: kms_colorop --run plane-XR30-XR30-srgb_eotf The color pipeline now consists

[PATCH v5 25/44] drm/amd/display: Add bypass COLOR PIPELINE

2024-08-19 Thread Harry Wentland
Add the default Bypass pipeline and ensure it passes the kms_colorop test plane-XR30-XR30-bypass. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_

[PATCH v5 24/44] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2024-08-19 Thread Harry Wentland
When the plane_color_pipeline bit is set we should ignore deprecated properties, such as COLOR_RANGE and COLOR_ENCODING. Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_

[PATCH v5 40/44] drm/colorop: Define LUT_1D interpolation

2024-08-19 Thread Harry Wentland
We want to make sure userspace is aware of the 1D LUT interpolation. While linear interpolation is common it might not be supported on all HW. Give driver implementers a way to specify their interpolation. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 ++--

[PATCH v5 35/44] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT

2024-08-19 Thread Harry Wentland
From: Alex Hung This patch adds colorops for custom 1D LUTs in the SHAPER and BLND HW blocks. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-srgb_inv_eotf_lut kms_colorop --run plane-XR30-XR30-srgb_inv_eotf_lut-srgb_eotf_lut The color pipeline now consists of t

[PATCH v5 38/44] drm/amd/display: add multiplier colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a multiplier. This multiplier is programmed via the HDR Multiplier in DCN. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-multiply_125 kms_colorop --run plane-XR30-XR30-multiply_inv_125 The color pipeline now consists of th

[PATCH v5 37/44] drm/colorop: Add mutliplier type

2024-08-19 Thread Harry Wentland
From: Alex Hung This introduces a new drm_colorop_type: DRM_COLOROP_MULTIPLIER. It's a simple multiplier to all pixel values. The value is specified via a S31.32 fixed point provided via the "MULTIPLIER" property. v5: - Fix atomic state print - Add kernel doc Signed-off-by: Alex Hung --- d

[PATCH v5 42/44] drm/colorop: Add 3D LUT supports to color pipeline

2024-08-19 Thread Harry Wentland
From: Alex Hung It is to be used to enable HDR by allowing userpace to create and pass 3D LUTs to kernel and hardware. 1. new drm_colorop_type: DRM_COLOROP_3D_LUT. 2. 3D LUT modes define hardware capabilities to userspace applications. 3. mode index points to current 3D LUT mode in lut_3d_modes.

[PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a 3x4 color transformation matrix. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-ctm_3x4_50_desat kms_colorop --run plane-XR30-XR30-ctm_3x4_overdrive kms_colorop --run plane-XR30-XR30-ctm_3x4_oversaturate kms_colorop --run

[PATCH v5 43/44] drm/amd/display: add 3D LUT colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a 3D LUT. The color pipeline now consists of the following colorops: 1. 1D curve colorop 2. Multiplier 3. 3x4 CTM 4. 1D curve colorop 5. 1D LUT 6. 3D LUT 7. 1D curve colorop 8. 1D LUT Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_color.

[PATCH v5 44/44] drm/amd/display: Add AMD color pipeline doc

2024-08-19 Thread Harry Wentland
A short description about the AMD color pipeline. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 122 +++--- 1 file changed, 102 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/

[PATCH v5 39/44] drm/amd/display: Swap matrix and multiplier

2024-08-19 Thread Harry Wentland
From: Alex Hung Swap the order of matrix and multiplier as designed in hardware. Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 22 +++--- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 30 +-- 2 files changed, 26 insertions(+), 26 deletio

[PATCH v5 34/44] drm/colorop: Add 1D Curve Custom LUT type

2024-08-19 Thread Harry Wentland
From: Alex Hung We've previously introduced DRM_COLOROP_1D_CURVE for pre-defined 1D curves. But we also have HW that supports custom curves and userspace needs the ability to pass custom curves, aka LUTs. This patch introduces a new colorop type, called DRM_COLOROP_1D_LUT that provides a SIZE pr

[PATCH v5 41/44] drm/colorop: allow non-bypass colorops

2024-08-19 Thread Harry Wentland
Not all HW will be able to do bypass on all color operations. Introduce an 'allow_bypass' boolean for all colorop init functions and only create the BYPASS property when it's true. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 22 +--- drivers/gpu/drm/drm_

[PATCH] drm/amd/pm: update message interface for smu v14.0.2/3

2024-08-19 Thread Kenneth Feng
update message interface for smu v14.0.2/3 Signed-off-by: Kenneth Feng --- .../pm/swsmu/inc/pmfw_if/smu_v14_0_2_ppsmc.h | 18 ++ .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 1 - 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/i

Re: [PATCH] drm/amd/pm: update message interface for smu v14.0.2/3

2024-08-19 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Yang Wang Best Regards, Kevin From: Kenneth Feng Sent: Tuesday, August 20, 2024 08:59 To: amd-gfx@lists.freedesktop.org Cc: Wang, Yang(Kevin) ; Feng, Kenneth Subject: [PATCH] drm/amd/pm: up

[PATCH] drm/amd: Don't wake dGPUs while reading sensors

2024-08-19 Thread Mario Limonciello
From: Mario Limonciello If the dGPU is off, then reading the sysfs files with a sensor monitoring application will wake it. Change the behavior to return an error when the dGPU is in D3cold. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 90 +++---

[PATCH] drm/amd/pm: add guard band interface on smu v14.0.2/3

2024-08-19 Thread Kenneth Feng
add guard band interface on smu v14.0.2/3 Signed-off-by: Kenneth Feng --- .../gpu/drm/amd/include/kgd_pp_interface.h| 1 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 19 +++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 3 +++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.

RE: [PATCH 1/3] drm/amdkfd: Check int source id for utcl2 poison event

2024-08-19 Thread Zhou1, Tao
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Hawking Zhang > Sent: Monday, August 19, 2024 11:15 PM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley > Cc: Zhang, Hawking ; Fan, Shikang > > Subject: [PATCH 1/3] drm/amdkfd: Check i

Re: [PATCH 6.10 090/263] drm/amdgpu/pm: Fix the param type of set_power_profile_mode

2024-08-19 Thread Jiri Slaby
On 19. 08. 24, 22:12, Deucher, Alexander wrote: [Public] -Original Message- From: Jiri Slaby Sent: Monday, August 19, 2024 3:54 AM To: Greg Kroah-Hartman ; sta...@vger.kernel.org Cc: patc...@lists.linux.dev; Deucher, Alexander ; Sasha Levin ; Koenig, Christian ; Pan, Xinhui ; amd-gfx@l

Re: [PATCH 12/13] drm/amd/display: Fix a typo in revert commit

2024-08-19 Thread Jiri Slaby
On 19. 08. 24, 16:29, Li, Roman wrote: Thank you, Jiri, for your feedback. I've dropped this patch from DC v.3.2.297. We will follow-up on this separately and merge it after you do confirm the issue you reported is fixed. The patch is all fine and very welcome to be upstream as soon as possi

Re: [PATCH] drm/amd/display: change the panel power savings level without a modeset

2024-08-19 Thread Mario Limonciello
On 8/9/24 15:42, Hamza Mahfooz wrote: We don't actually need to request that the compositor does a full modeset to modify the panel power savings level, we can instead just make a request to DMUB, to set the new level dynamically. Cc: Harry Wentland Cc: Leo Li Cc: Mario Limonciello Cc: Sebast

[PATCH 1/3] drm/amdkfd: Check int source id for utcl2 poison event

2024-08-19 Thread Hawking Zhang
Traditional utcl2 fault_status polling does not work in SRIOV environment. The polling of fault status register from guest side will be dropped by hardware. Driver should switch to check utcl2 interrupt source id to identify utcl2 poison event. It is set to 1 when poisoned data interrupts are sign

[PATCH v2 1/3] drm/amdkfd: Check int source id for utcl2 poison event

2024-08-19 Thread Hawking Zhang
Traditional utcl2 fault_status polling does not work in SRIOV environment. The polling of fault status register from guest side will be dropped by hardware. Driver should switch to check utcl2 interrupt source id to identify utcl2 poison event. It is set to 1 when poisoned data interrupts are sign

RE: [PATCH 1/3] drm/amdkfd: Check int source id for utcl2 poison event

2024-08-19 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Ignore this one. please review [PATCH v2 1/3] drm/amdkfd: Check int source id for utcl2 poison event Regards, Hawking -Original Message- From: Hawking Zhang Sent: Tuesday, August 20, 2024 14:05 To: amd-gfx@lists.freedesktop.org;

RE: [PATCH v2 1/3] drm/amdkfd: Check int source id for utcl2 poison event

2024-08-19 Thread Zhou1, Tao
[AMD Official Use Only - AMD Internal Distribution Only] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: Hawking Zhang > Sent: Tuesday, August 20, 2024 2:05 PM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley > Cc: Zhang, Hawking ; Fan, Shikang > >

[PATCH] drm/amd/pm: Do not support swSMU if SMU IP is disabled

2024-08-19 Thread Hawking Zhang
When SMU IP is disabled by ip_block_mask, driver should not refer to any dpm/swSMU callback. Instead, any driver call into swSMU/dpm callback needs to return error code EOPNOTSUPP. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+)

RE: [PATCH] drm/amd/pm: Do not support swSMU if SMU IP is disabled

2024-08-19 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Zhang, Hawking Sent: Tuesday, August 20, 2024 2:31 PM To: amd-gfx@lists.freedesktop.org; Wang, Yang(Kevin) ; Feng, Kenneth Cc: Zhang, Hawking Subject: [PATCH]

Re: [PATCH] drm/radeon: Switch radeon_connector to struct drm_edid

2024-08-19 Thread Thomas Weißschuh
On 2024-08-19 11:51:45+, Jani Nikula wrote: > On Sun, 18 Aug 2024, Thomas Weißschuh wrote: > > "struct drm_edid" is the safe and recommended alternative to "struct edid". > > > > Rename the member to make sure that no usage sites are missed, > > as "struct drm_edid" has some restrictions, for

Re: [PATCH 00/12] drm/amd: Switch over to struct drm_edid

2024-08-19 Thread Thomas Weißschuh
Hi Melissa, On 2024-08-19 11:31:44+, Melissa Wen wrote: > On 08/18, Thomas Weißschuh wrote: > > The AMD DRM drivers use 'struct edid', raw pointers and even custom > > structs to represent EDID data. > > Uniformly switch to the safe and recommended "struct drm_edid". > > > > Some uses of "str

Re: [PATCH 03/12] drm/edid: constify argument of drm_edid_is_valid()

2024-08-19 Thread Thomas Weißschuh
On 2024-08-19 11:21:21+, Jani Nikula wrote: > On Sun, 18 Aug 2024, Thomas Weißschuh wrote: > > drm_edid_is_valid() does not modify its argument, so mark it as const. > > That's not true. Indeed, thanks for noticing. It turns out this patch is not necessary anyways and I dropped it for the ne

Re: v6.11-rc4 amdgpu regression from v6.10.0

2024-08-19 Thread Andrew Worsley
On Tue, 20 Aug 2024 at 00:13, Alex Deucher wrote: > > On Mon, Aug 19, 2024 at 9:55 AM Andrew Worsley wrote: > > > > The v6.11-rc4 linux hangs during amdgpu start up where as the v6.10.0 > > is fine. I had to take a photo of the screen (see attachment) from . > > amdgpu :c1:00.0: Direct fi

<    1   2