Re: [PATCH] drm/amd/display: disable SG displays on cyan skillfish

2024-10-04 Thread Harry Wentland
y default. It can > still be enabled by setting sg_display=1 for those that > want to play with it. These systems also generally had large > carve outs so SG display was less of a factor. > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3356 > Signed-off-by: Alex Deucher

Re: [PATCH v5 00/44] Color Pipeline API w/ VKMS

2024-10-03 Thread Harry Wentland
On 2024-08-27 13:49, Louis Chauvet wrote: > Le 19/08/24 - 16:56, Harry Wentland a écrit : >> This is an RFC set for a color pipeline API, along with implementations >> in VKMS and amdgpu. It is tested with a set of IGT tests that can be >> found at [1]. The IGT tests

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2024-10-03 Thread Harry Wentland
From: Alex Hung This introduces a new drm_colorop_type: DRM_COLOROP_MULTIPLIER. It's a simple multiplier to all pixel values. The value is specified via a S31.32 fixed point provided via the "MULTIPLIER" property. Signed-off-by: Alex Hung --- drivers/gpu/drm/drm_atomic.c | 3 +++ driver

[PATCH v6 26/44] drm/amd/display: Skip color pipeline initialization for cursor plane

2024-10-03 Thread Harry Wentland
From: Alex Hung Signed-off-by: Alex Hung --- 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/amd/display/amdgpu_dm/amdgpu_dm_plane.c index 22ff9a31b592..1bfb

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

2024-10-03 Thread Harry Wentland
-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: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 20 +-- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c

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

2024-10-03 Thread Harry Wentland
the following 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 --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 168

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

2024-10-03 Thread Harry Wentland
SIZE property which 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 Signed-off-by: Harry Wentland Co-develop

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

2024-10-03 Thread Harry Wentland
plane-XR30-XR30-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

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

2024-10-03 Thread Harry Wentland
-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/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers

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

2024-10-03 Thread Harry Wentland
of as EOTF (electro-optical transfer function). 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/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c index

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

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

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

2024-10-03 Thread Harry Wentland
kms_colorop --run plane-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 Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland

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

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

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

2024-10-03 Thread Harry Wentland
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: Harry Wentland --- drivers/gpu/drm/drm_colorop.c | 2 ++ include/drm/drm_colorop.h

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

2024-10-03 Thread Harry Wentland
consists of a single colorop: 1. 1D curve colorop w/ sRGB EOTF Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland --- v6: - cleanup if colorop alloc or init fails .../gpu/drm/amd/display/amdgpu_dm/Makefile| 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_color.c

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

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

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

2024-10-03 Thread Harry Wentland
e'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. Signed-off-by: Harry Wentland --- v6: - use clamp_val instead of manual clamping (Louis Chauvet) v4: - Clarify that we're pack

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

2024-10-03 Thread Harry Wentland
-srgb_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 3. 1D curve colorop w/ sRGB EOTF support Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland

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

