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

2025-04-29 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 Reviewed-by: Daniel Stone --- v7: - Fix checkpatch warnings (Louis Chauvet) - Adde a commit messages - Fix code styles by

[PATCH V9 19/43] drm/tests: Add a few tests around drm_fixed.h

2025-04-29 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 Review

[PATCH V9 21/43] drm/colorop: pass plane_color_pipeline client cap to atomic check

2025-04-29 Thread Alex Hung
: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- 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

[PATCH V9 18/43] drm/vkms: add 3x4 matrix in color pipeline

2025-04-29 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 V9 20/43] drm/vkms: Add tests for CTM handling

2025-04-29 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 V9 22/43] drm/colorop: define a new macro for_each_new_colorop_in_state

2025-04-29 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 Reviewed-by: Daniel Stone --- include/drm/drm_atomic.h | 20 1 file changed, 20 insertions(+) diff --git a/include/drm

[PATCH V9 24/43] drm/amd/display: Add bypass COLOR PIPELINE

2025-04-29 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 Reviewed-by: Daniel Stone --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 19 +++ 1 file changed

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

2025-04-29 Thread Alex Hung
cursor plane does not need to have color pipeline. Signed-off-by: Alex Hung Reviewed-by: Daniel Stone --- 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

[PATCH V9 23/43] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2025-04-29 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 Reviewed-by: Daniel Stone --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1

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

2025-04-29 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 Reviewed-by: Daniel Stone --- V9: - Update function names by _plane_ (Chaitanya Kumar Borah) - Update replace cleanup code by drm_colorop_pipeline_destroy (Simon Ser

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

2025-04-29 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 Reviewed-by: Daniel

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

2025-04-29 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 Reviewed-by: Daniel Stone

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

2025-04-29 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 Reviewed-by: Daniel Stone --- v8: - Move BIT

[PATCH V9 29/43] drm/colorop: Add PQ 125 EOTF and its inverse

2025-04-29 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel

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

2025-04-29 Thread Alex Hung
-bt2020_oetf Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- V9: - Move DRM_COLOROP_1D_CURVE_BT2020_* from middle to end v8: - Move BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) in amdgpu_dm_supported_blnd_tfs to "drm/amd/display: Enable support for P

[PATCH V9 31/43] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2025-04-29 Thread Alex Hung
transfer function) instead of as EOTF (electro-optical transfer function). Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- V9: - Move DRM_COLOROP_1D_CURVE_BT2020_* from middle to end (Simon Ser) drivers/gpu/drm/drm_colorop.c | 2 ++ include/drm/drm_colorop.h

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

2025-04-29 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 Reviewed-by: Daniel Stone --- V9: - Update function names by _plane_ (Chaitanya Kumar

[PATCH V9 36/43] drm/colorop: Add mutliplier type

2025-04-29 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 Reviewed-by: Daniel Stone --

[PATCH V9 37/43] drm/amd/display: add multiplier colorop

2025-04-29 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 Reviewed-by: Daniel Stone --- V9: - Update function names by _plane_ (Chaitanya Kumar Borah) .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 40

[PATCH V9 35/43] drm/amd/display: add 3x4 matrix colorop

2025-04-29 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 Reviewed-by: Daniel

[PATCH V9 33/43] drm/colorop: Add 1D Curve Custom LUT type

2025-04-29 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Co-developed-by: Harry Wentland S

[PATCH V9 38/43] drm/amd/display: Swap matrix and multiplier

2025-04-29 Thread Alex Hung
Swap the order of matrix and multiplier as designed in hardware. Signed-off-by: Alex Hung Reviewed-by: Daniel Stone --- V9: - Update function names by _plane_ (Chaitanya Kumar Borah) .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 12 ++-- .../drm/amd/display/amdgpu_dm

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

2025-04-29 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harr

[PATCH V9 40/43] drm/colorop: allow non-bypass colorops

2025-04-29 Thread Alex Hung
From: Harry Wentland Not all HW will be able to do bypass on all color operations. Introduce an 32 bits 'flags' for all colorop init functions and DRM_COLOROP_FLAG_ALLOW_BYPASS for creating the BYPASS property when it's true. Signed-off-by: Alex Hung Signed-off-by: Harry Wentla

[PATCH V9 39/43] drm/colorop: Define LUT_1D interpolation

2025-04-29 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 V9 41/43] drm/colorop: Add 3D LUT support to color pipeline

