[V7 13/45] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2024-12-19 Thread Alex Hung
s are expected to ignore these properties when programming the HW. Setting of the COLOR_PIPELINE plane property or drm_colorop properties is only allowed for userspace that sets this client cap. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v5: - Fix kernel docs v4: - Don&#x

[V7 08/45] Documentation/gpu: document drm_colorop

2024-12-19 Thread Alex Hung
From: Harry Wentland Add kernel doc for drm_colorop objects. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Add a commit messages v5: - Drop TODO Documentation/gpu/drm-kms.rst | 15 +++ drivers/gpu/drm/drm_colorop.c | 31 +++ 2

[V7 14/45] drm/vkms: Add enumerated 1D curve colorop

2024-12-19 Thread Alex Hung
hout clear indication that we need it. We'll revisit and, if necessary, regenerate the LUTs when we have IGT tests for higher precision buffers. Signed-off-by: Harry Wentland Signed-off-by: Alex Hung --- v7: - Fix checkpatch warnings (Louis Chauvet) - Change kzalloc(sizeof(struct drm_c

[V7 16/45] drm/colorop: Add 3x4 CTM type

2024-12-19 Thread Alex Hung
We only create the DATA property for property types that need it. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v6: - take ref for DATA blob in duplicate_state func (Xaver Hugl) v5: - Add function signature for init (Sebastian) - Fix kernel-doc v4: - Create helper function f

[V7 19/45] drm/tests: Add a few tests around drm_fixed.h

2024-12-19 Thread Alex Hung
dding the drm_test_int2fixp test that validates the above assumption. I am also adding a test for the new sm2fixp function that converts from a signed-magnitude fixed point to the twos-complement fixed point. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland -

[V7 20/45] drm/vkms: Add tests for CTM handling

2024-12-19 Thread Alex Hung
From: 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. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hu

[V7 17/45] drm/vkms: Use s32 for internal color pipeline precision

2024-12-19 Thread Alex Hung
er to allow for this we'll also invert the nesting of our colorop processing loops. We now use the pixel iteration loop on the outside and the colorop iteration on the inside. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Fix checkpatch

[V7 18/45] drm/vkms: add 3x4 matrix in color pipeline

2024-12-19 Thread Alex Hung
that the matrix entries are in signed-magnitude fixed point, whereas the drm_fixed.h implementation uses 2s-complement. The latter one is the one that we want for easy addition and subtraction, so we convert all entries to 2s-complement. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland -

[V7 21/45] drm/colorop: pass plane_color_pipeline client cap to atomic check

2024-12-19 Thread Alex Hung
: Alex Hung Signed-off-by: Harry Wentland --- v5: - Fix kernel docs drivers/gpu/drm/drm_atomic_uapi.c | 1 + include/drm/drm_atomic.h | 18 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index

[V7 23/45] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2024-12-19 Thread Alex Hung
From: 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: Alex Hung Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions

[V7 00/45] Color Pipeline API w/ VKMS

2024-12-19 Thread Alex Hung
Shashank Sharma Cc: Alexander Goins Cc: Joshua Ashton Cc: Michel Dänzer Cc: Aleix Pol Cc: Xaver Hugl Cc: Victoria Brekenfeld Cc: Sima Cc: Uma Shankar Cc: Naseer Ahmed Cc: Christopher Braga Cc: Abhinav Kumar Cc: Arthur Grillo Cc: Hector Martin Cc: Liviu Dudau Cc: Sasha McIntosh Cc: Cha

[V7 01/45] drm: Add helper for conversion from signed-magnitude

2024-12-19 Thread Alex Hung
From: Harry Wentland CTM values are defined as signed-magnitude values. Add a helper that converts from CTM signed-magnitude fixed point value to the twos-complement value used by drm_fixed. Signed-off-by: Harry Wentland --- include/drm/drm_fixed.h | 18 ++ 1 file changed, 18 i

[V7 03/45] drm/vkms: Add kunit tests for VKMS LUT handling

2024-12-19 Thread Alex Hung
From: Harry Wentland Debugging LUT math is much easier when we can unit test it. Add kunit functionality to VKMS and add tests for - get_lut_index - lerp_u16 Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Cc: Arthur Grillo --- v7: - Fix checkpatch

[V7 02/45] drm/vkms: Round fixp2int conversion in lerp_u16