2024-10-03 Thread Harry Wentland
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 --- v6: - drop 'len' var (Louis Chauvet) - cleanup if colorop alloc or init fails (Louis C

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

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

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

2024-10-03 Thread Harry Wentland
A whole slew of tests for CTM handling that greatly helped in debugging the CTM code. The extent of tests might seem a bit silly but they're fast and might someday help save someone else's day when debugging this. Signed-off-by: Harry Wentland --- v6: - update reference values since

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

2024-10-03 Thread Harry Wentland
2fixp 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. Signed-off-by: Harry Wentland --- v6: - add missing MODULE_DESCRIPTION (Jeff Johnson) - fix buffer ove

[PATCH v6 19/44] drm/vkms: add 3x4 matrix in color pipeline

2024-10-03 Thread Harry Wentland
s 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: Harry Wentland --- v6: - pre-compute colors (Louis Chauvet) -

[PATCH v6 03/44] drm/vkms: Add kunit tests for VKMS LUT handling

2024-10-03 Thread 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 Signed-off-by: Harry Wentland Cc: Arthur Grillo --- v6: - Eliminate need to include test as .c file (Louis Chauvet) v5: - Bring back static for lerp_u16

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

2024-10-03 Thread Harry Wentland
TA property for property types that need it. 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 for creating 3x4 CTM colorop - Fix CTM indexes in

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

2024-10-03 Thread Harry Wentland
ll as set the desired one. The color pipelines are programmed via properties on the actual drm_colorop objects. Signed-off-by: Harry Wentland --- v4: - Add pipeline property creation helper (Pekka) - Fix function comment for drm_atomic_set_colorop_for_plane (Pekka) - Always create Bypass pip

[PATCH v6 09/44] drm/colorop: Add BYPASS property

2024-10-03 Thread 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: Harry Wentland --- v6: - clarify that bypass is only valid if BYPASS prop exists (Louis Chauvet) drivers/gpu/drm/drm_atomic_uapi.c | 6 +- drivers/gpu/drm

[PATCH v6 16/44] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2024-10-03 Thread Harry Wentland
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: Harry Wentland --- v5: - Fix kernel docs v4: - Don't block setting of COLOR_RANGE and COLOR_ENCODI

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

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/tests/vkms_color_test.c | 38 +++- drivers/gpu/drm/vkms/vkms_composer.c | 15 ++-- drivers/gpu/drm/vkms/vkms_composer.h | 13 +++ 3 files changed, 53 insertions(+), 13 deletions(-) diff --git a

[PATCH v6 13/44] drm/colorop: Add NEXT to colorop state print

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland --- v5: - Drop unused header definitions v3: - Read NEXT ID from drm_colorop's next pointer drivers/gpu/drm/drm_atomic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 12e787e

[PATCH v6 07/44] drm/colorop: Add 1D Curve subtype

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Co-developed-by: Alex Hung --- v5: - Add drm_get_colorop_curve_1d_type_name in header - Add drm_colorop_init - Set default curve - Add kernel docs v4: - Use drm_colorop_curve_1d_type_enum_list to get name (Pekka) - Create separate

[PATCH v6 10/44] drm/colorop: Add NEXT property

2024-10-03 Thread 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: Harry Wentland --- v5: - move next comment here from Add 3x4 CTM patch

[PATCH v6 05/44] drm/colorop: Introduce new drm_colorop mode object

2024-10-03 Thread 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: Harry Wentland --- v6: - Comment that

[PATCH v6 11/44] drm/colorop: Add atomic state print for drm_colorop

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 44c5b5dd8b33..0f4eba51ee4b 100644 --- a/drivers/gpu/drm/drm_atomic.c

[PATCH v6 01/44] drm: Add helper for conversion from signed-magnitude

2024-10-03 Thread 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 insertions(+) diff

[PATCH v6 08/44] Documentation/gpu: document drm_colorop

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland --- v5: - Drop TODO Documentation/gpu/drm-kms.rst | 15 +++ drivers/gpu/drm/drm_colorop.c | 31 +++ 2 files changed, 46 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index

[PATCH v6 00/44] Color Pipeline API w/ VKMS

2024-10-03 Thread Harry Wentland
some issues with applying LUTs in VKMS Cc: Ville Syrjala Cc: 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 Brekenfel

[PATCH v6 06/44] drm/colorop: Add TYPE property

2024-10-03 Thread 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: Harry Wentland --- v6: - fix doc typo (Alex Hung) v5:

[PATCH v6 04/44] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2024-10-03 Thread Harry Wentland
Signed-off-by: Harry Wentland --- v5: - Don't require BYPASS to succeed (Sebastian) - use DATA for 1D and 3D LUT types (Sebastian) - update 3DLUT ops to use 3DLUT_MODES and 3DLUT_MODE_INDEX - Add section on drm_colorop extensibility - Add color_pipeline.rst to RFC toc tree v4: -

[PATCH v6 02/44] drm/vkms: Round fixp2int conversion in lerp_u16

2024-10-03 Thread Harry Wentland
fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. 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 --git a/drivers/gpu/drm/vkms/vkms_composer.c b

Re: [PATCH v5 00/44] Color Pipeline API w/ VKMS

2024-10-03 Thread Harry Wentland
On 2024-09-10 16:37, Alex Goins wrote: > Hi Harry, > > Thanks for this. I just want to remind about a few things that would be > required > for NVIDIA hardware, as discussed at the Display Next Hackfest -- fully > understand that they aren't currently included in this series because they > aren't

Re: [PATCH 25/35] drm/amd/display: Reorganize kerneldoc parameter names

2024-09-30 Thread Harry Wentland
2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Harry Wentland Harry > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c > b/drivers/gpu/drm/amd/display/dc/core/dc.c > index 5c39390ecbd5..417fe508c57f 100644 > --- a/drivers/gpu/drm/amd/display/dc/

Re: [PATCH] drm/display/dsc: Refactor MST DSC Determination Policy

2024-09-20 Thread Harry Wentland
On 2024-09-20 01:56, Jani Nikula wrote: > On Thu, 19 Sep 2024, Fangzhi Zuo wrote: >> [why] >> How we determine the dsc_aux used for dsc decompression in >> drm_dp_mst_dsc_aux_for_port() today having some defects: >> >> 1. The method how we determine a connected peer device is virtual or not >>

Re: [PATCH] drm/amd/display: Allow backlight to go below `AMDGPU_DM_DEFAULT_MIN_BACKLIGHT`

2024-09-16 Thread Harry Wentland
27;t prevent the backlight > brightness from going that low. > > Cc: Harry Wentland > Cc: Thomas Weißschuh > Link: > https://lore.kernel.org/amd-gfx/be04226a-a9e3-4a45-a83b-6d263c655...@t-8ch.de/T/#m400dee4e2fc61fe9470334d20a7c8c89c9aef44f > Signed-off-by: Mario Li

Re: [PATCH v6 2/4] drm/amd/display: Add support for minimum backlight quirk

2024-09-16 Thread Harry Wentland
On 2024-08-26 12:57, Mario Limonciello wrote: > On 8/24/2024 13:33, Thomas Weißschuh wrote: >> Not all platforms provide the full range of PWM backlight capabilities >> supported by the hardware through ATIF. >> Use the generic drm panel minimum backlight quirk infrastructure to >> override the

Re: [PATCH] drm/amd/display: Validate backlight caps are sane

2024-09-13 Thread Harry Wentland
On 2024-09-13 14:51, Mario Limonciello wrote: > On 9/13/2024 13:47, Harry Wentland wrote: >> >> >> On 2024-09-13 14:00, Mario Limonciello wrote: >>> Currently amdgpu takes backlight caps provided by the ACPI tables >>> on systems as is.  If the firmware

Re: [PATCH] drm/amd/display: Validate backlight caps are sane

2024-09-13 Thread Harry Wentland
On 2024-09-13 14:00, Mario Limonciello wrote: > Currently amdgpu takes backlight caps provided by the ACPI tables > on systems as is. If the firmware sets maximums that are too low > this means that users don't get a good experience. > > To avoid having to maintain a quirk list of such systems

Re: [PATCH] drm/amd/display: Add all planes on CRTC to state for overlay cursor

2024-09-11 Thread Harry Wentland
Closes: > https://lore.kernel.org/lkml/f68020a3-c413-482d-beb2-5432d98a1...@amd.com > Signed-off-by: Leo Li > Tested-by: Mikhail Gavrilov Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++ > 1 file changed, 11 insertions(+) &

[PATCH] drm/colorop: get DATA blob ref at duplicate_state

2024-09-10 Thread Harry Wentland
Signed-off-by: Harry Wentland --- It was a stupid mistake on my part. The duplicate_state function needs to take a reference to the blob. This should fix it. Please give it a try if you can. I'll roll it into the patch that introduces the bug in my v6. Harry drivers/gpu/drm/drm_colorop.

Re: [PATCH v5 00/44] Color Pipeline API w/ VKMS

2024-09-09 Thread Harry Wentland
gamut mapping). > Here's a branch that generates the color pipeline each frame and > triggers this: > https://invent.kde.org/plasma/kwin/-/commits/work/zamundaaa/drm-colorop-list-add-corruption > Thanks for the test branch. Got a repro and will investigate. Harry > > >

