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 v6 41/44] drm/colorop: allow non-bypass colorops

2024-12-19 Thread Alex Hung
On 10/4/24 05:43, Louis Chauvet wrote: On 03/10/24 - 16:01, Harry Wentland wrote: 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

[V7 22/45] drm/colorop: define a new macro for_each_new_colorop_in_state

2024-12-19 Thread 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.h index

[V7 44/45] drm/colorop: Add kernel doc for data blob

2024-12-19 Thread Alex Hung
Add layout of data blob for colorop types: DRM_COLOROP_1D_LUT, DRM_COLOROP_CTM_3X4 and DRM_COLOROP_3D_LUT Signed-off-by: Alex Hung --- include/drm/drm_colorop.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h index

[V7 24/45] drm/amd/display: Add bypass COLOR PIPELINE

2024-12-19 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

[V7 45/45] drm/colorop: Add destroy functions for color pipeline

2024-12-19 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

[V7 43/45] drm/amd/display: Add AMD color pipeline doc

2024-12-19 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

[V7 42/45] drm/amd/display: add 3D LUT colorop

2024-12-19 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 --- v7: - Simplify 3D LUT according to drm_colorop changes

[V7 40/45] drm/colorop: allow non-bypass colorops

2024-12-19 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

[V7 41/45] drm/colorop: Add 3D LUT supports to color pipeline

2024-12-19 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 --- v7: - Simplify 3D LUT by removing lut_3d_modes and related functions (Simon Ser) drivers/gpu/drm/drm_atomic.c

[V7 39/45] drm/colorop: Define LUT_1D interpolation

2024-12-19 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. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7

[V7 38/45] drm/amd/display: Swap matrix and multiplier

2024-12-19 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

[V7 37/45] drm/amd/display: add multiplier colorop

2024-12-19 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

[V7 36/45] drm/colorop: Add mutliplier type

2024-12-19 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. Signed-off-by: Alex Hung --- v7: - Modify size_property to lut_size_property

[V7 34/45] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT

2024-12-19 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 --- v7: - Initialize uint32_t blend_size = 0 by default (kernel test robot) - Modify

[V7 35/45] drm/amd/display: add 3x4 matrix colorop

2024-12-19 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 --- v7: - Change %lu

[V7 32/45] drm/amd/display: Add support for BT.709 and BT.2020 TFs

2024-12-19 Thread Alex Hung
-bt2020_oetf Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 11 --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 10 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm

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

2024-12-19 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

[V7 31/45] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2024-12-19 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 | 19 +++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm

[V7 30/45] drm/amd/display: Enable support for PQ 125 EOTF and Inverse

2024-12-19 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 --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 20

[V7 29/45] drm/colorop: Add PQ 125 EOTF and its inverse

2024-12-19 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

[V7 28/45] drm/amd/display: Add support for sRGB EOTF in BLND block

2024-12-19 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

[V7 27/45] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block

2024-12-19 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

[V7 26/45] drm/amd/display: Add support for sRGB EOTF in DEGAM block

2024-12-19 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 --- v7: - Fix checkpatch warnings - Change switch "{ }" position - Delete double ";" - Delete "{ }" for single-line if-state

[V7 25/45] drm/amd/display: Skip color pipeline initialization for cursor plane

2024-12-19 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

[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 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 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 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 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 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 15/45] drm/vkms: Add kunit tests for linear and sRGB LUTs

2024-12-19 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

[V7 12/45] drm/plane: Add COLOR PIPELINE property

2024-12-19 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 --- v7: - Fix a checkpatch warning - a new line after variable declaration v4: - Add pipeline property cre

[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 11/45] drm/colorop: Add atomic state print for drm_colorop

2024-12-19 Thread Alex Hung
From: Harry Wentland Print atomic state for drm_colorop in debugfs Signed-off-by: Alex Hung Signed-off-by: Harry Wentland --- v7: - Add a commit messages - Squash "drm/colorop: Add NEXT to colorop state print" (Simon Ser) drivers/gpu/drm/drm_atomic.c | 26 +++