2025-04-29 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Reviewed-by: Daniel Stone --- V9: - Update function names by _plane_ (Chaitanya Kumar Borah) v8

[PATCH V9 42/43] drm/amd/display: add 3D LUT colorop

2025-04-29 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 Reviewed-by: Daniel Stone --- V9: - Return a value in

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

2025-04-29 Thread Alex Hung
From: Harry Wentland Add kernel doc for AMD color pipeline. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 122 +++--- 1 file changed, 102 insertions(+), 20 deletions(-) diff --git a/drivers

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

2025-04-29 Thread Alex Hung
c: Pekka 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: Christop

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

2025-04-29 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 Reviewed-by: Daniel Stone --- include/drm/dr

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

2025-04-29 Thread Alex Hung
From: Harry Wentland Add documentation for color pipeline API. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- V9: - Update documents according to new 3DLUT changes (Simon Ser) - Spell out the behaviours when fallback to shaders/CPU (Simon Ser) v8

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

2025-04-29 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 Reviewed-by: Daniel Stone

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

2025-04-29 Thread Alex Hung
-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- 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

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

2025-04-29 Thread Alex Hung
igned-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- 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

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

2025-04-29 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

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

2025-04-29 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. Reviewed-by: Simon Ser Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Daniel Stone --- V9: - Remove redundant comments (Simon Ser) v8:

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

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

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

2025-04-29 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 Reviewed-by: Daniel Stone --- v6: - clarify that bypass

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

2025-04-16 Thread Alex Hung
Reviewed-by: Alex Hung On 4/13/25 21:14, 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

Re: [PATCH v2] drm/amd/display: adds kernel-doc comment for dc_stream_remove_writeback()

2025-05-05 Thread Alex Hung
Reviewed-by: Alex Hung On 5/3/25 15:18, James Flowers wrote: Adds kernel-doc for externally linked dc_stream_remove_writeback function. Signed-off-by: James Flowers --- V1 -> V2: Corrected checkpatch warnings and errors drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 8 1 f

Re: [PATCH 2/4] drm/amd/display: Use optc31_disable_crtc for DCN 31 and 401

2025-05-05 Thread Alex Hung
On 5/4/25 16:11, Rodrigo Siqueira wrote: DCN401 and DCN31 share the same implementation for disabling CRTC. This commit makes DCN401 use the DCN31 implementation and removes the code duplication in the DCN401. Hi Rodrigo optc31_disable_crtc is not the same as optc401_disable_crtc. Please see

Re: [PATCH v2] drm/amd/display/dc/irq: Remove duplications of hpd_ack function from IRQ

2025-05-05 Thread Alex Hung
Thanks. I will send this patch for testing. Note I still see a warning of mismatch of author and SOB as below, but that can be fixed to "Sebastian Aguilera Novoa " manually after testing and before merging. $ ./scripts/checkpatch.pl v2-drm-amd-display-dc-irq-Remove-duplications-of-hpd_ack-fu

Re: [PATCH] drm/amd/display: Don't check for NULL divisor in fixpt code

2025-05-05 Thread Alex Hung
Reviewed-by: Alex Hung On 4/28/25 15:34, Harry Wentland wrote: [Why] We check for a NULL divisor but don't act on it. This check does nothing other than throw a warning. It does confuse static checkers though: See https://lkml.org/lkml/2025/4/26/371 [How] Drop the ASSERTs in both DC an

Re: [PATCH 2/4] drm/amd/display: Use optc31_disable_crtc for DCN 31 and 401

2025-05-05 Thread Alex Hung
On 5/5/25 10:32, Mario Limonciello wrote: On 5/5/2025 11:27 AM, Alex Hung wrote: On 5/4/25 16:11, Rodrigo Siqueira wrote: DCN401 and DCN31 share the same implementation for disabling CRTC. This commit makes DCN401 use the DCN31 implementation and removes the code duplication in the DCN401

