Re: [PATCH 1/5] drm/amd: Introduce additional IPS debug flags

2024-08-19 Thread Harry Wentland
On 2024-08-16 18:57, sunpeng...@amd.com wrote: > From: Leo Li > > [Why] > > Idle power states (IPS) describe levels of power-gating within DCN. DM > and DC is responsible for ensuring that we are out of IPS before any DCN > programming happens. Any DCN programming while we're in IPS leads to

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

2024-08-19 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 v5 02/44] drm/vkms: Round fixp2int conversion in lerp_u16

2024-08-19 Thread Harry Wentland
fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Harry Wentland --- 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/drivers/gpu/drm/vkms

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

2024-08-19 Thread Harry Wentland
in color_pipeline.rst doc - Add support for sRGB inverse EOTF - Add 2nd enumerated TF colorop to VKMS - Fix LUTs and 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

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

2024-08-19 Thread Harry Wentland
Signed-off-by: Harry Wentland --- 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 abfe220764e1..2292e65f044c

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

2024-08-19 Thread Harry Wentland
v5: - Drop unused header definitions v3: - Read NEXT ID from drm_colorop's next pointer Signed-off-by: Harry Wentland --- 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 d333433

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

2024-08-19 Thread Harry Wentland
ity" section (Sebastian, Pekka) Signed-off-by: Harry Wentland --- Documentation/gpu/rfc/color_pipeline.rst | 376 +++ Documentation/gpu/rfc/index.rst | 3 + 2 files changed, 379 insertions(+) create mode 100644 Documentation/gpu/rfc/color_pipeline.rst

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

2024-08-19 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 b09db9835e1f..096460d38545 100644 --- a/drivers/gpu/drm/drm_atomic.c

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

2024-08-19 Thread Harry Wentland
L definitions (Pekka) - add missing declaration (Chaitanya Kumar Borah) v3: - Drop TODO for lock (it's handled in drm_modeset_drop_locks) (Melissa) - Don't get plane state when getting colorop state - Make some functions static (kernel test robot) Signed-off-by: Harry Wentland

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

2024-08-19 Thread Harry Wentland
: Harry Wentland Signed-off-by: Alex Hung Co-developed-by: Alex Hung --- drivers/gpu/drm/drm_atomic_uapi.c | 18 ++-- drivers/gpu/drm/drm_colorop.c | 134 ++ include/drm/drm_colorop.h | 60 + 3 files changed, 207 insertions(+), 5 deletions

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

2024-08-19 Thread Harry Wentland
We want to be able to bypass each colorop at all times. Introduce a new BYPASS boolean property for this. v5: - Drop TODO Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic_uapi.c | 6 +- drivers/gpu/drm/drm_colorop.c | 15 +++ include/drm/drm_colorop.h

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

2024-08-19 Thread Harry Wentland
drm_colorop_type to uapi header - Fix drm_get_colorop_type_name description For now we're only introducing an enumerated 1D LUT type to illustrate the concept. Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 4 ++-- drivers/gpu/drm/drm_atomic_uapi.c | 8 +++- drivers/gp

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

2024-08-19 Thread Harry Wentland
testing static functions (Arthur) Signed-off-by: Harry Wentland Cc: Arthur Grillo --- drivers/gpu/drm/vkms/Kconfig | 5 + drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 163 ++ drivers/gpu/drm/vkms

[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

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

2024-08-19 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. v5: - Fix kernel docs v4: - Don't block setting of COLOR_RANGE and COLOR_ENCODING when client cap is set Signed-off

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 40/44] drm/colorop: Define LUT_1D interpolation

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

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

2024-08-19 Thread Harry Wentland
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 38/44] drm/amd/display: add multiplier colorop

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

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

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

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

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

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

2024-08-19 Thread Harry Wentland
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 44/44] drm/amd/display: Add AMD color pipeline doc

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

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

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

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

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

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

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

[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] 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(+) &

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: 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 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: 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] drm/amd/display: only call sysfs_remove_group() for eDP connectors

2024-02-05 Thread Harry Wentland
16 ("drm/amd/display: add panel_power_savings sysfs entry to > eDP connectors") > Signed-off-by: Hamza Mahfooz Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >

Re: [PATCH] drm/amd/display: Clear phantom stream count and plane count