[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: -

[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 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 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 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 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 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 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

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 0/9] DC Patches Nov 19, 2024

2024-11-19 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we have: * Add hblank borrowing support * Limit VTotal range to max hw cap minus fp * Correct prefetch calculation * Add option to retrieve detile buffer size * Add support for custom recout_width in SPL * Add disable_ips_in_dpms_

[PATCH 9/9] drm/amd/display: 3.2.311

2024-11-19 Thread Alex Hung
- Enable EASF based on luma taps only - Add a left edge pixel if in YCbCr422 or YCbCr420 and odm Reviewed-by: Alex Hung Signed-off-by: Aric Cyr 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

[PATCH 5/9] drm/amd/display: Add option to retrieve detile buffer size

2024-11-19 Thread Alex Hung
Lee Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c | 18 ++ drivers/gpu/drm/amd/display/dc/dc.h| 2 ++ .../gpu/drm/amd/display/dc/inc/core_types.h| 1 + .../display/dc/resource/dcn31/dcn31_resource.c | 7 +++ .../display/dc

[PATCH 1/9] drm/amd/display: Add a left edge pixel if in YCbCr422 or YCbCr420 and odm

2024-11-19 Thread Alex Hung
ucher Cc: sta...@vger.kernel.org Reviewed-by: George Shen Signed-off-by: Peterson Guo Signed-off-by: Alex Hung --- .../dc/resource/dcn20/dcn20_resource.c| 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource

[PATCH 2/9] drm/amd/display: Enable EASF based on luma taps only

2024-11-19 Thread Alex Hung
-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index 73a65913cb12..27fd20fa2942 100644 --- a/drivers/gpu/drm/amd

[PATCH 8/9] drm/amd/display: Add hblank borrowing support

2024-11-19 Thread Alex Hung
g Liu Signed-off-by: Chris Park Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/core/dc_resource.c | 42 ++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dc/dc_spl_translate.c | 2 +- .../dc/dml2/dml21/dml21_translation_helper.c

[PATCH 7/9] drm/amd/display: Limit VTotal range to max hw cap minus fp

2024-11-19 Thread Alex Hung
d-by: Anthony Koo Signed-off-by: Dillon Varone Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../dc/dml2/dml21/dml21_translation_helper.c | 27 +-- .../dc/resource/dcn30/dcn30_resource.c| 1 + .../dc/resource/dcn302/dcn302_resour

[PATCH 6/9] drm/amd/display: Correct prefetch calculation

2024-11-19 Thread Alex Hung
: Nicholas Kazlauskas Signed-off-by: Lo-an Chen Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c

[PATCH 3/9] drm/amd/display: Add disable_ips_in_dpms_off flag for IPS

2024-11-19 Thread Alex Hung
vidiu Bunea Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/dr

[PATCH 4/9] drm/amd/display: Add support for custom recout_width in SPL

2024-11-19 Thread Alex Hung
Signed-off-by: Samson Tam Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 8 +++-- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 31 ++- .../gpu/drm/amd/display/dc/spl/dc_spl_types.h | 10 -- 3 files changed, 37 insertions(+), 12 deletions

Re: [PATCH 1/2] drm/amd/display: Remove redundant check

2024-11-13 Thread Alex Hung
On 11/11/24 05:08, Bhavin Sharma wrote: The mode_422 variable is initialized to zero, making mode_422 ? 2 : 1 always false. Since is_dsc_possible is already checked just above, there's no need to check it again before filling out the DSC settings. Removing this redundant check simplifies the

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

2024-10-18 Thread Alex Hung
On 10/13/24 09:58, Simon Ser wrote: On Thursday, October 3rd, 2024 at 22:01, Harry Wentland wrote: 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

Re: [PATCH v8 0/5] drm/amd/display: Use drm_edid for more code

2024-10-04 Thread Alex Hung
No regressed found on this patchset series. Reviewed-by: Alex Hung On 9/27/24 17:05, Mario Limonciello wrote: From: Mario Limonciello This is the successor of Melissa's v5 series that was posted [1] as well as my series that was posted [2]. Melissa's patches are mostly unmodifi

Re: [PATCH v7 00/10] drm/amd/display: Use drm_edid for more code

2024-09-27 Thread Alex Hung
, and help from Mario to rebase is probably needed. As for the rest, let me know if you cannot reproduce these issues since you may or may not have the same hardware configs. Melissa On 27/09/2024 15:48, Alex Hung wrote: Hi Mario and Melissa, There are three regressions identified during the

Re: [PATCH v7 00/10] drm/amd/display: Use drm_edid for more code

2024-09-27 Thread Alex Hung
Hi Mario and Melissa, There are three regressions identified during the test, and improvement is required before the patches can be merged. Please see details below. 1. null pointer when hot-plugging a dsc hub (+ three 4k60 monitors). This may point to "drm/amd/display: use drm_edid_product_i

Re: [PATCH v7 07/10] drm/amd/display: get SAD from drm_eld when parsing EDID caps

2024-09-26 Thread Alex Hung
Mario and Melissa, Another regression identified on this patch - DP Display is not listed as an audio device after this patch is applied. Cheers, Alex Hung On 9/18/24 15:38, Mario Limonciello wrote: From: Melissa Wen drm_edid_connector_update() updates display info, filling ELD with

Re: [PATCH v7 09/10] drm/amd/display: remove dc_edid handler from dm_helpers_parse_edid_caps

2024-09-25 Thread Alex Hung
Mario and Melissa, This patch causes a regrerssion on 7900 XTX in an IGT test: amd_mem_leak's connector-suspend-resume. Is this patch necessary on this series or is it independent from other patches, i.e. can it be dropped from this series until fixed?? Cheers, Alex Hung On 9/18/24

Re: [PATCH v7 10/10] drm/amd/display: Fetch the EDID from _DDC if available for eDP

2024-09-19 Thread Alex Hung
A minor comment (see inline below). Otherwise Reviewed-by: Alex Hung On 2024-09-18 15:38, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the

[PATCH 23/23] drm/amd/display: 3.2.301

2024-09-11 Thread Alex Hung
dereferencing se Acked-by: Alex Hung Signed-off-by: Aric Cyr 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/amd/display/dc/dc.h index 78ebe636389e..3992ad73165b

[PATCH 22/23] drm/amd/display: Clear cached watermark after resume

2024-09-11 Thread Alex Hung
From: Charlene Liu [WHY] Driver could skip program watermarks when resume from S0i3/S4. [HOW] Clear the cached one first to make sure new value gets applied. Reviewed-by: Alvin Lee Reviewed-by: Roman Li Signed-off-by: Charlene Liu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 21/23] drm/amd/display: Update IPS default mode for DCN35/DCN351

