Re: [PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-04-18 Thread Harry Wentland
Wayne Lin I haven't been deep in MST code in a while but this all looks pretty straightforward and good. Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- > drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +

Re: [PATCH v2 1/4] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check

2024-04-17 Thread Harry Wentland
On 2024-01-15 11:05, Andri Yngvason wrote: > From: Werner Sembach > > Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check that was performed in the > drm_mode_is_420_only() case, but not in the drm_mode_is_420_also() && > force_yuv420_output case. > > Without further knowledge if YCbCr 4:2:0 is

Re: [PATCH v2 2/4] drm/uAPI: Add "force color format" drm property as setting for userspace

2024-04-17 Thread Harry Wentland
I'm a bit late to the game but I don't think this is merged yet. On 2024-01-15 11:05, Andri Yngvason wrote: > From: Werner Sembach > > Add a new general drm property "force color format" which can be used > by userspace to tell the graphics driver which color format to use. > > Possible

Re: [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible

2024-04-16 Thread Harry Wentland
On 2024-04-16 04:01, Pekka Paalanen wrote: > On Mon, 15 Apr 2024 18:33:39 -0400 > Leo Li wrote: > >> On 2024-04-15 04:19, Pekka Paalanen wrote: >>> On Fri, 12 Apr 2024 16:14:28 -0400 >>> Leo Li wrote: >>> On 2024-04-12 11:31, Alex Deucher wrote: > On Fri, Apr 12, 2024 at 11:08 

Re: [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible

2024-04-04 Thread Harry Wentland
t. https://drmdb.emersion.fr/properties/4008636142/zpos Harry >> Note that libliftoff's algorithm is more complex than weston, since it >> searches >> harder, and suffers from that permutational explosion. But it solves that by >> trying high benefit arrangements first

Re: [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode

2024-03-28 Thread Harry Wentland
On 2024-03-28 11:48, Robert Mader wrote: Hi, On 15.03.24 18:09, sunpeng...@amd.com wrote: From: Leo Li [Why] DCN is the display hardware for amdgpu. DRM planes are backed by DCN hardware pipes, which carry pixel data from one end (memory), to the other (output encoder). Each DCN pipe

Re: [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode

2024-03-21 Thread Harry Wentland
no overlay mode is > requested, then fallback to native mode. > > Signed-off-by: Leo Li We should run this through our usual testing cycle, and I need to go over it a bit more closely than I have, but I like it, so it's Acked-by: Harry Wentland Harry > --- > .../gpu/drm/a

Re: [PATCH 2/2] drm/amd/display: Move PRIMARY plane zpos higher

2024-03-21 Thread Harry Wentland
54) beneath the PRIMARY. > > [How] > > Assign a zpos = #no of OVERLAY planes to the PRIMARY plane. Then, clean > up any assumptions in the driver of PRIMARY plane having the lowest > zpos. > > Signed-off-by: Leo Li With the typo mentioned below fixes this is Reviewed-by: Harry Wen

Re: [PATCH 1/7] drm: Fix drm_fixp2int_round() making it add 0.5

2024-03-14 Thread Harry Wentland
On 2024-03-14 09:31, Melissa Wen wrote: > On 03/14, Melissa Wen wrote: >> On 03/13, Arthur Grillo wrote: >>> >>> >>> On 12/03/24 15:27, Melissa Wen wrote: On 03/06, Arthur Grillo wrote: > As well noted by Pekka[1], the rounding of drm_fixp2int_round is wrong. > To round a number,

Re: [PATCH 1/7] drm: Fix drm_fixp2int_round() making it add 0.5

2024-03-08 Thread Harry Wentland
/20240301135327.22efe0dd.pekka.paala...@collabora.com/ Suggested-by: Pekka Paalanen Signed-off-by: Arthur Grillo Reviewed-by: Harry Wentland I had a different jab at this [1], but your patch is cleaner. https://patchwork.freedesktop.org/patch/579978/?series=123446=4 Harry --- include/drm/drm_fixed.h | 2

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

2024-03-06 Thread Harry Wentland
On 2024-03-06 13:02, Mario Limonciello wrote: > On 3/6/2024 12:00, Xaver Hugl wrote: >> Am Mi., 6. März 2024 um 18:19 Uhr schrieb Mario Limonciello >> : >>> So the idea being if the compositor isn't using it we let >>> power-profiles-daemon (or any other software) take control via sysfs and >>>

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

2024-02-27 Thread Harry Wentland
On 2024-02-27 07:14, Arthur Grillo wrote: > > > On 26/02/24 18:10, Harry Wentland wrote: >> 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 >> >> v

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

2024-02-27 Thread Harry Wentland
On 2024-02-27 05:26, Joshua Ashton wrote: > > > On 2/26/24 21:10, Harry Wentland wrote: >> This is an RFC set for a color pipeline API, along with a sample >> implementation in VKMS. All the key API bits are here. VKMS now >> supports two named transfer funct

[RFC PATCH v4 32/42] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block

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

[RFC PATCH v4 31/42] drm/amd/display: Add support for sRGB EOTF in DEGAM block

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

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

[RFC PATCH v4 40/42] drm/amd/display: add 3x4 matrix colorop

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

[RFC PATCH v4 33/42] drm/amd/display: Add support for sRGB EOTF in BLND block

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

[RFC PATCH v4 42/42] drm/amd/display: add multiplier colorop

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

[RFC PATCH v4 08/42] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2024-02-26 Thread Harry Wentland
;Driver Forward/Backward Compatibility" section (Sebastian, Pekka) Signed-off-by: Harry Wentland --- Documentation/gpu/rfc/color_pipeline.rst | 360 +++ 1 file changed, 360 insertions(+) create mode 100644 Documentation/gpu/rfc/color_pipeline.rst diff --git a/D

[RFC PATCH v4 20/42] drm/colorop: Add 3x4 CTM type

2024-02-26 Thread Harry Wentland
A property for property types that need it. 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 ++- drivers/gpu/drm/drm_atomic_uapi.c | 29 ++ drive

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

2024-02-26 Thread Harry Wentland
of 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

[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 30/42] drm/amd/display: Skip color pipeline initialization for cursor plane

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

[RFC PATCH v4 38/42] drm/colorop: Add 1D Curve Custom LUT type

2024-02-26 Thread Harry Wentland
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-developed

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

2024-02-26 Thread Harry Wentland
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 changed

[RFC PATCH v4 02/42] drm: Add helper for conversion from signed-magnitude

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

[RFC PATCH v4 29/42] drm/amd/display: Add bypass COLOR PIPELINE

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

[RFC PATCH v4 37/42] drm/amd/display: Add support for BT.709 and BT.2020 TFs

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

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

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

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

2024-02-26 Thread Harry Wentland
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 | 32

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

2024-02-26 Thread Harry Wentland
(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 26/42] drm/colorop: pass plane_color_pipeline client cap to atomic check

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

[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 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 17/42] drm/vkms: Add enumerated 1D curve colorop

2024-02-26 Thread Harry Wentland
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_drv.h | 4

[RFC PATCH v4 27/42] drm/colorop: define a new macro for_each_new_colorop_in_state

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

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

2024-02-26 Thread Harry Wentland
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_test.c

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

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

2024-02-26 Thread Harry Wentland
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_plane.c

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

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

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

[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 13/42] drm/colorop: Add NEXT property

2024-02-26 Thread Harry Wentland
to be used by drivers and in DRM core Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_colorop.c | 29 + include/drm/drm_colorop.h | 20 2 files changed, 49 insertions(+) diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm

[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 ++- include/drm

[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 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 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 07/42] drm/vkms: Avoid reading beyond LUT array

2024-02-26 Thread Harry Wentland
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/drivers/gp

[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 03/42] drm: Correctly round for fixp2int_round

2024-02-26 Thread Harry Wentland
mple 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
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 Brekenfeld Cc: Sima

Re: UAPI Re: [PATCH 1/3] drm: Add DRM_MODE_TV_MODE_MONOCHROME

2024-02-21 Thread Harry Wentland
On 2024-02-21 04:07, Pekka Paalanen wrote: > On Fri, 16 Feb 2024 18:48:55 + > Dave Stevenson wrote: > >> From: Nick Hollinghurst >> >> Add this as a value for enum_drm_connector_tv_mode, represented >> by the string "Mono", to generate video with no colour encoding >> or bursts. Define

Re: [PATCH 00/28] Plane Color Pipeline support for Intel platforms

2024-02-16 Thread Harry Wentland
On 2024-02-13 01:48, Uma Shankar wrote: > This series intends to add support for Plane Color Management for > Intel platforms. This is based on the design which has been agreed > upon by the community. Series implementing the design for generic > DRM core has been sent out by Ha

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

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

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

2024-02-16 Thread Harry Wentland
n be quite impactful, both to power and visual fidelity. Harry > Regards, > Christian. > >> >>> >>> Regards, >>> Christian. >>> >>>> 0-4: User via command line >>>> >>>> Also introduce a Kconfig option that allows

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

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: [RFC 0/5] Introduce drm sharpening property

2024-02-15 Thread Harry Wentland
Adding a couple of compositor devs as they might be interested in this. On 2024-02-14 06:24, Nemesa Garg wrote: > Many a times images are blurred or upscaled content is also not as > crisp as original rendered image. Traditional sharpening techniques often > apply a uniform level of

Re: [PATCH v2 2/2] drm/amdgpu: Implement check_async_props for planes

2024-01-23 Thread Harry Wentland
On 2024-01-23 13:02, Xaver Hugl wrote: > Am Mo., 22. Jan. 2024 um 16:50 Uhr schrieb Harry Wentland > : >> >> >> >> On 2024-01-19 13:25, Ville Syrjälä wrote: >>> On Fri, Jan 19, 2024 at 03:12:35PM -0300, André Almeida wrote: >>>> AMD GPUs can

Re: [PATCH v2 2/2] drm/amdgpu: Implement check_async_props for planes

2024-01-22 Thread Harry Wentland
On 2024-01-19 13:25, Ville Syrjälä wrote: On Fri, Jan 19, 2024 at 03:12:35PM -0300, André Almeida wrote: AMD GPUs can do async flips with changes on more properties than just the FB ID, so implement a custom check_async_props for AMD planes. Allow amdgpu to do async flips with IN_FENCE_ID

Re: [PATCH v3 0/9] drm/amd/display: improve DTN color state log

2024-01-19 Thread Harry Wentland
67296 00 00 00 00 4294967296 00 > > DPP Color Caps: input_lut_shared:0 icsc:1 dgam_ram:1 dgam_rom: > srgb:1,bt2020:1,gamma2_2:0,pq:0,hlg:0 post_csc:0 gamcor:0 > dgam_rom_for_yuv:1 3d_lut:1 blnd_lut:1 oscs:0 > > MPCC:

Re: [RFC PATCH v3 21/23] drm/vkms: add 3x4 matrix in color pipeline

2024-01-04 Thread Harry Wentland
On 2023-12-08 08:11, Pekka Paalanen wrote: > On Wed, 8 Nov 2023 11:36:40 -0500 > Harry Wentland wrote: > >> 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 inv

Re: [RFC PATCH v3 23/23] drm/vkms: Add tests for CTM handling

2024-01-04 Thread Harry Wentland
On 2023-12-08 08:32, Pekka Paalanen wrote: > On Wed, 8 Nov 2023 11:36:42 -0500 > Harry Wentland wrote: > >> 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

Re: DRM TTM stack trace dump on ancient hardware

2024-01-04 Thread Harry Wentland
Oland is DCE 6 and won't default to DC. Harry On 2024-01-04 10:51, Christian König wrote: > Hi Olliver, > > well as long as you don't explicitly disable the support for the older hw > generations the R7 250 is still supported and should still work perfectly > fine. > > What you see here is

Re: [RFC PATCH v3 04/23] drm/vkms: Add kunit tests for VKMS LUT handling

2023-12-19 Thread Harry Wentland
On 2023-12-07 09:30, Pekka Paalanen wrote: > On Wed, 8 Nov 2023 11:36:23 -0500 > Harry Wentland wrote: > >> 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_u1

Re: [PATCH] drm/amd/display: fix cursor-plane-only atomic commits not triggering pageflips

2023-12-07 Thread Harry Wentland
On 2023-12-07 14:30, Xaver Hugl wrote: Sorry, it looks like I sent this too soon. I tested the patch on a second PC and it doesn't fix the issue there. Ah, too bad. Won't merge it then. Harry Am Do., 7. Dez. 2023 um 19:25 Uhr schrieb Xaver Hugl : With VRR, every atomic commit

Re: [PATCH] drm/amd/display: fix cursor-plane-only atomic commits not triggering pageflips

2023-12-07 Thread Harry Wentland
properties. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3034 Cc: sta...@vger.kernel.org Signed-off-by: Xaver Hugl Reviewed-by: Harry Wentland Harry --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v2 2/8] drm/amdgpu: Do not include

2023-12-05 Thread Harry Wentland
On 2023-12-04 04:07, Thomas Zimmermann wrote: > Remove unnecessary include statements for . > The file contains helpers for non-atomic code and should not be > required by most drivers. No functional changes. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Harry W

Re: [PATCH v5 00/32] drm/amd/display: add AMD driver-specific properties for color mgmt

2023-12-01 Thread Harry Wentland
On 2023-11-30 06:34, Daniel Vetter wrote: > On Tue, 28 Nov 2023 at 23:11, Harry Wentland wrote: >> >> On 2023-11-16 14:57, Melissa Wen wrote: >>> Hello, >>> >>> This series extends the current KMS color management API with AMD >>> driver-

Re: [PATCH v5 00/32] drm/amd/display: add AMD driver-specific properties for color mgmt

2023-11-28 Thread Harry Wentland
On 2023-11-16 14:57, Melissa Wen wrote: > Hello, > > This series extends the current KMS color management API with AMD > driver-specific properties to enhance the color management support on > AMD Steam Deck. The key additions to the color pipeline include: > snip > Melissa Wen (18): >

Re: [PATCH v5 09/32] drm/amd/display: add plane 3D LUT driver-specific properties

2023-11-17 Thread Harry Wentland
3D LUT max size as the size of a single-dimension v5: - get lut3d blob correctly (Joshua) - fix doc about 3d-lut dimension size (Sebastian) Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland We'll run this series through our testing. If that doesn't show problems and if I don't see any

Re: [PATCH v4 12/32] drm/amd/display: add CRTC gamma TF driver-specific property

2023-11-15 Thread Harry Wentland
word driver-specific function doc to remove shaper/3D LUT > > v3: > - spell out TF+LUT behavior in the commit and comments (Harry) > > Co-developed-by: Joshua Ashton > Signed-off-by: Joshua Ashton > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Harry > --- > driv

Re: [PATCH v4 11/32] drm/amd/display: add plane blend LUT and TF driver-specific properties

2023-11-15 Thread Harry Wentland
gt; pre-defined TF and the custom LUT values into the LUT that's actually > programmed. > > v3: > - spell out TF+LUT behavior in the commit and comments (Harry) > > Signed-off-by: Joshua Ashton > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Harry >

Re: [PATCH v4 10/32] drm/amd/display: add plane shaper LUT and TF driver-specific properties

2023-11-15 Thread Harry Wentland
per LUT and shaper TF > - define inverse EOTF as supported shaper TFs > > v3: > - spell out TF+LUT behavior in the commit and comments (Harry) > - replace BT709 EOTF by inv OETF > > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/am

Re: [PATCH v4 08/32] drm/amd/display: add plane HDR multiplier driver-specific property

2023-11-15 Thread Harry Wentland
ultiplier = 80 > nits for SDR content. So if you want, 203 nits for SDR content, pass in > (203.0 / 80.0). > > v4: > - comment about the PQ TF need for L-to-NL (from Harry's review) > > Signed-off-by: Joshua Ashton > Co-developed-by: Melissa Wen > Signed-off-by: M

Re: [PATCH v4 07/32] drm/amd/display: document AMDGPU pre-defined transfer functions

2023-11-15 Thread Harry Wentland
) > > v4: > - Add description of linear and non-linear forms (Harry) > > Co-developed-by: Harry Wentland > Signed-off-by: Harry Wentland > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Harry > --- > .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 62 +++

Re: [PATCH v4 06/32] drm/amd/display: explicitly define EOTF and inverse EOTF

2023-11-15 Thread Harry Wentland
zed transfer functions. > > v3: > - squash linear and unity TFs to identity (Pekka) > - define the right TFs for BT.709 (Pekka and Harry) > - add comment about AMD TF coefficients > > Suggested-by: Harry Wentland > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentla

Re: [PATCH 03/20] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: remove I2C_CLASS_DDC support

2023-11-13 Thread Harry Wentland
Please just use "drm/amd/display:" as tag in the commit subject. With that fixed, this is Acked-by: Harry Wentland Harry On 2023-11-13 06:23, Heiner Kallweit wrote: > After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in > olpc_dcon there's no i2c client driver

Re: [RFC PATCH 01/10] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2023-11-10 Thread Harry Wentland
On 2023-11-09 04:20, Pekka Paalanen wrote: On Wed, 8 Nov 2023 11:27:35 -0500 Harry Wentland wrote: On 2023-11-08 11:19, Pekka Paalanen wrote: On Wed, 8 Nov 2023 09:31:17 -0500 Harry Wentland wrote: On 2023-11-08 06:40, Sebastian Wick wrote: On Wed, Nov 8, 2023 at 11:16 AM Pekka

[RFC PATCH v3 17/23] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2023-11-08 Thread Harry Wentland
with the DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE will be permitted to set the COLOR_PIPELINE plane property and drm_colorop properties. But it won't be allowed to set COLOR_ENCODING and COLOR_RANGE. Userspace that does not set this client cap will not be permitted to touch the color pipeline. Signed-off-by: Harry

[RFC PATCH v3 19/23] drm/vkms: Pull apply_colorop out of pre_blend_color_transform

2023-11-08 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 v3 08/23] drm/colorop: Add TYPE property

2023-11-08 Thread Harry Wentland
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 | 43 ++- include/drm/drm_colorop.h | 17

[RFC PATCH v3 20/23] drm/vkms: Use s32 for internal color pipeline precision

2023-11-08 Thread Harry Wentland
the nesting of our colorop processing loops. We now use the pixel iteration loop on the outside and the colorop iteration on the inside. v3: - Use new colorop->next pointer Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/vkms_composer.c | 55 +--- drivers/gpu/drm/v

[RFC PATCH v3 22/23] drm/tests: Add a few tests around drm_fixed.h

2023-11-08 Thread Harry Wentland
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_test.c

[RFC PATCH v3 07/23] drm/colorop: Introduce new drm_colorop mode object

2023-11-08 Thread Harry Wentland
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| 1 + drivers/gpu/drm/drm_atomic.c| 70 + drivers/gpu/drm

[RFC PATCH v3 13/23] drm/plane: Add COLOR PIPELINE property

2023-11-08 Thread Harry Wentland
as set the desired one. The color pipelines are programmed via properties on the actual drm_colorop objects. 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

[RFC PATCH v3 18/23] drm/colorop: Add 3x4 CTM type

2023-11-08 Thread Harry Wentland
A property for property types that need it. Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic_uapi.c | 30 ++ drivers/gpu/drm/drm_colorop.c | 16 include/drm/drm_colorop.h | 19 +++ include/uapi/drm/drm_mode.h

[RFC PATCH v3 23/23] drm/vkms: Add tests for CTM handling

2023-11-08 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 --- drivers/gpu/drm/vkms/tests/vkms_color_tests.c

[RFC PATCH v3 15/23] drm/vkms: Add enumerated 1D curve colorop

2023-11-08 Thread Harry Wentland
it. We'll revisit and, if necessary, regenerate the LUTs when we have IGT tests for higher precision buffers. v2: - Add commit description - Fix sRGB EOTF LUT definition - Add linear and sRGB inverse EOTF LUTs Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/Makefile| 4

[RFC PATCH v3 09/23] drm/color: Add 1D Curve subtype

2023-11-08 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic_uapi.c | 18 ++ drivers/gpu/drm/drm_colorop.c | 39 +++ include/drm/drm_colorop.h | 20 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/drivers/gpu

[RFC PATCH v3 12/23] drm/colorop: Add atomic state print for drm_colorop

2023-11-08 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 29 + include/drm/drm_colorop.h| 5 + 2 files changed, 34 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 59e1797d1ca8..ccf26b034433 100644

[RFC PATCH v3 16/23] drm/vkms: Add kunit tests for linear and sRGB LUTs

2023-11-08 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 b995114cf6b8..ad4c2f72fd1e

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

2023-11-08 Thread Harry Wentland
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 | 32

  1   2   3   4   5   6   7   8   9   10   >