Re: [PATCH] drm/amd/display: Use true/false for boolean variables in DML2 core files

2025-05-05 Thread Alex Hung
Reviewed-by: Alex Hung On 4/24/25 09:14, Ivan Shamliev wrote: From 694c017112d176af07c2a65f015a8e73d6895e81 Mon Sep 17 00:00:00 2001 From: Ivan Shamliev Date: Thu, 24 Apr 2025 11:00:08 +0300 Subject: [PATCH] drm/amd/display: Use true/false for boolean variables in DML2 core files Replace

Re: [PATCH 18/28] drm/amd/display: Remove unnecessary DC_FP_START/DC_FP_END

2025-04-29 Thread Alex Hung
On 4/29/25 09:04, Alex Deucher wrote: On Mon, Apr 28, 2025 at 9:57 AM Ray Wu wrote: From: Alex Hung [WHY & HOW] Remove the unnecessary DC_FP_START/DC_FP_END pair to reduce time in preempt_disable. It also fixes "BUG: sleeping function called from invalid context" error me

Re: [PATCH RESEND] drm/amd/display: adds kernel-doc comment for dc_stream_remove_writeback()

2025-05-02 Thread Alex Hung
Hi James, checkpatch reports the following warning and error WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #18: Adds a kernel-doc for externally linked dc_stream_remove_writeback() function. ERROR: trailing whitespace #39: FILE: drivers/gpu/drm/amd/dis

Re: [PATCH] drm/amd/display/dc/irq: Remove duplications of hpd_ack function from IRQ

2025-05-02 Thread Alex Hung
Hi, Thanks for fixing this. However, I think checkpatch reports some warnings, including spacing warning and a mismatch author name vs SOB as below. Once they are fixed in V2 I will send them to test. $ ./scripts/checkpatch.pl drm-amd-display-dc-irq-Remove-duplications-of-hpd_ack-function-f

Re: [PATCH v2 4/5] drm/amd/display: Add support for custom brightness curve

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: Some systems specify in the firmware a brightness curve that better reflects the characteristics of the panel used. This is done in the form of data points and matching luminance percentage. When converting a userspace

Re: [PATCH v2 2/5] drm/amd: Pass luminance data to amdgpu_dm_backlight_caps

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: The ATIF method on some systems will provide a backlight curve. Pass this curve into amdgpu_dm add it to the structures. Signed-off-by: Mario Limonciello --- v2: * Keep ACPI and DM structures separate * Add static asserts

Re: [PATCH v2 3/5] drm/amd/display: Avoid operating on copies of backlight caps

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: Making a copy of the backlight caps structure between uses is unnecessary. Refer to pointers to the same structure when using it. Signed-off-by: Mario Limonciello --- v2: * Add fix for !CONFIG_ACPI --- .../gpu/drm/amd

Re: [PATCH v2 1/5] drm/amd: Copy entire structure in amdgpu_acpi_get_backlight_caps()

2025-03-03 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: As new members are introduced to the structure copying the entire structure will help avoid missing them. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 +- 1 file changed, 1 insertion

Re: [PATCH v2 5/5] drm/amd/display: Add a new dcdebugmask to allow turning off brightness curve

2025-03-01 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: Upgrading the kernel may cause some systems that were previously not using a firmware specified brightness curve to use one. In the event of problems with this curve (for example an interpolation error) add a new dcdebugmask

Re: [PATCH 1/2] drm/amd/display: Add a temp w/a for a panel

2025-03-03 Thread Alex Hung
This has conflicts to latest asdn and a minor spacing issue below. The others look good to me. Reviewed-by: Alex Hung On 3/3/25 06:50, Aurabindo Pillai wrote: Implement w/a for a panel which requires 10s delay after link detect. Signed-off-by: Aurabindo Pillai --- .../gpu/drm/amd/display

Re: [PATCH 2/2] drm/amd/display: use drm_* instead of DRM_ in apply_edid_quirks()