2024-12-19 Thread Alex Hung
From: Harry Wentland fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[V7 04/45] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2024-12-19 Thread Alex Hung
From: Harry Wentland Add documentation for color pipeline API. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Add a commit messages v5: - Don't require BYPASS to succeed (Sebastian) - use DATA for 1D and 3D LUT types (Sebastian) - update 3DLUT ops to use 3DLUT_MODE

[V7 06/45] drm/colorop: Add TYPE property

2024-12-19 Thread Alex Hung
From: Harry Wentland Add a read-only TYPE property. The TYPE specifies the colorop type, such as enumerated curve, 1D LUT, CTM, 3D LUT, PWL LUT, etc. For now we're only introducing an enumerated 1D LUT type to illustrate the concept. Signed-off-by: Alex Hung Signed-off-by: Harry Wen

[V7 05/45] drm/colorop: Introduce new drm_colorop mode object

2024-12-19 Thread Alex Hung
From: Harry Wentland This patches introduces a new drm_colorop mode object. This object represents color transformations and can be used to define color pipelines. We also introduce the drm_colorop_state here, as well as various helpers and state tracking bits. Signed-off-by: Alex Hung Signed

[V7 09/45] drm/colorop: Add BYPASS property

2024-12-19 Thread Alex Hung
From: Harry Wentland We want to be able to bypass each colorop at all times. Introduce a new BYPASS boolean property for this. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v6: - clarify that bypass is only valid if BYPASS prop exists (Louis Chauvet) drivers/gpu/drm

[V7 07/45] drm/colorop: Add 1D Curve subtype

2024-12-19 Thread Alex Hung
From: Harry Wentland Add a new drm_colorop with DRM_COLOROP_1D_CURVE with two subtypes: DRM_COLOROP_1D_CURVE_SRGB_EOTF and DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF. Signed-off-by: Harry Wentland Co-developed-by: Alex Hung Signed-off-by: Alex Hung --- v5: - Add drm_get_colorop_curve_1d_type_name

[V7 10/45] drm/colorop: Add NEXT property

2024-12-19 Thread Alex Hung
From: Harry Wentland We'll construct color pipelines out of drm_colorop by chaining them via the NEXT pointer. NEXT will point to the next drm_colorop in the pipeline, or by 0 if we're at the end of the pipeline. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v5: -

Re: Vanilla Kernel Build of Recent 6.12.0 Kernel Test Results on M18r1 AMD Alienware

2024-11-21 Thread Alex Hung
Hi Gregory, Please report a bug on https://gitlab.freedesktop.org/drm/amd/, and it will ask essential information for debugging when creating bugs. Thanks. On 11/18/24 21:25, Gregory Carter wrote: Nov 18 18:37:33.973691 discernment.aesgi.com discernment.aesgi.com> kernel: warning: `QSampleCach

[PATCH 01/10] drm/amd/display: Fixes for mcache programming in DML21

2025-01-28 Thread Alex Hung
f-by: Alex Hung --- .../amd/display/dc/dml2/dml21/dml21_utils.c | 1 - .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 14 + .../display/dc/dml2/dml21/inc/dml_top_types.h | 1 + .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 30 ++- .../src/dml2_core/dml2_core_dcn4_cal

[PATCH 02/10] drm/amd/display: Fix out-of-bound accesses

2025-01-28 Thread Alex Hung
the ASSERT's conditions should be less without equal. Reviewed-by: Austin Zheng Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- .../amd/display/dc/dml2/dml21/dml21_translation_helper.c| 4 ++-- .../gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 6 +++--- 2 files c

[PATCH 04/10] drm/amd/display: Support multiple options during psr entry.

2025-01-28 Thread Alex Hung
From: Martin Tsai [WHY] Some panels may not handle idle pattern properly during PSR entry. [HOW] Add a condition to allow multiple options on power down sequence during PSR1 entry. Reviewed-by: Anthony Koo Signed-off-by: Martin Tsai Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 03/10] Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"

2025-01-28 Thread Alex Hung
From: Brandon Syu This reverts commit de612738e9771bd66aeb20044486c457c512f684. Reason to revert: screen flashes or gray screen appeared half of the screen after resume from S4/S5. Reviewed-by: Charlene Liu Signed-off-by: Brandon Syu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 00/10] DC Patches Jan 28, 2025