2024-09-11 Thread Alex Hung
Reviewed-by: Sun peng Li Signed-off-by: Roman Li Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 --- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 20/23] drm/amd/display: Use full update for swizzle mode change

2024-09-11 Thread Alex Hung
eric transition behavior Separating the two flows to make (3) non-generic is the best immediate coarse of action. DC can discern SSAMPO3 very easily from SDE. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Chris Park Signed-off-by: Charlene Liu Signed-off-by: Alex

[PATCH 19/23] drm/amd/display: Skip to enable dsc if it has been off

2024-09-11 Thread Alex Hung
t DSC. [HOW] Check the DSC used on current pipe status when update stream. Skip to enable if it has been off. The operation enable DSC should happen when set power on. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Wenjing Liu Signed-off-by: Zhikai Zhai Signed-off-by:

[PATCH 18/23] drm/amd/display: Fix underflow when setting underscan on DCN401

2024-09-11 Thread Alex Hung
t is supposed to catch this corner case by adding a check based on the parameters in the stream Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Dillon Varone Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Hung --- .../drm/amd/displa

[PATCH 17/23] drm/amd/display: Remove always-false branches

2024-09-11 Thread Alex Hung
-by: Alex Hung Reviewed-by: Alvin Lee Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- .../amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c| 3 --- .../amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 3 --- .../drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 9 -

[PATCH 16/23] drm/amd/display: Check null pointer before dereferencing se