2025-03-03 Thread Alex Hung
Reviewed-by: Alex Hung On 3/3/25 06:50, Aurabindo Pillai wrote: drm_* macros are more helpful that DRM_* macros since the former indicates the associated DRM device that prints the error, which maybe helpful when debugging. Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display

Re: [PATCH 0/4] drm/amd/display: move from kzalloc(size * nr, ...) to kcalloc(nr, size, ...)

2025-03-06 Thread Alex Hung
This series LGTM too. Reviewed-by: Alex Hung On 2/27/25 16:16, Ethan Carter Edwards wrote: We are trying to get rid of all multiplications from allocation functions to prevent integer overflows. Here the multiplications are probably safe, but using kcalloc() is more appropriate and improves

[PATCH] drm/amd/display: Remove incorrect macro guard

2025-03-11 Thread Alex Hung
This macro guard "__cplusplus" is unnecessary and should not be there. Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h b/drivers/gpu/drm/amd/display/dc/ssp

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

2025-02-27 Thread Alex Hung
On 2/25/25 03:13, Louis Chauvet wrote: Le 20/12/2024 à 05:33, Alex Hung a écrit : 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

Re: [PATCH 3/5] drm/amd/display: Avoid operating on copies of backlight caps

2025-02-28 Thread Alex Hung
On 2/21/25 10:10, Mario Limonciello wrote: Making a copy of the backlight caps structure between uses is unnecessary. Refer to pointers to the same structure when using it. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 --- 1 file

[PATCH 05/11] drm/amd/display: Change notification of link BW allocation

2025-03-11 Thread Alex Hung
HPD IRQ for the notification. Reviewed-by: Meenakshikumar Somasundaram Signed-off-by: Cruise Hung Signed-off-by: Alex Hung --- .../drm/amd/display/dc/core/dc_link_exports.c | 9 +- drivers/gpu/drm/amd/display/dc/dc.h | 16 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 - dri

[PATCH 04/11] drm/amd/display: Fix message for support_edp0_on_dp1

2025-03-11 Thread Alex Hung
From: Yilin Chen [WHY] The info message was wrong when support_edp0_on_dp1 is enabled [HOW] Use correct info message for support_edp0_on_dp1 Fixes: c1037b2ed7ba ("drm/amd/display: add a quirk to enable eDP0 on DP1") Reviewed-by: Aurabindo Pillai Signed-off-by: Yilin Chen Signed-of

[PATCH 11/11] drm/amd/display: 3.2.325

2025-03-11 Thread Alex Hung
uot; - Change notification of link BW allocation - Fix message for support_edp0_on_dp1 - Guard against setting dispclk low for dcn31x - Prevent VStartup Overflow - Check pipe->stream before passing it to a function Acked-by: Alex Hung Signed-off-by: Taimur Hassan Signed-off-by: Alex Hung --- dri

[PATCH 06/11] drm/amd/display: Revert "Support for reg inbox0 for host->DMUB CMDs"

2025-03-11 Thread Alex Hung
From: Dillon Varone This reverts commit b4a8503f69c214987b30cb7d8c3399d50477adac. Reason: Cursor movement causes system to hang. Reviewed-by: Aric Cyr Signed-off-by: Dillon Varone Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 185 +-- drivers/gpu/drm

[PATCH 03/11] drm/amd/display: Guard against setting dispclk low for dcn31x

2025-03-11 Thread Alex Hung
special value in this logic (ie. no dispclk required) we also need adjust the logic that clamps it for the actual request to PMFW. Reviewed-by: Charlene Liu Reviewed-by: Chris Park Reviewed-by: Eric Yang Signed-off-by: Jing Zhou Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Hung

[PATCH 00/11] DC Patches March 11, 2025

2025-03-11 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Fixes on DCN31 and DML2; * Enhancements in DMUB; * Improvements on DP, eDP and others. Cc: Daniel Wheeler Alex Hung (1): drm/amd/display: Check pipe->stream before passing it to a function Charlene Liu

[PATCH 02/11] drm/amd/display: Prevent VStartup Overflow