2025-01-28 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Fixes on DCN3.2 and DCN4 * Code factoring for SPL module * Various bug fixes Cc: Daniel Wheeler Ahmed, Muhammad (1): drm/amd/display: Enable odm 4:1 when debug key is set Alex Hung (1): drm/amd/display

[PATCH 05/10] drm/amd/display: Fix seamless boot sequence

2025-01-28 Thread Alex Hung
optimize_bandwidth while having seamless boot streams. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Signed-off-by: Lo-an Chen Signed-off-by: Paul Hsieh Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2

[PATCH 00/10] DC Patches Jan 28, 2025

2025-01-28 Thread Alex Hung
when debug key is set Alex Hung (1): drm/amd/display: Fix out-of-bound accesses Aric Cyr (1): drm/amd/display: Request HW cursor on DCN3.2 with SubVP Brandon Syu (1): Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY" Dillon Varone (1): drm/a

[PATCH 01/10] drm/amd/display: Fixes for mcache programming in DML21

2025-01-28 Thread Alex Hung
f-by: Alex Hung --- .../amd/display/dc/dml2/dml21/dml21_utils.c | 1 - .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 14 + .../display/dc/dml2/dml21/inc/dml_top_types.h | 1 + .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 30 ++- .../src/dml2_core/dml2_core_dcn4_cal

[PATCH 02/10] drm/amd/display: Fix out-of-bound accesses

2025-01-28 Thread Alex Hung
the ASSERT's conditions should be less without equal. Reviewed-by: Austin Zheng Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- .../amd/display/dc/dml2/dml21/dml21_translation_helper.c| 4 ++-- .../gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 6 +++--- 2 files c

[PATCH 04/10] drm/amd/display: Support multiple options during psr entry.

2025-01-28 Thread Alex Hung
From: Martin Tsai [WHY] Some panels may not handle idle pattern properly during PSR entry. [HOW] Add a condition to allow multiple options on power down sequence during PSR1 entry. Reviewed-by: Anthony Koo Signed-off-by: Martin Tsai Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 05/10] drm/amd/display: Fix seamless boot sequence

2025-01-28 Thread Alex Hung
optimize_bandwidth while having seamless boot streams. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Signed-off-by: Lo-an Chen Signed-off-by: Paul Hsieh Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2

[PATCH 03/10] Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"

2025-01-28 Thread Alex Hung
From: Brandon Syu This reverts commit de612738e9771bd66aeb20044486c457c512f684. Reason to revert: screen flashes or gray screen appeared half of the screen after resume from S4/S5. Reviewed-by: Charlene Liu Signed-off-by: Brandon Syu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 06/10] drm/amd/display: Enable odm 4:1 when debug key is set

2025-01-28 Thread Alex Hung
From: Muhammad Ahmed [WHAT] odm 4to1 is enabled when debug key is set. Reviewed-by: Charlene Liu Reviewed-by: Alvin Lee Signed-off-by: Muhammad Ahmed Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH 07/10] drm/amd/display: Allow reuse of of DCN4x code

2025-01-28 Thread Alex Hung
From: Dmytro Remove the static qualifier to make it available for code sharing with other components. Reviewed-by: Charlene Liu Signed-off-by: Dmytro Signed-off-by: Charlene Liu Signed-off-by: Alex Hung --- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 24 +-- .../amd/display/dc

[PATCH 09/10] drm/amd/display: Move SPL to a new path

2025-01-28 Thread Alex Hung
From: Samson Tam [WHY & HOW] - Move SPL from dc/spl to dc/sspl - Update build files and header paths - Remove dc/spl files Reviewed-by: George Zhang Signed-off-by: Samson Tam Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/Makefile | 2 +- drivers/gpu

[PATCH 08/10] drm/amd/display: Request HW cursor on DCN3.2 with SubVP

2025-01-28 Thread Alex Hung
256x256 cursor sizes are available for DCN3.2. Reviewed-by: Dillon Varone Signed-off-by: Aric Cyr Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/drivers

[PATCH 10/10] drm/amd/display: 3.2.319

2025-01-28 Thread Alex Hung
s PHY" - Fix out-of-bound accesses - Fixes for mcache programming in DML21 Signed-off-by: Taimur Hassan Signed-off-by: Alex Hung --- 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/a

Re: [V7 33/45] drm/colorop: Add 1D Curve Custom LUT type