2024-09-11 Thread Alex Hung
[WHAT & HOW] se is null checked previously in the same function, indicating it might be null; therefore, it must be checked when used again. This fixes 1 FORWARD_NULL issue reported by Coverity. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- drivers/gpu

[PATCH 15/23] drm/amd/display: 3.2.300

2024-09-11 Thread Alex Hung
vtotal Reviewed-by: Alex Hung Signed-off-by: Aric Cyr 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/amd/display/dc/dc.h index 133cac4d9fc4..e659f4fed19f

[PATCH 14/23] drm/amd/display: Add HDMI DSC native YCbCr422 support

2024-09-11 Thread Alex Hung
y: Chris Park Signed-off-by: Leo Ma Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 3 ++- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 5 +++-- 3 files changed, 7 ins

[PATCH 13/23] drm/amd/display: Add fullscreen only sharpening policy

2024-09-11 Thread Alex Hung
From: Relja Vojvodic [WHAT & HOW] Disable sharpening if not in fullscreen if this policy is selected Reviewed-by: Samson Tam Signed-off-by: Relja Vojvodic Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 3 +++ drivers/gpu/drm/amd/display/dc

[PATCH 12/23] drm/amd/display: Restructure dpia link training

2024-09-11 Thread Alex Hung
Signed-off-by: Peichen Huang Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c | 21 + drivers/gpu/drm/amd/display/dc/dc.h | 6 +- .../amd/display/dc/link/hwss/link_hwss_dpia.c | 31 ++- .../dc/link/protocols/link_dp_training.c | 80

[PATCH 11/23] drm/amd/display: Disable SYMCLK32_LE root clock gating

2024-09-11 Thread Alex Hung
-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c i

[PATCH 10/23] drm/amd/display: Clean up dsc blocks in accelerated mode

2024-09-11 Thread Alex Hung
: Charlene Liu Signed-off-by: Martin Tsai Signed-off-by: Alex Hung --- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 50 +++ 1 file changed, 50 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110

[PATCH 09/23] drm/amd/display: Block dynamic IPS2 on DCN35 for incompatible FW versions

2024-09-11 Thread Alex Hung
e Liu Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c| 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/

[PATCH 08/23] drm/amd/display: Add debug options to change sharpen policies

2024-09-11 Thread Alex Hung
From: Samson Tam [WHY] Add options to change sharpen policy based on surface format and scaling ratios. [HOW] Add sharpen_policy to change policy based on surface format and scale_to_sharpness_policy based on scaling ratios. Reviewed-by: Jun Lei Signed-off-by: Samson Tam Signed-off-by: Alex

[PATCH 07/23] drm/amd/display: Block timing sync for different output formats in pmo

2024-09-11 Thread Alex Hung
From: Dillon Varone [WHY & HOW] If the output format is different for HDMI TMDS signals, they are not synchronizable. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Signed-off-by: Dillon Varone Signed-off-by: Alex Hung --- .../dc/dml2/dml21

[PATCH 06/23] drm/amd/display: Enable DML2 override_det_buffer_size_kbytes

2024-09-11 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Yihan Zhu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 1 + 2 files changed, 2 insertions(+) diff

[PATCH 05/23] drm/amd/display: Add dmub hpd sense callback

2024-09-11 Thread Alex Hung
-off-by: Alex Hung --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 04/23] drm/amd/display: Emulate Display Hotplug Hang

2024-09-11 Thread Alex Hung
-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c index f770828df149..0e243f4344d0 100644 --- a

[PATCH 03/23] drm/amd/display: Implement new DPCD register handling

2024-09-11 Thread Alex Hung
as normal. Reviewed-by: Wenjing Liu Signed-off-by: Ryan Seto Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 12 drivers/gpu/drm/amd/display/dc/dc_dsc.h | 1 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10

[PATCH 02/23] drm/amd/display: Use SDR white level to calculate matrix coefficients

2024-09-11 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Jun Lei Signed-off-by: Samson Tam Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c| 12 drivers/gpu/drm/amd/display/dc/dc.h | 3 +++ .../gpu/drm/amd/display/dc/dc_spl_translate.c | 9 + drivers/gpu/drm/amd