2025-03-11 Thread Alex Hung
From: Ryan Seto [WHY & HOW] Fixed Overflow issue by clamping VStartup to max value of register. Reviewed-by: Alvin Lee Signed-off-by: Ryan Seto Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dri

[PATCH 07/11] drm/amd/display: Use HW lock mgr for PSR1 when only one eDP

2025-03-11 Thread Alex Hung
amd/-/issues/3965 Cc: sta...@vger.kernel.org Reviewed-by: ChiaHsuan Chung Signed-off-by: Mario Limonciello Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock

[PATCH 08/11] drm/amd/display: Fix incorrect fw_state address in dmub_srv

2025-03-11 Thread Alex Hung
From: Lo-an Chen [WHY] The fw_state in dmub_srv was assigned with wrong address. The address was pointed to the firmware region. [HOW] Fix the firmware state by using DMUB_DEBUG_FW_STATE_OFFSET in dmub_cmd.h. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Lo-an Chen Signed-off-by: Alex Hung

[PATCH 01/11] drm/amd/display: Check pipe->stream before passing it to a function

2025-03-11 Thread Alex Hung
[WHAT & HOW] dp_is_128b_132b_signal dereferences pipe->stream so it is necessary to check it in advance. Also fix erroneous spaces and move a variable declaration to top. Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung --- .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.

[PATCH 10/11] drm/amd/display: Use DPM table clk setting for dml2 soc dscclk

2025-03-11 Thread Alex Hung
From: Charlene Liu [WHY] Not like dppclk/dispclk, dml2 will calculate the minimum required clocks. For dscclk, it is used for pure comparision. Reviewed-by: Alvin Lee Signed-off-by: Charlene Liu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 2

Re: [RFC PATCH 2/7] drm/amd/display: start using drm_edid helpers to parse EDID caps

2025-03-13 Thread Alex Hung
On 3/8/25 07:26, Melissa Wen wrote: Groundwork that allocates a temporary drm_edid from raw edid to take advantage of DRM common-code helpers instead of driver-specific code. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 11 +-- 1 file chan

Re: [RFC PATCH 0/7] drm/amd/display: more DRM edid common-code to the display driver

2025-03-13 Thread Alex Hung
The series look fine to me, except one small error in patch 2. I can send this series to promotion tests once the error is addressed. Let me also check others for comments. Hi Harry and Leo, Do you have other concerns before I sent this series to promotion tests? On 3/8/25 07:26, Melissa Wen

[PATCH 09/11] drm/amd/display: Update static soc table

2025-03-11 Thread Alex Hung
From: Charlene Liu [WHY] Update the static soc table dcn3_5_soc. Reviewed-by: Alvin Lee Signed-off-by: Charlene Liu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

Re: [PATCH] drm/amd/display: Remove incorrect macro guard

2025-03-12 Thread Alex Hung
On 3/12/25 02:11, Christian König wrote: Am 11.03.25 um 18:10 schrieb Alex Hung: This macro guard "__cplusplus" is unnecessary and should not be there. Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [PATCH v2] drm/amd/display: restore edid reading from a given i2c adapter

2025-02-21 Thread Alex Hung
Reviewed-by: Alex Hung On 2/15/25 14:15, Melissa Wen wrote: When switching to drm_edid, we slightly changed how to get edid by removing the possibility of getting them from dc_link when in aux transaction mode. As MST doesn't initialize the connector with `drm_connector_init_wit

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

2025-02-24 Thread Alex Hung
On 2/24/25 09:07, Louis Chauvet wrote: Le 20/12/2024 à 05:33, Alex Hung a écrit : 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

Re: [PATCH v2] drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters()

2025-02-26 Thread Alex Hung
On 2/26/25 04:10, Vitaliy Shevtsov wrote: There is a type mismatch between what CalculateDynamicMetadataParameters() takes and what is passed to it. Currently this function accepts several args as signed long but it's called with unsigned integers. On some systems where long is 32 bits and one

Re: [PATCH v2] drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params