Re: [PATCH] drm/amdgpu/atomfirmware: Silence UBSAN warning

2024-09-09 Thread Harry Wentland
On 2024-09-09 13:19, Alex Deucher wrote: > Ping? > > Alex > > On Fri, Sep 6, 2024 at 12:43 PM Alex Deucher > wrote: >> >> Per the comments, these are variable sized arrays. >> >> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613 >>

Re: [PATCH 0/2] drm/amd: fix VRR race condition during IRQ handling

2024-09-09 Thread Harry Wentland
On 2024-09-09 13:11, Alex Deucher wrote: > On Sun, Sep 8, 2024 at 7:23 AM Tobias Jakobi > wrote: >> >> On 9/8/24 09:35, Christopher Snowhill wrote: >> >>> On Mon Sep 2, 2024 at 2:40 AM PDT, tjakobi wrote: From: Tobias Jakobi Hello, this fixes a nasty race condition in

Re: [PATCH] drm/amd/display: Do not reset planes based on crtc zpos_changed

2024-09-06 Thread Harry Wentland
-ordering: > > Plane A: zpos 2 -> 1 > Plane B: zpos 1 -> 2 > => Plane A changed from on top, to below plane B: reset needed > > Fixes: 38e0c3df6dbd ("drm/amd/display: Move PRIMARY plane zpos higher") > Closes: https://gitlab.freedesktop.org/drm/am