2025-01-16 Thread Alex Hung
On 1/15/25 01:14, Simon Ser wrote: diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index a3e1fcad47ad..4744c12e429d 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -701,6 +701,9 @@ static int drm_atomic_color_set_dat

Re: [PATCH 2/2] drm/amd/display: Protect dml2_validate() from its callers

2025-03-19 Thread Alex Hung
Please see comments for patch 1. On 3/18/25 05:17, Huacai Chen wrote: Similar to dml2_create()/dml2_copy()/dml2_create_copy(), dml2_validate() should also be protected from its callers because "All the DC_FP_START/END should be used before call anything from DML2". So protect dml2_validate() wi

Re: [PATCH 1/2] drm/amd/display: Protect dml2_create()/dml2_copy()/dml2_create_copy()

2025-03-19 Thread Alex Hung
On 3/18/25 05:17, Huacai Chen wrote: Commit 7da55c27e76749b9 ("drm/amd/display: Remove incorrect FP context start") removes the FP context protection of dml2_create(), and it said "All the DC_FP_START/END should be used before call anything from DML2". However, dml2_create()/dml2_copy()/dml2_

[PATCH V8 06/43] drm/colorop: Add 1D Curve subtype

2025-04-05 Thread Alex Hung
From: Harry Wentland Add a new drm_colorop with DRM_COLOROP_1D_CURVE with two subtypes: DRM_COLOROP_1D_CURVE_SRGB_EOTF and DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF. Reviewed-by: Simon Ser Reviewed-by: Louis Chauvet Signed-off-by: Harry Wentland Co-developed-by: Alex Hung Signed-off-by: Alex Hung

Re: [PATCH V8 43/43] drm/colorop: Add destroy functions for color pipeline

2025-04-05 Thread Alex Hung
On 3/29/25 09:48, Simon Ser wrote: I would prefer these functions to be introduced together with the patches adding functions to create objects and adding the new fields. That way it's easier to check the symmetry and at no point in the series there are memory leaks. The object creation and

Re: [PATCH 1/2] drm/amd/display: Protect dml2_create()/dml2_copy()/dml2_create_copy()

2025-03-25 Thread Alex Hung
On 3/19/25 22:23, Huacai Chen wrote: Hi, Alex, On Thu, Mar 20, 2025 at 10:16 AM Alex Hung wrote: On 3/18/25 05:17, Huacai Chen wrote: Commit 7da55c27e76749b9 ("drm/amd/display: Remove incorrect FP context start") removes the FP context protection of dml2_create(), and it sai

[PATCH V8 41/43] drm/amd/display: add 3D LUT colorop

2025-03-26 Thread 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 --- v8: - Set initialized to 0 and return when drm_lut3d_size

[PATCH V8 31/43] drm/amd/display: Add support for BT.709 and BT.2020 TFs

2025-03-26 Thread Alex Hung
-bt2020_oetf Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Move BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) in amdgpu_dm_supported_blnd_tfs to "drm/amd/display: Enable support for PQ 125 EOTF and Inverse" (Leo Li) .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colo

[PATCH V8 34/43] drm/amd/display: add 3x4 matrix colorop

2025-03-26 Thread Alex Hung
-ctm_3x4_bt709_enc kms_colorop --run plane-XR30-XR30-ctm_3x4_bt709_dec The color pipeline now consists of the following colorops: 1. 1D curve colorop 2. 3x4 CTM 3. 1D curve colorop 4. 1D LUT 5. 1D curve colorop 6. 1D LUT Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Return

Re: [PATCH 1/2] drm/amd/display: Protect dml2_create()/dml2_copy()/dml2_create_copy()

2025-03-26 Thread Alex Hung
1a94f <4> [100.233149] RDX: 7ffdd9a52ee0 RSI: c06864a2 RDI: 0005 <4> [100.233149] RBP: c06864a2 R08: R09: 5609537f7b08 <4> [100.233150] R10: R11: 0246 R12: <4> [100.233151] R13

[PATCH V8 39/43] drm/colorop: allow non-bypass colorops

2025-03-26 Thread Alex Hung
From: 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: Alex Hung Signed-off-by: Harry Wentland --- .../amd/di

[PATCH V8 38/43] drm/colorop: Define LUT_1D interpolation

2025-03-26 Thread Alex Hung
From: 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by

[PATCH V8 43/43] drm/colorop: Add destroy functions for color pipeline