[PATCH 01/23] drm/amd/display: Round calculated vtotal

2024-09-11 Thread Alex Hung
From: Robin Chen [WHY] The calculated vtotal may has 1 line deviation. To get precisely vtotal number, round the vtotal result. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Anthony Koo Signed-off-by: Robin Chen Signed-off-by: Alex Hung --- drivers/gpu/drm

[PATCH 00/23] DC Patches Sept 11, 2024

2024-09-11 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: - Fixes on DCN35, DCN401 and IPS - Enhancements in DMUB and DSC - Misc fixes for Coverity errors Cc: Daniel Wheeler Alex Hung (2): drm/amd/display: Check null pointer before dereferencing se drm/amd/display

Re: [PATCH v4 09/11] drm/amd/display: get SAD from drm_eld when parsing EDID caps

2024-07-29 Thread Alex Hung
On 2024-07-28 20:02, Melissa Wen wrote: On 07/25, Alex Hung wrote: On 2024-07-05 21:35, Melissa Wen wrote: instead of parsing struct edid. A more informative commit message will be helpful. sure. I'll improve it in the next version. A soft reminder - a few other patches

Re: [PATCH v4 01/11] drm/amd/display: clean unused variables for hdmi freesync parser

2024-07-29 Thread Alex Hung
On 2024-07-28 19:32, Melissa Wen wrote: On 07/25, Alex Hung wrote: Hi Melissa, There are no commit messages in this patch. Also, do you think this can be merged with Patch 5 "drm/amd/display: remove redundant freesync parser for DP"? Hi Alex, Thanks for your feedback. I'

Re: [PATCH v4 10/11] drm/amd/display: get SADB from drm_eld when parsing EDID caps

2024-07-25 Thread Alex Hung
On 2024-07-05 21:35, Melissa Wen wrote: instead of parsing struct edid. A more informative commit message will be helpful. Signed-off-by: Melissa Wen --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --gi

Re: [PATCH v4 09/11] drm/amd/display: get SAD from drm_eld when parsing EDID caps

2024-07-25 Thread Alex Hung
On 2024-07-05 21:35, Melissa Wen wrote: instead of parsing struct edid. A more informative commit message will be helpful. Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

Re: [PATCH v4 07/11] drm/amd/display: don't give initial values for sad/b_count

2024-07-25 Thread Alex Hung
Can this be merged with [PATCH 10/11] drm/amd/display: get SADB from drm_eld when parsing EDID caps On 2024-07-05 21:35, Melissa Wen wrote: Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

Re: [PATCH v4 03/11] drm/amd/display: switch to setting physical address directly

2024-07-25 Thread Alex Hung
On 2024-07-05 21:35, Melissa Wen wrote: Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 ins

Re: [PATCH v4 02/11] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-07-25 Thread Alex Hung
. It was only exercised with IGT tests. v2: use const to fix warnings (Alex Hung) v3: fix general protection fault on mst v4: rename edid to drm_edid in amdgpu_connector (Jani) call drm_edid_connector_update to clear edid in case of NULL (Jani) keep setting NULL instead of free drm_edid

Re: [PATCH v4 01/11] drm/amd/display: clean unused variables for hdmi freesync parser

2024-07-25 Thread Alex Hung
Hi Melissa, There are no commit messages in this patch. Also, do you think this can be merged with Patch 5 "drm/amd/display: remove redundant freesync parser for DP"? On 2024-07-05 21:35, Melissa Wen wrote: Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Re: [PATCH v2] drm/amd/display: Add NULL check for clk_mgr in dcn32_init_hw

2024-07-22 Thread Alex Hung
Reviewed-by: Alex Hung On 2024-07-22 05:14, Srinivasan Shanmugam wrote: This commit addresses a potential null pointer dereference issue in the `dcn32_init_hw` function. The issue could occur when `dc->clk_mgr` is null. The fix adds a check to ensure `dc->clk_mgr` is not null before acc

  1   2   3   4   5   >