2025-02-26 Thread Alex Hung
Reviewed-by: Alex Hung On 2/26/25 01:37, Ma Ke wrote: Null pointer dereference issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure 'pipe_ctx->plane_state' is not null before accessing. This prevents a null pointer dereference. Found by code

Re: [PATCH v3] drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters()

2025-02-26 Thread Alex Hung
Reviewed-by: Alex Hung On 2/26/25 13:28, Vitaliy Shevtsov wrote: There is a type mismatch between what CalculateDynamicMetadataParameters() takes and what is passed to it. Currently this function accepts several args as signed long but it's called with unsigned integers and integer. On

Re: [PATCH] drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params

2025-02-25 Thread Alex Hung
On 2/23/25 23:32, Ma Ke wrote: Null pointer dereference issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure 'pipe_ctx->plane_state' is not null before accessing. This prevents a null pointer dereference. Found by code review. Cc: sta...@vger.kernel.org Fixes:

Re: [PATCH] drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters()

2025-02-25 Thread Alex Hung
On 2/22/25 16:58, Vitaliy Shevtsov wrote: There is a type mismatch between what CalculateDynamicMetadataParameters() takes and what is passed to it. Currently this function accepts several args as signed long but it's called with unsigned integers. On some systems where long is 32 bits and one

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

2025-03-31 Thread Alex Hung
https://elixir.bootlin.com/linux/v6.13/source/Documentation/gpu/amdgpu/display/mpo-overview.rst#L101 Best regards, Shengyu For some unknown reason, seems my mail is not shown in the mail list archive, so I resent it. 在 2025/3/27 7:47, Alex Hung 写道: cursor plane does not need to have color pipeline. Signe

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

2025-03-31 Thread Alex Hung
a dedicated plane? This scenario is not supported on AMD hardware, but software cursors on other plane types won't be affected. Best regards, Shengyu 在 2025/3/31 22:28, Alex Hung 写道: On 3/30/25 06:59, Shengyu Qu wrote: Hi, Do we really need to disable cursor plane color pipeline su

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

2025-03-31 Thread Alex Hung
, but this discussion is out of the scope. 在 2025/4/1 0:06, Alex Hung 写道: On 3/31/25 09:43, Shengyu Qu wrote: Hi, Thanks for reply. So currently we have to apply color conversion on the background plane of the cursor to do some color space conversion. What would happen if cursor and backg

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

2025-03-31 Thread Alex Hung
On 3/31/25 10:24, Shengyu Qu wrote: 在 2025/3/27 7:46, 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

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 10:31, Shengyu Qu wrote: Sorry for vague expression. I mean that I think we shouldn't register DRM_PLANE_TYPE_CURSOR in the driver, as we don't have actual hardware support. This is not true. AMD has hardware cursor support. 在 2025/4/1 0:26, Alex Hung 写道: On 3/3

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

2025-03-31 Thread Alex Hung
defined. 在 2025/4/1 0:34, Alex Hung 写道: On 3/31/25 10:31, Shengyu Qu wrote: Sorry for vague expression. I mean that I think we shouldn't register DRM_PLANE_TYPE_CURSOR in the driver, as we don't have actual hardware support. This is not true. AMD has hardware cursor suppor

Re: [PATCH] drm/amd/display: Remove the redundant NULL check

2025-04-02 Thread Alex Hung
Reviewed-by: Alex Hung On 4/2/25 08:21, Ваторопин Андрей wrote: From: Andrey Vatoropin Static analysis shows that pointer "timing" cannot be NULL because it points to the object "struct dc_crtc_timing". Remove the extra NULL check. It is meaningless and harms the rea

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

2025-04-04 Thread Alex Hung
On 3/31/25 12:53, Xaver Hugl wrote: Cursor plane has no color pipeline and thus it has no colorop either. It inherits color processing from its parent plane. Just to be sure: That means amdgpu will reject atomic commits that try to set a color pipeline on the primary plane while showing the

Re: [PATCH] drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp

2025-05-09 Thread Alex Hung
Reviewed-by: Alex Hung On 4/30/25 08:11, Melissa Wen wrote: Similar to commit 6a057072ddd1 ("drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe") that addresses a null pointer dereference on dcn20_update_dchubp_dpp. This is the same functi