2025-03-26 Thread Alex Hung
The functions are to clean up color pipeline when a device driver fails to create its color pipeline. Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 3 +- drivers/gpu/drm/drm_colorop.c | 41 +++ drivers/gpu/drm/vkms/vkms_colorop.c

[PATCH V8 32/43] drm/colorop: Add 1D Curve Custom LUT type

2025-03-26 Thread Alex Hung
ch is used by a driver to advertise the supported SIZE of the LUT, as well as a DATA property which userspace uses to set the LUT. DATA and size function in the same way as current drm_crtc GAMMA and DEGAMMA LUTs. Signed-off-by: Alex Hung Co-developed-by: Harry Wentland Signed-off-by: Harry Wen

[PATCH V8 35/43] drm/colorop: Add mutliplier type

2025-03-26 Thread 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung --- v7: - Modify s

[PATCH V8 36/43] drm/amd/display: add multiplier colorop

2025-03-26 Thread Alex Hung
colorops: 1. 1D curve colorop 2. 3x4 CTM 3. Multiplier 4. 1D curve colorop 5. 1D LUT 6. 1D curve colorop 7. 1D LUT Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 40 +++ .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 16 2 files changed, 56

[PATCH V8 37/43] drm/amd/display: Swap matrix and multiplier

2025-03-26 Thread Alex Hung
Swap the order of matrix and multiplier as designed in hardware. Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 12 ++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c| 8 2 files changed, 10 insertions(+), 10 deletions(-) diff

[PATCH V8 40/43] drm/colorop: Add 3D LUT support to color pipeline

2025-03-26 Thread Alex Hung
It is to be used to enable HDR by allowing userpace to create and pass 3D LUTs to kernel and hardware. new drm_colorop_type: DRM_COLOROP_3D_LUT. Signed-off-by: Alex Hung --- v8: - Fix typo in subject (Simon Ser) - Update documentation for DRM_COLOROP_3D_LUT (Simon Ser) - Delete empty lines

[PATCH V8 18/43] drm/tests: Add a few tests around drm_fixed.h

2025-03-26 Thread Alex Hung
dding the drm_test_int2fixp test that validates the above assumption. I am also adding a test for the new sm2fixp function that converts from a signed-magnitude fixed point to the twos-complement fixed point. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland -

[PATCH V8 00/43] Color Pipeline API w/ VKMS

2025-03-26 Thread Alex Hung
Paalanen Cc: Simon Ser Cc: Harry Wentland Cc: Melissa Wen Cc: Jonas Ådahl Cc: Sebastian Wick Cc: Shashank Sharma Cc: Alexander Goins Cc: Joshua Ashton Cc: Michel Dänzer Cc: Aleix Pol Cc: Xaver Hugl Cc: Victoria Brekenfeld Cc: Sima Cc: Uma Shankar Cc: Naseer Ahmed Cc: Christopher Braga Cc:

[PATCH V8 01/43] drm: Add helper for conversion from signed-magnitude

2025-03-26 Thread Alex Hung
From: Harry Wentland CTM values are defined as signed-magnitude values. Add a helper that converts from CTM signed-magnitude fixed point value to the twos-complement value used by drm_fixed. Reviewed-by: Louis Chauvet Signed-off-by: Harry Wentland --- include/drm/drm_fixed.h | 18

[PATCH V8 04/43] drm/colorop: Introduce new drm_colorop mode object

2025-03-26 Thread Alex Hung
-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Remove drm_atomic_get_existing_colorop_state (Louis Chauvet) v7: - Fix checkpatch warnings and errors - Add a tab to for_each_oldnew_colorop_in_state definition - Change unsigned index to unsigned int index - Fix a checkpatch

[PATCH V8 03/43] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2025-03-26 Thread Alex Hung
From: Harry Wentland Add documentation for color pipeline API. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Fix typo "definint" -> "defining" v7: - Add a commit messages v5: - Don't require BYPASS to succeed (Sebastian) - use DATA for 1D

[PATCH V8 08/43] drm/colorop: Add NEXT property

2025-03-26 Thread Alex Hung
From: Harry Wentland We'll construct color pipelines out of drm_colorop by chaining them via the NEXT pointer. NEXT will point to the next drm_colorop in the pipeline, or by 0 if we're at the end of the pipeline. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - R

[PATCH V8 07/43] drm/colorop: Add BYPASS property