2024-02-06 Thread Harry Wentland
On 2024-02-05 08:54, Deucher, Alexander wrote: > [Public] > > > [Public] > > > Acked-by: Alex Deucher > Reviewed-by

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-15 Thread Harry Wentland
On 2024-02-02 11:20, Mario Limonciello wrote: > On 2/2/2024 09:28, Hamza Mahfooz wrote: >> We want programs besides the compositor to be able to enable or disable >> panel power saving features. However, since they are currently only >> configurable through DRM properties, that isn't possible. So,

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-16 Thread Harry Wentland
On 2024-02-16 03:19, Pekka Paalanen wrote: > On Fri, 2 Feb 2024 10:28:35 -0500 > Hamza Mahfooz wrote: > >> We want programs besides the compositor to be able to enable or disable >> panel power saving features. > > Could you also explain why, in the commit message, please? > > It is unexpect

Re: [PATCH] drm/amd: Only allow one entity to control ABM

2024-02-16 Thread Harry Wentland
d 2 look okay. 3 and 4 can be quite impactful, both to power and visual fidelity. Harry > Regards, > Christian. > >> >>> >>> Regards, >>> Christian. >>> >>>> 0-4: User via command line >>>> >>>> Also introduce a K

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-16 Thread Harry Wentland
On 2024-02-16 10:42, Pekka Paalanen wrote: > On Fri, 16 Feb 2024 09:33:47 -0500 > Harry Wentland wrote: > >> On 2024-02-16 03:19, Pekka Paalanen wrote: >>> On Fri, 2 Feb 2024 10:28:35 -0500 >>> Hamza Mahfooz wrote: >>> >>>> We want p

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-16 Thread Harry Wentland
On 2024-02-16 11:11, Harry Wentland wrote: > > > On 2024-02-16 10:42, Pekka Paalanen wrote: >> On Fri, 16 Feb 2024 09:33:47 -0500 >> Harry Wentland wrote: >> >>> On 2024-02-16 03:19, Pekka Paalanen wrote: >>>> On Fri, 2 Feb 2024 10:28:35 -0500

Re: [PATCH] drm/amd: Drop abm_level property

2024-02-16 Thread Harry Wentland
drm/amd/display: add panel_power_savings sysfs entry to > eDP connectors") > Suggested-by: Harry Wentland > Signed-off-by: Mario Limonciello > -- > Cc: Hamza Mahfooz > Cc: Sun peng (Leo) Li Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/amdgpu/amdgpu

[RFC PATCH v4 03/42] drm: Correctly round for fixp2int_round

2024-02-26 Thread Harry Wentland
e if/else to round up or down. This helps people like me to understand what the function does. Signed-off-by: Harry Wentland --- include/drm/drm_fixed.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h index

[RFC PATCH v4 00/42] Color Pipeline API w/ VKMS

2024-02-26 Thread Harry Wentland
orop to VKMS - Fix LUTs and 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

[RFC PATCH v4 01/42] drm: Don't treat 0 as -1 in drm_fixp2int_ceil

2024-02-26 Thread Harry Wentland
Unit testing this in VKMS shows that passing 0 into this function returns -1, which is highly counter- intuitive. Fix it by checking whether the input is >= 0 instead of > 0. Fixes: 64566b5e767f9 ("drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil") Signed-off-by: Harry Wentl

[RFC PATCH v4 06/42] drm/vkms: Add kunit tests for VKMS LUT handling

2024-02-26 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 v4: - Test the critical points of the lerp function (Pekka) v3: - Use include way of testing static functions (Arthur) Signed-off-by: Harry Wentland Cc

[RFC PATCH v4 07/42] drm/vkms: Avoid reading beyond LUT array

2024-02-26 Thread Harry Wentland
value Fixes: db1f254f2cfaf ("drm/vkms: Add support to 1D gamma LUT") Signed-off-by: Harry Wentland Cc: Arthur Grillo Reviewed-by: Melissa Wen --- drivers/gpu/drm/vkms/vkms_composer.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drive

[RFC PATCH v4 05/42] drm/vkms: Create separate Kconfig file for VKMS

2024-02-26 Thread Harry Wentland
This aligns with most other DRM drivers and will allow us to add new VKMS config options without polluting the DRM Kconfig. v3: - Change SPDX to GPL-2.0-only to match DRM KConfig SPDX (Simon) Signed-off-by: Harry Wentland Reviewed-by: Simon Ser --- drivers/gpu/drm/Kconfig | 14

[RFC PATCH v4 12/42] drm/colorop: Add BYPASS property

2024-02-26 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 --- drivers/gpu/drm/drm_atomic_uapi.c | 6 +- drivers/gpu/drm/drm_colorop.c | 16 include/drm/drm_colorop.h | 20

[RFC PATCH v4 18/42] drm/vkms: Add kunit tests for linear and sRGB LUTs