Re: [PATCH v5 19/44] drm/vkms: add 3x4 matrix in color pipeline

2024-09-06 Thread Harry Wentland
On 2024-08-27 13:49, Louis Chauvet wrote: > Le 19/08/24 - 16:56, Harry Wentland a écrit : >> We add two 3x4 matrices into the VKMS color pipeline. The reason >> we're adding matrices is so that we can test that application >> of a matrix and its inverse yields an

Re: [PATCH 2/2] drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()

2024-09-03 Thread Harry Wentland
; > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3142 > Fixes: 06ad7e164256 ("drm/amd/display: Destroy DC context while keeping DML > and DML2") > Signed-off-by: Tobias Jakobi Reviewed-by: Harry Wentland Harry > --- > .../amd/display/dc/hwss/dcn35/

Re: [PATCH 1/2] drm/amd/display: Avoid race between dcn10_set_drr() and dc_state_destruct()

2024-09-03 Thread Harry Wentland
; > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3142 > Fixes: 06ad7e164256 ("drm/amd/display: Destroy DC context while keeping DML > and DML2") > Signed-off-by: Tobias Jakobi Thanks for this fix. It also makes the code more readable. Reviewed-by: Harry Went

Re: [RESEND 3/3] drm/amd/display: switch to guid_gen() to generate valid GUIDs

2024-08-28 Thread Harry Wentland
g it into drm mst code. >>> >>> Yeah ec5fa9fcdeca ("drm/amd/display: Adjust the MST resume flow") promised >>> a follow-up, but that seems to have never materialized. Really should >>> materialize though. Patch lgtm >>> >>> Reviewed-by:

Re: [PATCH v5 03/44] drm/vkms: Add kunit tests for VKMS LUT handling

2024-08-28 Thread Harry Wentland
On 2024-08-27 13:49, Louis Chauvet wrote: > Le 19/08/24 - 16:56, Harry Wentland a écrit : > > [...] > >> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c >> b/drivers/gpu/drm/vkms/vkms_composer.c >> index 3d6785d081f2..3ecda70c2b55 100644 >> --- a/

Re: [PATCH] drm/amd/display: Determine IPS mode by ASIC and PMFW versions

2024-08-27 Thread Harry Wentland
ion to determine whether the SBIOS has the > fix. If not, set IPS1+RCG as the deepest possible state in all cases > except for s0ix and display off (DPMS). Otherwise, enable all IPS > > Signed-off-by: Leo Li Reviewed-by: Harry Wentland Harry > --- > .../gpu/drm/amd/di

Re: [PATCH v4 0/3] faster vblank disable

2024-08-22 Thread Harry Wentland
in the wild, it should be easy to bisect the issue to > those patches. > With an updated description for patch 1 that calls out the new behavior this series is Reivewed-by: Harry Wentland Harry > > Hamza Mahfooz (3): > drm/amd/display: use drm_crtc_vblank_on_config() > drm

Re: [PATCH v4 1/3] drm/amd/display: use drm_crtc_vblank_on_config()