2025-03-26 Thread Alex Hung
From: Harry Wentland We want to be able to bypass each colorop at all times. Introduce a new BYPASS boolean property for this. Reviewed-by: Simon Ser Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v6: - clarify that bypass is only valid if BYPASS prop

[PATCH V8 12/43] Documentation/gpu: document drm_colorop

2025-03-26 Thread Alex Hung
From: Harry Wentland Add kernel doc for drm_colorop objects. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Move this after "drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE" (Simon Ser) - Update DOC overview (Simon Ser) v7: - Add a commit me

[PATCH V8 10/43] drm/plane: Add COLOR PIPELINE property

2025-03-26 Thread Alex Hung
color pipelines, as well as set the desired one. The color pipelines are programmed via properties on the actual drm_colorop objects. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Use upper case in drm_dbg_atomic (Simon Ser) - Remove MAX_COLOR_PIPELINES (Simon Ser) - Make pipe

[PATCH V8 11/43] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2025-03-26 Thread Alex Hung
llowed for userspace that sets this client cap. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Disallow setting of COLOR_RANGE and COLOR_ENCODING when DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE is set v5: - Fix kernel docs v4: - Don't block setting of COLOR_RANGE and COLOR_E

[PATCH V8 09/43] drm/colorop: Add atomic state print for drm_colorop

2025-03-26 Thread Alex Hung
From: Harry Wentland Print atomic state for drm_colorop in debugfs Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Add switch statement to print colorop type (Simon Ser) v7: - Add a commit messages - Squash "drm/colorop: Add NEXT to colorop state print"

[PATCH V8 14/43] drm/vkms: Add kunit tests for linear and sRGB LUTs

2025-03-26 Thread Alex Hung
From: Harry Wentland Two tests are added to VKMS LUT handling: - linear - inv_srgb Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Fix checkpatch warnings (Louis Chauvet) - Adde a commit messages - Fix code styles by adding and removing spaces

[PATCH V8 16/43] drm/vkms: Use s32 for internal color pipeline precision

2025-03-26 Thread Alex Hung
er to allow for this we'll also invert the nesting of our colorop processing loops. We now use the pixel iteration loop on the outside and the colorop iteration on the inside. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Fix checkpatch

[PATCH V8 15/43] drm/colorop: Add 3x4 CTM type

2025-03-26 Thread Alex Hung
We only create the DATA property for property types that need it. Reviewed-by: Simon Ser Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v6: - take ref for DATA blob in duplicate_state func (Xaver Hugl) v5: - Add function signature for init (Sebastian

[PATCH V8 17/43] drm/vkms: add 3x4 matrix in color pipeline

2025-03-26 Thread Alex Hung
that the matrix entries are in signed-magnitude fixed point, whereas the drm_fixed.h implementation uses 2s-complement. The latter one is the one that we want for easy addition and subtraction, so we convert all entries to 2s-complement. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signe

[PATCH V8 19/43] drm/vkms: Add tests for CTM handling

2025-03-26 Thread Alex Hung
From: 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. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hu

[PATCH V8 20/43] drm/colorop: pass plane_color_pipeline client cap to atomic check

2025-03-26 Thread Alex Hung
: Alex Hung Signed-off-by: Harry Wentland --- v5: - Fix kernel docs drivers/gpu/drm/drm_atomic_uapi.c | 1 + include/drm/drm_atomic.h | 18 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index

[PATCH V8 23/43] drm/amd/display: Add bypass COLOR PIPELINE

2025-03-26 Thread Alex Hung
From: Harry Wentland Add the default Bypass pipeline and ensure it passes the kms_colorop test plane-XR30-XR30-bypass. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH V8 21/43] drm/colorop: define a new macro for_each_new_colorop_in_state

2025-03-26 Thread Alex Hung
Create a new macro for_each_new_colorop_in_state to access new drm_colorop_state updated from uapi. Reviewed-by: Simon Ser 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

[PATCH V8 22/43] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2025-03-26 Thread Alex Hung
From: 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: Alex Hung Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions

[PATCH V8 27/43] drm/amd/display: Add support for sRGB EOTF in BLND block

2025-03-26 Thread Alex Hung
pipeline now consists of the following colorops: 1. 1D curve colorop w/ sRGB EOTF support 2. 1D curve colorop w/ sRGB Inverse EOTF support 3. 1D curve colorop w/ sRGB EOTF support Signed-off-by: Alex Hung Co-developed-by: Harry Wentland Signed-off-by: Harry Wentland --- v7: - Initialized