2024-02-26 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

[RFC PATCH v4 04/42] drm/vkms: Round fixp2int conversion in lerp_u16

2024-02-26 Thread Harry Wentland
fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Harry Wentland --- 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/drivers/gpu/drm/vkms

[RFC PATCH v4 16/42] drm/colorop: Add NEXT to colorop state print

2024-02-26 Thread Harry Wentland
v3: - Read NEXT ID from drm_colorop's next pointer Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 1 + include/drm/drm_colorop.h| 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 27a8805

[RFC PATCH v4 22/42] drm/vkms: Use s32 for internal color pipeline precision

2024-02-26 Thread Harry Wentland
colorop->next pointer Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/vkms_composer.c | 57 +--- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++ 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/g

[RFC PATCH v4 17/42] drm/vkms: Add enumerated 1D curve colorop

2024-02-26 Thread Harry Wentland
x sRGB EOTF LUT definition - Add linear and sRGB inverse EOTF LUTs Signed-off-by: Harry Wentland Signed-off-by: Alex Hung --- drivers/gpu/drm/vkms/Makefile| 4 +- drivers/gpu/drm/vkms/vkms_colorop.c | 70 +++ drivers/gpu/drm/vkms/vkms_composer.c | 45 ++ drivers/gpu/drm/vkms/vkms_d

[RFC PATCH v4 23/42] drm/vkms: add 3x4 matrix in color pipeline

2024-02-26 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

[RFC PATCH v4 28/42] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2024-02-26 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

[RFC PATCH v4 09/42] drm/colorop: Introduce new drm_colorop mode object

2024-02-26 Thread Harry Wentland
declaration (Chaitanya Kumar Borah) v3: - Drop TODO for lock (it's handled in drm_modeset_drop_locks) (Melissa) - Don't get plane state when getting colorop state - Make some functions static (kernel test robot) Signed-off-by: Harry Wentland --- drivers/gpu/drm/Makefile

[RFC PATCH v4 11/42] drm/colorop: Add 1D Curve subtype

2024-02-26 Thread Harry Wentland
v4: - Use drm_colorop_curve_1d_type_enum_list to get name (Pekka) - Create separate init function for 1D curve - Pass supported TFs into 1D curve init function Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Co-developed-by: Alex Hung --- drivers/gpu/drm/drm_atomic_uapi.c | 18

[RFC PATCH v4 14/42] drm/colorop: Add atomic state print for drm_colorop

2024-02-26 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 25 - include/drm/drm_colorop.h| 5 + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index b400e32c9d39..3645c36d63b3

[RFC PATCH v4 10/42] drm/colorop: Add TYPE property

2024-02-26 Thread Harry Wentland
For now we're only introducing an enumerated 1D LUT type to illustrate the concept. Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 4 +-- drivers/gpu/drm/drm_atomic_uapi.c | 8 +- drivers/gpu/drm/drm_colorop.c | 44 ++- includ

[RFC PATCH v4 24/42] drm/tests: Add a few tests around drm_fixed.h

2024-02-26 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

[RFC PATCH v4 25/42] drm/vkms: Add tests for CTM handling

2024-02-26 Thread Harry Wentland
aque 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 ++ drivers/gpu/drm/vkms/vkms_composer.c

[RFC PATCH v4 15/42] drm/plane: Add COLOR PIPELINE property

2024-02-26 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

[RFC PATCH v4 35/42] drm/amd/display: Enable support for PQ 125 EOTF and Inverse

2024-02-26 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

[RFC PATCH v4 21/42] drm/vkms: Pull apply_colorop out of pre_blend_color_transform

2024-02-26 Thread Harry Wentland
The if/switch statement is bound to grow with more types and subtypes. Pull this out into its own funcion to make things more manageable and readable. Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/vkms_composer.c | 48 1 file changed, 28 insertions(+), 20

[RFC PATCH v4 34/42] drm/colorop: Add PQ 125 EOTF and its inverse

2024-02-26 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 | 2 ++ 2 files ch

[RFC PATCH v4 19/42] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2024-02-26 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. v4: - Don't block setting of COLOR_RANGE and COLOR_ENCODING when client cap is set Signed-off-by: Harry Wentland --

[RFC PATCH v4 36/42] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2024-02-26 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 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c index 781947e42b02

[RFC PATCH v4 41/42] drm/colorop: Add mutliplier type

2024-02-26 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

[RFC PATCH v4 39/42] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT

2024-02-26 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

  1   2   3   4   5   6   7   8   9   10   >