2024-08-22 Thread Harry Wentland
On 2024-08-22 11:58, Hamza Mahfooz wrote: > Hook up drm_crtc_vblank_on_config() in amdgpu_dm. So, that we can enable > PSR and other static screen optimizations more quickly, while avoiding > stuttering issues that are accompanied by the following dmesg error: > > [drm:dc_dmub_srv_wait_idle [am

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

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

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

2024-08-19 Thread Harry Wentland
ZE on drm_crtc (Melissa) Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 4 +++ drivers/gpu/drm/drm_atomic_uapi.c | 5 drivers/gpu/drm/drm_colorop.c | 47 +-- include/drm/drm_colo

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

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

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

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

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

2024-08-19 Thread Harry Wentland
plane-XR30-XR30-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

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

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

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

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

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

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

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

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

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

2024-08-19 Thread Harry Wentland
the following 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 --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 170

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

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

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

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

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

2024-08-19 Thread Harry Wentland
consists of a single colorop: 1. 1D curve colorop w/ sRGB EOTF Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland --- .../gpu/drm/amd/display/amdgpu_dm/Makefile| 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 88 +++ .../amd/display

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

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

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

2024-08-19 Thread Harry Wentland
of as EOTF (electro-optical transfer function). v5: - Add kernel docs 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/drm_colorop.c b/drivers/gpu/drm

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

2024-08-19 Thread Harry Wentland
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: Harry Wentland --- drivers/gpu/drm/drm_colorop.c | 2 ++ include/drm/drm_colorop.h

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

2024-08-19 Thread Harry Wentland
-srgb_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 3. 1D curve colorop w/ sRGB EOTF support Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland

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

2024-08-19 Thread Harry Wentland
-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/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers

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

2024-08-19 Thread Harry Wentland
kms_colorop --run plane-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 Signed-off-by: Harry Wentland Co-developed-by: Harry Wentland

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

2024-08-19 Thread Harry Wentland
-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: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 20 +-- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c

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

2024-08-19 Thread Harry Wentland
enc matrix (Pekka) - Use full opaque alpha (Pekka) - Add additional check for Y < 0x (Pekka) - Remove unused code (Pekka) - Rename red, green, blue to Y, U, V where applicable Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 251 ++ 1 file

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

2024-08-19 Thread Harry Wentland
ction declaration (Chaitanya Kumar Borah) Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 46 drivers/gpu/drm/drm_atomic_state_helper.c | 5 +++ drivers/gpu/drm/drm_atomic_uapi.c | 42 ++ drivers/gpu/drm/drm_pl

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

2024-08-19 Thread Harry Wentland
2fixp 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. Signed-off-by: Harry Wentland --- drivers/gpu/drm/tests/Makefile| 3 +- drivers/gpu/drm/tests/drm_fixp_t

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

2024-08-19 Thread Harry Wentland
: Harry Wentland --- 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 4a9cb1f7dbf7..39805f822d44 100644 --- a/drivers/gpu

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

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

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

2024-08-19 Thread Harry Wentland
or_pipeline init function - Pass supported TFs into colorop init - Create bypass pipeline in DRM helper (Pekka) v2: - Add commit description - Fix sRGB EOTF LUT definition - Add linear and sRGB inverse EOTF LUTs Signed-off-by: Harry Wentland Signed-off-by: Alex Hung --- drivers/gpu/drm/v

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

2024-08-19 Thread Harry Wentland
colorop->next pointer Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/vkms_composer.c | 55 ++-- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++ 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/g

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

2024-08-19 Thread Harry Wentland
TA property for property types that need it. v5: - Add function signature for init (Sebastian) - Fix kernel-doc v4: - Create helper function for creating 3x4 CTM colorop - Fix CTM indexes in comment (Pekka) Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 14 ++-

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

2024-08-19 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 37 ++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_tests.c b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c index fc73e48aa57c..e6ac01dee830

[PATCH v5 26/44] drm/amd/display: Skip color pipeline initialization for cursor plane

2024-08-19 Thread Harry Wentland
From: Alex Hung Signed-off-by: Alex Hung --- 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/amd/display/amdgpu_dm/amdgpu_dm_plane.c index d260db42d407..8fc0

[PATCH v5 10/44] drm/colorop: Add NEXT property

2024-08-19 Thread Harry Wentland
ow setting of NEXT property to NULL (Chaitanya Kumar Borah) v3: - Add next pointer to colorop to be used by drivers and in DRM core Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_colorop.c | 30 ++ include/drm/drm_colorop.h | 20 +++

[PATCH v5 19/44] drm/vkms: add 3x4 matrix in color pipeline

2024-08-19 Thread Harry Wentland
s 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: Harry Wentland --- drivers/gpu/drm/vkms/vkms_colorop.c

  1   2   3   4   5   6   7   8   9   10   >