[PATCH V8 26/43] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block

2025-03-26 Thread Alex Hung
-XR30-XR30-srgb_eotf-srgb_inv_eotf The color pipeline now consists of the following colorops: 1. 1D curve colorop w/ sRGB EOTF support 2. 1D curve colorop w/ sRGB Inverse EOTF support Signed-off-by: Alex Hung Co-developed-by: Harry Wentland Signed-off-by: Harry Wentland --- v6: - don't

[PATCH V8 33/43] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT

2025-03-26 Thread Alex Hung
colorops: 1. 1D curve colorop 2. 1D curve colorop 3. 1D LUT 4. 1D curve colorop 5. 1D LUT The 1D curve colorops support sRGB, BT2020, and PQ scaled to 125.0. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Return error when __set_output_tf fails (Leo Li) - v7: - Initialize

[PATCH V8 05/43] drm/colorop: Add TYPE property

2025-03-26 Thread Alex Hung
igned-off-by: Alex Hung Signed-off-by: Harry Wentland --- v6: - fix doc typo (Alex Hung) v5: - Add drm_get_colorop_type_name in header - Add kernel docs v4: - Use enum property for TYPE (Pekka) v3: - Make TYPE a range property - Move enum drm_colorop_type to uapi header

[PATCH V8 29/43] drm/amd/display: Enable support for PQ 125 EOTF and Inverse

2025-03-26 Thread Alex Hung
plane-XR30-XR30-pq_125_inv_eotf kms_colorop --run plane-XR30-XR30-pq_125_eotf-pq_125_inv_eotf kms_colorop --run plane-XR30-XR30-pq_125_eotf-pq_125_inv_eotf-pq_125_eotf Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v8: - Move BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) in

[PATCH V8 02/43] drm/vkms: Add kunit tests for VKMS LUT handling

2025-03-26 Thread Alex Hung
From: Harry Wentland Debugging LUT math is much easier when we can unit test it. Add kunit functionality to VKMS and add tests for - get_lut_index - lerp_u16 Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Cc: Arthur Grillo --- v8: - Update config names

[PATCH V8 30/43] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2025-03-26 Thread Alex Hung
transfer function) instead of as EOTF (electro-optical transfer function). Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_colorop.c | 2 ++ include/drm/drm_colorop.h | 23 +++ 2 files changed, 25 insertions(+) diff --git a/drivers/gpu/drm

[PATCH V8 25/43] drm/amd/display: Add support for sRGB EOTF in DEGAM block

2025-03-26 Thread Alex Hung
colorop: 1. 1D curve colorop w/ sRGB EOTF Signed-off-by: Alex Hung Co-developed-by: Harry Wentland Signed-off-by: Harry Wentland --- v8: - Fix incorrect && by || in __set_colorop_in_tf_1d_curve (Leo Li) v7: - Fix checkpatch warnings - Change switch "{ }" position

[PATCH V8 28/43] drm/colorop: Add PQ 125 EOTF and its inverse

2025-03-26 Thread Alex Hung
eason AMD HW hard-codes a PQ function that is scaled by 125, yielding 80 nit PQ values for 1.0 and 10,000 nits at 125.0. This patch introduces this scaled PQ EOTF and its inverse as 1D curve types. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_colorop.c

[PATCH V8 13/43] drm/vkms: Add enumerated 1D curve colorop

2025-03-26 Thread Alex Hung
hout clear indication that we need it. We'll revisit and, if necessary, regenerate the LUTs when we have IGT tests for higher precision buffers. Signed-off-by: Harry Wentland Signed-off-by: Alex Hung --- v8: - Replace DRM_ERROR by drm_err (Louis Chauvet) - Replace DRM_WARN_ONCE by drm_W

[PATCH V8 24/43] drm/amd/display: Skip color pipeline initialization for cursor plane

2025-03-26 Thread Alex Hung
cursor plane does not need to have color pipeline. Signed-off-by: Alex Hung --- v7: - Add a commit messages drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm

[PATCH V8 42/43] drm/amd/display: Add AMD color pipeline doc

2025-03-27 Thread Alex Hung
From: Harry Wentland Add kernel doc for AMD color pipeline. Signed-off-by: Alex Hung 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

Re: [PATCH v2] drm/amd/display: Add error check for avi and vendor infoframe setup function

