Re: [PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats

2022-02-08 Thread Melissa Wen
On 01/21, Igor Torrente wrote: > Currently the blend function only accepts XRGB_ and ARGB_ > as a color input. > > This patch refactors all the functions related to the plane composition > to overcome this limitation. > > A new internal format(`struct pixel`) is introduced to deal with

Re: [PATCH v4 9/9] drm: vkms: Add support to the RGB565 format

2022-02-08 Thread Melissa Wen
On 01/21, Igor Torrente wrote: > Adds this common format to vkms. > > This commit also adds new helper macros to deal with fixed-point > arithmetic. > > It was done to improve the precision of the conversion to ARGB16161616 > since the "conversion ratio" is not an integer. > > Signed-off-by:

Re: [PATCH v4 0/9] Add new formats support to vkms

2022-02-08 Thread Melissa Wen
> received from the XRGB and overwrite the value with 0x. And you can also drop this TO-DO here (Clearing primary plane): https://dri.freedesktop.org/docs/drm/gpu/vkms.html#add-plane-features With these points addressed, you can add my r-b to the entire series: Reviewed-by: Melissa Wen >

Re: [PATCH v4 1/9] drm: vkms: Replace the deprecated drm_mode_config_init

2022-02-08 Thread Melissa Wen
*vkmsdev) > { > struct drm_device *dev = >drm; > + int ret; > + > + ret = drmm_mode_config_init(dev); > + if (ret < 0) > + return ret; lgtm. Reviewed-by: Melissa Wen > > - drm_mode_config_init(dev); > dev->mode_c

Re: [PATCH v4 2/9] drm: vkms: Alloc the compose frame using vzalloc

2022-02-08 Thread Melissa Wen
e. > > This problem is addessed by allocating the memory using kvzalloc that > circunvents this limitation. With this patch, can you drop these debugging issues in VKMS TO-DO[1], please? Thanks, Reviewed-by: Melissa Wen [1] https://dri.freedesktop.org/docs/drm/gpu/vkms.html#igt-better-su

Re: [PATCH v4 4/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info`

2022-02-08 Thread Melissa Wen
is > being used in the output composition. Thus, vkms_frame_info > is a better name to represent this. Typo. Maybe this: `This struct contains information on the frame used in the output composition` Anyway, this change makes sense to me. Reviewed-by: Melissa Wen > > Signed-off-by: Igor Torrent

Re: [PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats

2022-02-09 Thread Melissa Wen
On 02/08, Igor Torrente wrote: > Hi Melissa, > > On 2/8/22 07:40, Melissa Wen wrote: > > On 01/21, Igor Torrente wrote: > > > Currently the blend function only accepts XRGB_ and ARGB_ > > > as a color input. > > > > > > This pat

Re: [PATCH] drm/v3d: Add missing unlock

2022-01-26 Thread Melissa Wen
On 01/22, Yongzhi Liu wrote: > [why] > Unlock is needed on the error handling path to prevent dead lock. > > [how] > Fix this by adding drm_gem_unlock_reservations on the error handling path. > > Signed-off-by: Yongzhi Liu > --- > drivers/gpu/drm/v3d/v3d_gem.c | 4 > 1 file changed, 4

Re: [PATCH 1/1] drm/vkms: check plane_composer->map[0] before using it

2022-04-14 Thread Melissa Wen
On 04/11, Tales Lelo da Aparecida wrote: > Fix a copypasta error, which resulted in checking repeatedly if the > primary_composer->map[0] was null, instead of checking each > plane_composer while composing planes. > > Signed-off-by: Tales Lelo da Aparecida Hi Tales, Nice catch! I suggest you

[RFC PATCH 4/5] drm/amd/display: hook DCN30 color state logging to DTN log

2023-09-05 Thread Melissa Wen
Color caps changed between HW versions which caused DCN10 color state sections on DTN log no longer fit DCN3.0 versions. Create a DCN3.0-specific color state logging and hook it to drivers of DCN3.0 family. Signed-off-by: Melissa Wen --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5

[RFC PATCH 5/5] drm/amd/display: add DPP and MPC color caps to DTN log

2023-09-05 Thread Melissa Wen
Add color caps information for DPP and MPC block to show HW color caps. Signed-off-by: Melissa Wen --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 23 +++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 23 +++ 2 files changed, 46 insertions(+) diff --git

[RFC PATCH 0/5] drm/amd/display: improve DTN color state log

2023-09-05 Thread Melissa Wen
...@igalia.com/ [2] https://github.com/ValveSoftware/gamescope Melissa Wen (5): drm/amd/display: detach color state from hw state logging drm/amd/display: fill up DCN3 DPP color state drm/amd/display: create DCN3-specific log for MPC state drm/amd/display: hook DCN30 color state logging to DTN log

[RFC PATCH 1/5] drm/amd/display: detach color state from hw state logging

2023-09-05 Thread Melissa Wen
Prepare to hook color state logging according to DCN version. Signed-off-by: Melissa Wen --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 27 +-- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b

[RFC PATCH 2/5] drm/amd/display: fill up DCN3 DPP color state

2023-09-05 Thread Melissa Wen
DCN3 DPP color state was uncollected and some state elements from DCN1 doesn't fit DCN3. Create new elements according to DCN3 color caps and fill them up for DTN log output. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 28 +-- drivers/gpu/drm

[RFC PATCH 3/5] drm/amd/display: create DCN3-specific log for MPC state

2023-09-05 Thread Melissa Wen
Logging DCN3 MPC state was following DCN1 implementation that doesn't consider new DCN3 MPC color blocks. Create new elements according to DCN3 MPC color caps and a new DCN3-specific function for reading MPC data. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 55

Re: [RFC PATCH 0/5] drm/amd/display: improve DTN color state log

2023-09-05 Thread Melissa Wen
On 09/05, Melissa Wen wrote: > Hi, > > I'm updating the color state part of DTN log to match DCN3.0 HW better. > Currently, the DTN log considers the DCN10 color pipeline, which is > useless for DCN3.0 because of all the differences in color caps between > DCN versions. In add

[PATCH] drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma

2023-08-24 Thread Melissa Wen
: 96b020e2163f ("drm/amd/display: check attr flag before set cursor degamma on DCN3+") Signed-off-by: Melissa Wen --- Hi, It seems that the previous color fix for atomic API brought out a difference in behavior of degamma color blocks between DCN2 and DCN3, as reported in the link. AFAIU

[RFC PATCH v2 4/5] drm/amd/display: hook DCN30 color state logging to DTN log

2023-09-13 Thread Melissa Wen
Color caps changed between HW versions which caused DCN10 color state sections on DTN log no longer fit DCN3.0 versions. Create a DCN3.0-specific color state logging and hook it to drivers of DCN3.0 family. rfc-v2: - detail RAM mode for gamcor and blnd gamma blocks Signed-off-by: Melissa Wen

[RFC PATCH v2 3/5] drm/amd/display: create DCN3-specific log for MPC state

2023-09-13 Thread Melissa Wen
Logging DCN3 MPC state was following DCN1 implementation that doesn't consider new DCN3 MPC color blocks. Create new elements according to DCN3 MPC color caps and a new DCN3-specific function for reading MPC data. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 55

[RFC PATCH v2 5/5] drm/amd/display: add DPP and MPC color caps to DTN log

2023-09-13 Thread Melissa Wen
Add color caps information for DPP and MPC block to show HW color caps. Signed-off-by: Melissa Wen --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 23 +++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 23 +++ 2 files changed, 46 insertions(+) diff --git

[RFC PATCH v2 0/5] drm/amd/display: improve DTN color state log

2023-09-13 Thread Melissa Wen
://github.com/ValveSoftware/gamescope Melissa Wen (5): drm/amd/display: detach color state from hw state logging drm/amd/display: fill up DCN3 DPP color state drm/amd/display: create DCN3-specific log for MPC state drm/amd/display: hook DCN30 color state logging to DTN log drm/amd/display: add

[RFC PATCH v2 1/5] drm/amd/display: detach color state from hw state logging

2023-09-13 Thread Melissa Wen
Prepare to hook color state logging according to DCN version. Signed-off-by: Melissa Wen --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 27 +-- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b

[RFC PATCH v2 2/5] drm/amd/display: fill up DCN3 DPP color state

2023-09-13 Thread Melissa Wen
DCN3 DPP color state was uncollected and some state elements from DCN1 doesn't fit DCN3. Create new elements according to DCN3 color caps and fill them up for DTN log output. rfc-v2: - fix reading of gamcor and blnd gamma states Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30

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

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > On 2023-08-10 12:02, Melissa Wen wrote: > > Hi all, > > > > Here is the next version of our work to enable AMD driver-specific color > > management properties [1][2]. This series is a collection of > > contributions from Joshua,

[PATCH v2] drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma

2023-08-31 Thread Melissa Wen
/-/issues/2803 Fixes: 96b020e2163f ("drm/amd/display: check attr flag before set cursor degamma on DCN3+") Signed-off-by: Melissa Wen --- v2: cc'ing stable --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/a

Re: [PATCH v2 10/34] drm/amd/display: add plane 3D LUT driver-specific properties

2023-09-08 Thread Melissa Wen
On 09/07, Pekka Paalanen wrote: > On Wed, 6 Sep 2023 15:30:04 -0400 > Harry Wentland wrote: > > > On 2023-08-10 12:02, Melissa Wen wrote: > > > Add 3D LUT property for plane gamma correction using a 3D lookup table. > > > Since a 3D LUT has a limited number of

Re: [PATCH v2 11/34] drm/amd/display: add plane shaper LUT and TF driver-specific properties

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > On 2023-08-10 12:02, Melissa Wen wrote: > > On AMD HW, 3D LUT always assumes a preceding shaper 1D LUT used for > > delinearizing and/or normalizing the color space before applying a 3D > > LUT. Add pre-defined transfer function to enable

Re: [PATCH v2 29/34] drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > > > On 2023-08-10 12:03, Melissa Wen wrote: > > From: Joshua Ashton > > > > Need to funnel the color caps through to these functions so it can check > > that the hardware is capable. > > > > v2: > > - remo

Re: [PATCH v2 07/34] drm/amd/display: explicitly define EOTF and inverse EOTF

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > > > On 2023-08-25 10:18, Melissa Wen wrote: > > On 08/22, Pekka Paalanen wrote: > >> On Thu, 10 Aug 2023 15:02:47 -0100 > >> Melissa Wen wrote: > >> > >>> Instead of relying on color block names to get th

Re: [PATCH v2 01/34] drm/amd/display: fix segment distribution for linear LUTs

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > On 2023-08-10 12:02, Melissa Wen wrote: > > From: Harry Wentland > > > > The region and segment calculation was incapable of dealing > > with regions of more than 16 segments. We first fix this. > > > > Now that we can su

Re: [PATCH v2 32/34] drm/amd/display: add plane CTM driver-specific property

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > > > On 2023-08-10 12:03, Melissa Wen wrote: > > Plane CTM for pre-blending color space conversion. Only enable > > driver-specific plane CTM property on drivers that support both pre- and > > post-blending gamut remap matrix, i.

Re: [PATCH v2 33/34] drm/amd/display: add plane CTM support

2023-09-08 Thread Melissa Wen
On 09/06, Harry Wentland wrote: > > > On 2023-08-10 12:03, Melissa Wen wrote: > > Map the plane CTM driver-specific property to DC plane, instead of DC > > stream. The remaining steps to program DPP block are already implemented > > on DC shared-code. > >

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

2023-11-06 Thread Melissa Wen
On 10/06, Sebastian Wick wrote: > On Thu, Oct 05, 2023 at 04:14:55PM -0100, Melissa Wen wrote: > > Hello, > > > > Just another iteration for AMD driver-specific color properties. > > Basically, addressing comments from the previous version. > > > > Rec

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

2023-11-06 Thread Melissa Wen
On 10/06, Sebastian Wick wrote: > On Thu, Oct 05, 2023 at 04:15:04PM -0100, Melissa Wen wrote: > > Add 3D LUT property for plane color transformations using a 3D lookup > > table. 3D LUT allows for highly accurate and complex color > > transformations and is suitable to adjus

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

2023-11-06 Thread Melissa Wen
On 11/02, Joshua Ashton wrote: > > > On 10/5/23 18:15, Melissa Wen wrote: > > Add 3D LUT property for plane color transformations using a 3D lookup > > table. 3D LUT allows for highly accurate and complex color > > transformations and is suitable to adjust the balance

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

2023-11-06 Thread Melissa Wen
for debugging the issue. BR, Melissa > > Thanks > > - Joshie ✨ > > On 11/2/23 03:48, Joshua Ashton wrote: > > > > > > On 10/5/23 18:15, Melissa Wen wrote: > > > Add 3D LUT property for plane color transformations using a 3D lookup &g

[PATCH v3 01/32] drm/drm_mode_object: increase max objects to accommodate new color props

2023-09-25 Thread Melissa Wen
property. Reviewed-by: Harry Wentland Reviewed-by: Simon Ser Signed-off-by: Melissa Wen --- include/drm/drm_mode_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h index 912f1e415685..08d7a7f0188f 100644

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

2023-09-25 Thread Melissa Wen
: allow newer DC hardware to use degamma ROM for PQ/HLG drm/amd/display: copy 3D LUT settings from crtc state to stream_update drm/amd/display: Add 3x4 CTM support for plane CTM Melissa Wen (18): drm/drm_mode_object: increase max objects to accommodate new color props drm/drm_property

[PATCH v3 03/32] drm/drm_plane: track color mgmt changes per plane

2023-09-25 Thread Melissa Wen
-by: Harry Wentland Signed-off-by: Melissa Wen --- drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_atomic_state_helper.c | 1 + include/drm/drm_plane.h | 7 +++ 3 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm

[PATCH v3 05/32] drm/amd/display: add plane degamma TF driver-specific property

2023-09-25 Thread Melissa Wen
-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 19 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 21 +++ .../amd

[PATCH v3 04/32] drm/amd/display: add driver-specific property for plane degamma LUT

2023-09-25 Thread Melissa Wen
prop description - move private color operations from amdgpu_display to amdgpu_dm_color Reviewed-by: Harry Wentland Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 11 +++ .../gpu/drm/amd/display

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

2023-09-25 Thread Melissa Wen
-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index d03bdb010e8b..14f9c02539c6 100644

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

2023-09-25 Thread Melissa Wen
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 --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 27 +--- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 67

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

2023-09-25 Thread Melissa Wen
and another 1D LUT after 3D LUT (blend) to linearize content again for blending. The next patches add these 1D LUTs to the plane color mgmt pipeline. v3: - improve commit message about 3D LUT - describe the 3D LUT entries and size (Harry) Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd

[PATCH v3 16/32] drm/amd/display: set sdr_ref_white_level to 80 for out_transfer_func

2023-09-25 Thread Melissa Wen
From: Joshua Ashton Otherwise this is just initialized to 0. This needs to actually have a value so that compute_curve can work for PQ EOTF. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display

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

2023-09-25 Thread Melissa Wen
(Harry) - replace BT709 EOTF by inv OETF Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 21 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 11 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 29 + .../amd/display/amdgpu_dm

[PATCH v3 13/32] drm/amd/display: add comments to describe DM crtc color mgmt behavior

2023-09-25 Thread Melissa Wen
Describe some expected behavior of the AMD DM color mgmt programming. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display

[PATCH v3 02/32] drm/drm_property: make replace_property_blob_from_id a DRM helper

2023-09-25 Thread Melissa Wen
Place it in drm_property where drm_property_replace_blob and drm_property_lookup_blob live. Then we can use the DRM helper for driver-specific KMS properties too. Reviewed-by: Harry Wentland Reviewed-by: Liviu Dudau Signed-off-by: Melissa Wen --- drivers/gpu/drm/arm/malidp_crtc.c | 2

[PATCH v3 29/32] drm/amd/display: copy 3D LUT settings from crtc state to stream_update

2023-09-25 Thread Melissa Wen
From: Joshua Ashton When commiting planes, we copy color mgmt resources to the stream state. Do the same for shaper and 3D LUTs. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 17/32] drm/amd/display: mark plane as needing reset if color props change

2023-09-25 Thread Melissa Wen
From: Joshua Ashton We should reset a plane state if at least one of the color management properties differs from old and new state. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 24/32] drm/amd/display: add plane shaper TF support

2023-09-25 Thread Melissa Wen
Enable usage of predefined transfer func in addition to shaper 1D LUT. That means we can save some complexity by just setting a predefined curve, instead of programming a custom curve when preparing color space for applying 3D LUT. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen

[PATCH v3 26/32] drm/amd/display: handle empty LUTs in __set_input_tf

2023-09-25 Thread Melissa Wen
Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 20 +++ 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 31/32] drm/amd/display: add plane CTM support

2023-09-25 Thread Melissa Wen
Map the plane CTM driver-specific property to DC plane, instead of DC stream. The remaining steps to program DPP block are already implemented on DC shared-code. v3: - fix comment about plane and CRTC CTMs priorities (Harry) Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm

[PATCH v3 18/32] drm/amd/display: decouple steps for mapping CRTC degamma to DC plane

2023-09-25 Thread Melissa Wen
combinations. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 59 +-- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display

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

2023-09-25 Thread Melissa Wen
and comments (Harry) Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 7 ++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 8 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 7 ++ .../amd/display

[PATCH v3 30/32] drm/amd/display: add plane CTM driver-specific property

2023-09-25 Thread Melissa Wen
Plane CTM for pre-blending color space conversion. Only enable driver-specific plane CTM property on drivers that support both pre- and post-blending gamut remap matrix, i.e., DCN3+ family. Otherwise it conflits with DRM CRTC CTM property. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen

[PATCH v3 15/32] drm/amd/display: add CRTC gamma TF support

2023-09-25 Thread Melissa Wen
if regamma TF differs between states (Joshua) - map inverse EOTF to DC transfer function (Melissa) v3: - update AMDGPU TF list Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH v3 25/32] drm/amd/display: add plane 3D LUT support

2023-09-25 Thread Melissa Wen
-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 96 ++- 2 files changed, 94 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH v3 27/32] drm/amd/display: add plane blend LUT and TF support

2023-09-25 Thread Melissa Wen
module to fill parameters when setting non-linear TF with empty LUT. v2: - rename DRM TFs to AMDGPU TFs Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 55

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

2023-09-25 Thread Melissa Wen
ontent, pass in (203.0 / 80.0). Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 14 ++ .../drm/amd/display/amd

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

2023-09-25 Thread Melissa Wen
out TF+LUT behavior in the commit and comments (Harry) Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 22 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 12 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 21

[PATCH v3 14/32] drm/amd/display: encapsulate atomic regamma operation

2023-09-25 Thread Melissa Wen
LUT programming and better understand each step, detach atomic regamma programming from the crtc colocr updating code. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 53 --- 1 file changed, 34 insertions(+), 19 deletions

[PATCH v3 28/32] drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG

2023-09-25 Thread Melissa Wen
set_color_properties (Harry) Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 29 --- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display

[PATCH v3 23/32] drm/amd/display: add plane shaper LUT support

2023-09-25 Thread Melissa Wen
3D LUT. v2: - use DPP color caps to verify plane 3D LUT support - add debug message if shaper LUT programming fails Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 + .../amd

[PATCH v3 22/32] drm/amd/display: add HDR multiplier support

2023-09-25 Thread Melissa Wen
From: Joshua Ashton With `dc_fixpt_from_s3132()` translation, we can just use it to set hdr_mult. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 32/32] drm/amd/display: Add 3x4 CTM support for plane CTM

2023-09-25 Thread Melissa Wen
From: Joshua Ashton Create drm_color_ctm_3x4 to support 3x4-dimension plane CTM matrix and convert DRM CTM to DC CSC float matrix. v3: - rename ctm2 to ctm_3x4 (Harry) Signed-off-by: Joshua Ashton --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 28 +--

[PATCH v3 19/32] drm/amd/display: add plane degamma TF and LUT support

2023-09-25 Thread Melissa Wen
return -EINVAL if we don't have plane degamma settings, so we can continue and check CRTC degamma. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1

[PATCH v3 20/32] drm/amd/display: reject atomic commit if setting both plane and CRTC degamma

2023-09-25 Thread Melissa Wen
Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index

[PATCH v3 21/32] drm/amd/display: add dc_fixpt_from_s3132 helper

2023-09-25 Thread Melissa Wen
From: Joshua Ashton Detach value translation from CTM to reuse it for programming HDR multiplier property. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 8 +--- drivers/gpu/drm/amd/display

Re: [RFC PATCH v2 3/5] drm/amd/display: create DCN3-specific log for MPC state

2023-09-26 Thread Melissa Wen
On 09/25, Harry Wentland wrote: > > > On 2023-09-13 12:43, Melissa Wen wrote: > > Logging DCN3 MPC state was following DCN1 implementation that doesn't > > consider new DCN3 MPC color blocks. Create new elements according to > > DCN3 MPC color caps and a new DCN3-sp

Re: [RFC PATCH v2 4/5] drm/amd/display: hook DCN30 color state logging to DTN log

2023-09-26 Thread Melissa Wen
On 09/25, Harry Wentland wrote: > > > On 2023-09-13 12:43, Melissa Wen wrote: > > Color caps changed between HW versions which caused DCN10 color state > > sections on DTN log no longer fit DCN3.0 versions. Create a > > DCN3.0-specific color state logging and h

Re: [RFC PATCH v2 0/5] drm/amd/display: improve DTN color state log

2023-09-26 Thread Melissa Wen
On 09/25, Harry Wentland wrote: > > > On 2023-09-13 12:43, Melissa Wen wrote: > > Hi, > > > > This is an update of previous RFC [0] improving the data collection of > > Gamma Correction and Blend Gamma color blocks. > > > > As I mentioned in the la

Re: [PATCH] drm/amd/display: set stream gamut remap matrix to MPC for DCN3+

2023-09-26 Thread Melissa Wen
On 09/25, Harry Wentland wrote: > > > On 2023-07-21 09:24, Melissa Wen wrote: > > dc->caps.color.mpc.gamut_remap says there is a post-blending color block > > for gamut remap matrix for DCN3 HW family and newer versions. However, > > those drivers still follow DCN10

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

2023-10-03 Thread Melissa Wen
On 09/27, Harry Wentland wrote: > > > On 2023-09-25 15:49, Melissa Wen wrote: > > Add 3D LUT property for plane color transformations using a 3D lookup > > table. 3D LUT allows for highly accurate and complex color > > transformations and is suitable to adjus

[PATCH v4 29/32] drm/amd/display: copy 3D LUT settings from crtc state to stream_update

2023-10-05 Thread Melissa Wen
From: Joshua Ashton When commiting planes, we copy color mgmt resources to the stream state. Do the same for shaper and 3D LUTs. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v4 30/32] drm/amd/display: add plane CTM driver-specific property

2023-10-05 Thread Melissa Wen
Plane CTM for pre-blending color space conversion. Only enable driver-specific plane CTM property on drivers that support both pre- and post-blending gamut remap matrix, i.e., DCN3+ family. Otherwise it conflits with DRM CRTC CTM property. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen

[PATCH v4 32/32] drm/amd/display: Add 3x4 CTM support for plane CTM

2023-10-05 Thread Melissa Wen
From: Joshua Ashton Create drm_color_ctm_3x4 to support 3x4-dimension plane CTM matrix and convert DRM CTM to DC CSC float matrix. v3: - rename ctm2 to ctm_3x4 (Harry) Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 28

[PATCH v4 04/32] drm/amd/display: add driver-specific property for plane degamma LUT

2023-10-05 Thread Melissa Wen
prop description - move private color operations from amdgpu_display to amdgpu_dm_color Reviewed-by: Harry Wentland Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 11 +++ .../gpu/drm/amd/display

[PATCH v4 02/32] drm/drm_property: make replace_property_blob_from_id a DRM helper

2023-10-05 Thread Melissa Wen
Place it in drm_property where drm_property_replace_blob and drm_property_lookup_blob live. Then we can use the DRM helper for driver-specific KMS properties too. Reviewed-by: Harry Wentland Reviewed-by: Liviu Dudau Signed-off-by: Melissa Wen --- drivers/gpu/drm/arm/malidp_crtc.c | 2

[PATCH v4 03/32] drm/drm_plane: track color mgmt changes per plane

2023-10-05 Thread Melissa Wen
-by: Harry Wentland Signed-off-by: Melissa Wen --- drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_atomic_state_helper.c | 1 + include/drm/drm_plane.h | 7 +++ 3 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm

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

2023-10-05 Thread Melissa Wen
| | | +---+ | | | *AMD Gamma| | | | inv_EOTF| | | +---+ | | | +--+ Please, let us know your thoughts. Best Regards, Melissa Wen [1] https://github.com/ValveSoftware/gamescope [2] https://store.steampowered.com/news/app/1675200/view

[PATCH v4 01/32] drm/drm_mode_object: increase max objects to accommodate new color props

2023-10-05 Thread Melissa Wen
property. Reviewed-by: Harry Wentland Reviewed-by: Simon Ser Signed-off-by: Melissa Wen --- include/drm/drm_mode_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h index 912f1e415685..08d7a7f0188f 100644

Re: [RFC PATCH 02/10] drm/colorop: Introduce new drm_colorop mode object

2023-10-10 Thread Melissa Wen
bits. > > Signed-off-by: Harry Wentland > 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 > C

Re: [RFC PATCH 10/10] drm/vkms: Add enumerated 1D curve colorop

2023-10-10 Thread Melissa Wen
On 09/08, Harry Wentland wrote: > Signed-off-by: Harry Wentland > 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: J

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

2023-10-10 Thread Melissa Wen
O 09/08, Harry Wentland wrote: > Signed-off-by: Harry Wentland > 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

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

2023-10-05 Thread Melissa Wen
ontent, 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: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 4 .../gpu/drm/amd/display/amdgpu_dm/amdgp

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

2023-10-05 Thread Melissa Wen
out TF+LUT behavior in the commit and comments (Harry) Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 22 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 12 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 21

[PATCH v4 23/32] drm/amd/display: add plane shaper LUT support

2023-10-05 Thread Melissa Wen
3D LUT. v2: - use DPP color caps to verify plane 3D LUT support - add debug message if shaper LUT programming fails v4: - remove helper to check 3D LUT color caps (Harry) - update desc of lut3d-setup helper from MPC to DPP Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu/drm

[PATCH v4 19/32] drm/amd/display: add plane degamma TF and LUT support

2023-10-05 Thread Melissa Wen
return -EINVAL if we don't have plane degamma settings, so we can continue and check CRTC degamma. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1

[PATCH v4 21/32] drm/amd/display: add dc_fixpt_from_s3132 helper

2023-10-05 Thread Melissa Wen
From: Joshua Ashton Detach value translation from CTM to reuse it for programming HDR multiplier property. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 8 +--- drivers/gpu/drm/amd/display

[PATCH v4 22/32] drm/amd/display: add HDR multiplier support

2023-10-05 Thread Melissa Wen
From: Joshua Ashton With `dc_fixpt_from_s3132()` translation, we can just use it to set hdr_mult. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v4 20/32] drm/amd/display: reject atomic commit if setting both plane and CRTC degamma

2023-10-05 Thread Melissa Wen
Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index

[PATCH v4 28/32] drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG

2023-10-05 Thread Melissa Wen
set_color_properties (Harry) Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 29 --- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

[PATCH v4 27/32] drm/amd/display: add plane blend LUT and TF support

2023-10-05 Thread Melissa Wen
module to fill parameters when setting non-linear TF with empty LUT. v2: - rename DRM TFs to AMDGPU TFs Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 56

[PATCH v4 26/32] drm/amd/display: handle empty LUTs in __set_input_tf

2023-10-05 Thread Melissa Wen
Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 20 +++ 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v4 31/32] drm/amd/display: add plane CTM support

2023-10-05 Thread Melissa Wen
Map the plane CTM driver-specific property to DC plane, instead of DC stream. The remaining steps to program DPP block are already implemented on DC shared-code. v3: - fix comment about plane and CRTC CTMs priorities (Harry) Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu

[PATCH v4 18/32] drm/amd/display: decouple steps for mapping CRTC degamma to DC plane

2023-10-05 Thread Melissa Wen
combinations. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 60 +-- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display

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

2023-10-05 Thread Melissa Wen
and comments (Harry) Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 7 ++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 8 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 7 ++ .../amd/display

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

2023-10-05 Thread Melissa Wen
-by: Harry Wentland Signed-off-by: Harry Wentland Signed-off-by: Melissa Wen --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm

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

2023-10-05 Thread Melissa Wen
(Harry) - replace BT709 EOTF by inv OETF Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 21 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 11 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 29 + .../amd/display/amdgpu_dm

<    1   2   3   4   5   6   7   >