Re: [PATCH 0/5] drm/amd/display: remove code duplication on dcn401

2025-05-12 Thread Alex Hung
Hi Melissa, The patchset looks good to me but there is WIP dcn401 code, meaning dcn20 and dcn401 are different. I will check how to refactor code so this patchset can fit better. Thanks On 4/30/25 08:20, Melissa Wen wrote: Hi, I've been examining dcn401 code to figure out what is causing a

Re: [PATCH v2] drm/amd/display/dc/irq: Remove duplications of hpd_ack function from IRQ

2025-05-09 Thread Alex Hung
Reviewed-by: Alex Hung On 5/5/25 12:20, Alex Hung wrote: Thanks. I will send this patch for testing. Note I still see a warning of mismatch of author and SOB as below, but that can be fixed to "Sebastian Aguilera Novoa " manually after testing and before merging. $ ./scripts/che

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

2025-05-12 Thread Alex Hung
On 4/25/25 07:50, Leandro Ribeiro wrote: On 3/26/25 20:47, Alex Hung wrote: 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

Re: [PATCH V9 42/43] drm/amd/display: add 3D LUT colorop

2025-05-12 Thread Alex Hung
On 5/12/25 18:52, Melissa Wen wrote: On 04/29, Alex Hung wrote: 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

Re: [PATCH] drm/amd/display: only collect data if debug gamut_remap is available

2025-05-13 Thread Alex Hung
On 4/25/25 14:49, Melissa Wen wrote: Color gamut_remap state log may be not avaiable for some hw versions, so prevent null pointer dereference by checking it there is a function to collect data for this hw version. Signed-off-by: Melissa Wen --- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c

Re: [PATCH] Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"

2025-05-13 Thread Alex Hung
Reviewed-by: Alex Hung On 4/22/25 08:58, Melissa Wen wrote: This reverts commit 272e6aab14bbf98d7a06b2b1cd6308a02d4a10a1. Applying degamma curve to the cursor by default breaks Linux userspace expectation. On Linux, AMD display manager enables cursor degamma ROM just for implict sRGB on HW

Re: [PATCH v2] drm/amd/display: adds kernel-doc comment for dc_stream_remove_writeback()

2025-05-20 Thread Alex Hung
On 5/19/25 20:06, James wrote: On Mon, May 5, 2025, at 9:02 AM, Alex Hung wrote: Reviewed-by: Alex Hung On 5/3/25 15:18, James Flowers wrote: Adds kernel-doc for externally linked dc_stream_remove_writeback function. Signed-off-by: James Flowers --- V1 -> V2: Corrected checkpa

Re: [PATCH v2] drm/amd/display: only collect data if debug gamut_remap is available

2025-05-20 Thread Alex Hung
Reviewed-by: Alex Hung On 5/13/25 15:38, Melissa Wen wrote: Color gamut_remap state log may be not avaiable for some hw versions, so prevent null pointer dereference by checking if there is a function to collect data for this hw version. v2: - initialize is_gamut_remap_available (Alex H

Re: [PATCH] drm/amd/display: no 3D and blnd LUT as DPP color caps for DCN401

2025-05-20 Thread Alex Hung
Reviewed-by: Alex Hung On 4/29/25 16:39, Melissa Wen wrote: On 25/04/2025 17:52, Melissa Wen wrote: Match what is declared as DPP color caps with hw caps. DCN401 has MPC shaper+3D+blnd LUTs that are movable before and after blending (get from plane or stream), but no DPP shaper+3D+blend

Re: [PATCH] drm/amd/display: Add null pointer check for get_first_active_display()

2025-05-26 Thread Alex Hung
Reviewed-by: Alex Hung On 5/25/25 20:37, Wentao Liang wrote: The function mod_hdcp_hdcp1_enable_encryption() calls the function get_first_active_display(), but does not check its return value. The return value is a null pointer if the display list is empty. This will lead to a null pointer

<    1   2   3   4   5   6   7   >