2025-04-10 Thread Alex Hung
On 4/7/25 20:20, Wentao Liang wrote: The function fill_stream_properties_from_drm_display_mode() calls the function drm_hdmi_avi_infoframe_from_display_mode() and the function drm_hdmi_vendor_infoframe_from_display_mode(), but does not check its return value. Log the error messages to prevent

Re: [PATCH] drm/amd/display: do not copy invalid CRTC timing info

2025-04-10 Thread Alex Hung
Hi Gergo, Thanks for the patch. I am sending this patch for testing and I will update test result next week. On 4/2/25 11:03, Gergo Koteles wrote: Since b255ce4388e0, it is possible that the CRTC timing information for the preferred mode has not yet been calculated while amdgpu_dm_connector_

Re: [PATCH V8 03/43] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2025-03-31 Thread Alex Hung
On 3/29/25 09:26, Simon Ser wrote: I would also highlight that we need to seamlessly switch between HW fixed-function blocks and shaders/CPU with no visible difference. Depending on the content being displayed we might need to fallback to shaders/CPU at any time. (A classic example would be a

Re: [PATCH V8 24/43] drm/amd/display: Skip color pipeline initialization for cursor plane

2025-03-31 Thread Alex Hung
On 3/31/25 19:04, Shengyu Qu wrote: My understanding is that currently the driver would just report no colorop support on cursor plane and actually implement the background plane's colorop on cursor? No. Again it is up to compositors or apps to determine how color pipeline and color

Re: [PATCH] drm/amd/display: do not copy invalid CRTC timing info

2025-04-18 Thread Alex Hung
No issues from promotion tests. Reviewed-by: Alex Hung On 4/8/25 10:55, Alex Hung wrote: Hi Gergo, Thanks for the patch. I am sending this patch for testing and I will update test result next week. On 4/2/25 11:03, Gergo Koteles wrote: Since b255ce4388e0, it is possible that the CRTC

Re: [PATCH] drm/amd/display: Fix slab-use-after-free in hdcp

2025-04-22 Thread Alex Hung
Reviewed-by: Alex Hung On 4/17/25 15:50, Mario Limonciello wrote: From: Chris Bainbridge The HDCP code in amdgpu_dm_hdcp.c copies pointers to amdgpu_dm_connector objects without incrementing the kref reference counts. When using a USB-C dock, and the dock is unplugged, the corresponding

[PATCH V9 14/43] drm/vkms: Add enumerated 1D curve colorop

2025-04-29 Thread Alex Hung
hout clear indication that we need it. We'll revisit and, if necessary, regenerate the LUTs when we have IGT tests for higher precision buffers. Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Reviewed-by: Daniel Stone --- V9: - Replace cleanup code by drm_colorop_pipeline_des

[PATCH V9 11/43] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2025-04-29 Thread Alex Hung
d for userspace that sets this client cap. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- V9: - Fix typo in commit description (Shengyu Qu) v8: - Disallow setting of COLOR_RANGE and COLOR_ENCODING when DRM_CLIENT_CAP_PLANE_COLOR_PIPELI

[PATCH V9 13/43] drm/colorop: Add destroy functions for color pipeline

2025-04-29 Thread Alex Hung
The functions are to clean up color pipeline when a device driver fails to create its color pipeline. Signed-off-by: Alex Hung Reviewed-by: Daniel Stone --- v9: - Move from from latest commit to here, and drm_colorop_pipeline_destroy is called in respective commits. drivers/gpu/drm

[PATCH V9 12/43] Documentation/gpu: document drm_colorop

2025-04-29 Thread Alex Hung
From: Harry Wentland Add kernel doc for drm_colorop objects. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- v8: - Move this after "drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE" (Simon Ser) - Update DO

[PATCH V9 16/43] drm/colorop: Add 3x4 CTM type

2025-04-29 Thread Alex Hung
We only create the DATA property for property types that need it. Reviewed-by: Simon Ser Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- v9: - Merge cleanup code for colorop->state->data in drm_colorop_cleanup (Simon Se

[PATCH V9 17/43] drm/vkms: Use s32 for internal color pipeline precision

2025-04-29 Thread Alex Hung
er to allow for this we'll also invert the nesting of our colorop processing loops. We now use the pixel iteration loop on the outside and the colorop iteration on the inside. Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone

<    1   2   3   4   5   6   7   >