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

2024-06-05 Thread Melissa Wen
Inverse > OETF while the 3rd colorop takes the Inverse EOTF or OETF. > > We are working on two more ops for amdgpu, the HDR multiplier > and the 3DLUT, which will give us this: > > 1. 1D Curve EOTF > 2. 3x4 CTM > 3. HDR Multiplier > 4. 1D Curve Inverse EOTF > 5. 1D LU

[PATCH] MAINTAINERS: remove myself as a VKMS maintainer

2024-05-25 Thread Melissa Wen
I haven't been able to follow or review the work on the driver for some time now and I don't see the situation improving anytime soon. I'd like to continue being listed as a reviewer. Signed-off-by: Melissa Wen --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2024-05-21 Thread Melissa Wen
On 05/21, Melissa Wen wrote: > On 02/26, Harry Wentland wrote: > > From: Alex Hung > > > > Expose one 1D curve colorop with support for > > DRM_COLOROP_1D_CURVE_SRGB_EOTF and program HW to perform > > the sRGB transform when the colorop is not in bypass. > &

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

2024-05-21 Thread Melissa Wen
this: > > 1. 1D Curve EOTF > 2. 3x4 CTM > 3. HDR Multiplier > 4. 1D Curve Inverse EOTF > 5. 1D LUT > 6. 3D LUT > 7. 1D Curve EOTF > 8. 1D LUT > > This, essentially mirrors the color pipeline used by gamescope > and presented by Melissa Wen, with the excep

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

2024-05-21 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > From: Alex Hung > > Expose one 1D curve colorop with support for > DRM_COLOROP_1D_CURVE_SRGB_EOTF and program HW to perform > the sRGB transform when the colorop is not in bypass. > > With this change the following IGT test passes: > kms_colorop --run

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

2024-05-21 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > 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 >

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

2024-05-21 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > This patches introduces a new drm_colorop mode object. This > object represents color transformations and can be used to > define color pipelines. > > We also introduce the drm_colorop_state here, as well as > various helpers and state tracking bits. > > v4: >

Re: [RFC PATCH v3 0/6] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-04-08 Thread Melissa Wen
On 03/28, Jani Nikula wrote: > On Wed, 27 Mar 2024, Melissa Wen wrote: > > 2. Most of the edid data handled by `dm_helpers_parse_edid_caps()` are > >in drm_edid halpers, but there are still a few that are not managed by > >them yet. For example: > >``` >

Re: [RFC PATCH v3 3/6] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-04-08 Thread Melissa Wen
On 03/28, Jani Nikula wrote: > On Wed, 27 Mar 2024, Melissa Wen wrote: > > Replace raw edid handling (struct edid) with the opaque EDID type > > (struct drm_edid) on amdgpu_dm_connector for consistency. It may also > > prevent mismatch of approaches in different par

Re: [PATCH 0/4] drm/edid & drm/i915: vendor and product id logging improvements

2024-04-08 Thread Melissa Wen
On 04/08, Jani Nikula wrote: > On Mon, 08 Apr 2024, Melissa Wen wrote: > > On 04/02, Jani Nikula wrote: > >> On Thu, 21 Mar 2024, Jani Nikula wrote: > >> > Jani Nikula (4): > >> > drm/edid: add drm_edid_get_product_id() > >> > drm/edid:

Re: [PATCH 0/4] drm/edid & drm/i915: vendor and product id logging improvements

2024-04-08 Thread Melissa Wen
On 04/02, Jani Nikula wrote: > On Thu, 21 Mar 2024, Jani Nikula wrote: > > Jani Nikula (4): > > drm/edid: add drm_edid_get_product_id() > > drm/edid: add drm_edid_print_product_id() > > drm/i915/bios: switch to struct drm_edid and struct > > drm_edid_product_id > > drm/i915/bios:

[RFC PATCH v3 6/6] drm/amd/display: remove redundant freesync parser for DP

2024-03-27 Thread Melissa Wen
When updating connector under drm_edid infrastructure, many calculations and validations are already done and become redundant inside AMD driver. Remove those driver-specific code in favor of the DRM common code. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 86

[RFC PATCH v3 4/6] drm/amd/display: switch to setting physical address directly

2024-03-27 Thread Melissa Wen
Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[RFC PATCH v3 5/6] drm/amd/display: always call connector_update when parsing freesync_caps

2024-03-27 Thread Melissa Wen
Update connector caps with drm_edid data before parsing info for freesync. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu

[RFC PATCH v3 3/6] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-03-27 Thread Melissa Wen
(Alex Hung) v3: fix general protection fault on mst Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 8 +- .../display/amdgpu_dm

[RFC PATCH v3 2/6] drm/amd/display: clean unused variables for hdmi freesync parser

2024-03-27 Thread Melissa Wen
Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 05ffe844b1fc..280562707cd0 100644 --- a/drivers/gpu

[RFC PATCH v3 1/6] drm/amd/display: remove unused pixel_clock_mhz from amdgpu_dm_connector

2024-03-27 Thread Melissa Wen
We set pixel_clock_mhz when updating freesync caps, but it's not used anywhere. Remove it. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/gpu

[RFC PATCH v3 0/6] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-03-27 Thread Melissa Wen
common code v2: https://lore.kernel.org/amd-gfx/20240327165828.288792-1-m...@igalia.com/ - fix general protection fault on mst Melissa Wen (6): drm/amd/display: remove unused pixel_clock_mhz from amdgpu_dm_connector drm/amd/display: clean unused variables for hdmi freesync parser drm/a

[RFC PATCH v2 6/6] drm/amd/display: remove redundant freesync parser for DP

2024-03-27 Thread Melissa Wen
When updating connector under drm_edid infrastructure, many calculations and validations are already done and become redundant inside AMD driver. Remove those driver-specific code in favor of the DRM common code. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 86

[RFC PATCH v2 4/6] drm/amd/display: switch to setting physical address directly

2024-03-27 Thread Melissa Wen
Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[RFC PATCH v2 5/6] drm/amd/display: always call connector_update when parsing freesync_caps

2024-03-27 Thread Melissa Wen
Update connector caps with drm_edid data before parsing info for freesync. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu

[RFC PATCH v2 3/6] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-03-27 Thread Melissa Wen
(Alex Hung) Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 8 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 28 +++--- 4 files changed

[RFC PATCH v2 2/6] drm/amd/display: clean unused variables for hdmi freesync parser

2024-03-27 Thread Melissa Wen
Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 05ffe844b1fc..280562707cd0 100644 --- a/drivers/gpu

[RFC PATCH v2 0/6] switch amdgpu_dm_connector to use struct drm_edid

2024-03-27 Thread Melissa Wen
extensive testing and validation of a large variety of display caps and I don't have the required setup for it (perhaps you can test it in your CI to point issues?). I don't see how to reduce the scope of changes to mitigate the noise/disruption, but any suggestions are welcome. Thanks, Melissa Meli

[RFC PATCH v2 1/6] drm/amd/display: remove unused pixel_clock_mhz from amdgpu_dm_connector

2024-03-27 Thread Melissa Wen
We set pixel_clock_mhz when updating freesync caps, but it's not used anywhere. Remove it. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/gpu

Re: [PATCH v2] drm: Fix drm_fixp2int_round() making it add 0.5

2024-03-19 Thread Melissa Wen
On 03/17, Maíra Canal wrote: > Hi Melissa, > > On 3/17/24 14:50, Melissa Wen wrote: > > On 03/16, Arthur Grillo wrote: > > > As well noted by Pekka[1], the rounding of drm_fixp2int_round is wrong. > > > To round a number, you need to add 0.5 to the number and flo

Re: [PATCH v2] drm: Fix drm_fixp2int_round() making it add 0.5

2024-03-17 Thread Melissa Wen
ore.kernel.org/all/20240301135327.22efe0dd.pekka.paala...@collabora.com/ > > Fixes: 8b25320887d7 ("drm: Add fixed-point helper to get rounded integer > values") > Suggested-by: Pekka Paalanen > Reviewed-by: Harry Wentland > Signed-off-by: Arthur Grillo Great, thanks! Reviewed-by: Melis

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

2024-03-16 Thread Melissa Wen
On 16/03/2024 08:59, 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, you need to add 0.5 to the number and floor that, drm_fixp2int_round() is adding

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

2024-03-14 Thread Melissa Wen
raction and drm_fixp2int_ceil") > Signed-off-by: Harry Wentland > Reviewed-by: Simon Ser > Reviewed-by: Melissa Wen It was already applied upstream: https://cgit.freedesktop.org/drm/drm-misc/commit/include?id=cf8837d7204481026335461629b84ac7f4538fa5 Thanks Melissa > --- > in

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

2024-03-14 Thread Melissa Wen
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. > > >>

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

2024-03-14 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > 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

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

2024-03-14 Thread Melissa Wen
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, you need to add 0.5 to the number and floor that, &g

Re: [PATCH 0/7] Additions to "Reimplement line-per-line pixel conversion for plane reading" series

2024-03-12 Thread Melissa Wen
> thought that it would be good to add some documentation on how to run > > them (patch #7), this patch should be added to the series as new patch. > > > > [1]: https://lore.kernel.org/r/20240304-yuv-v4-0-76beac8e9...@bootlin.com > > > > To: Rodrigo Siqueira &g

Re: [PATCH 2/7] drm/vkms: Add comments

2024-03-12 Thread Melissa Wen
On 03/06, Arthur Grillo wrote: Hi, can you describe better the scope of your changes? Limiting the scope in the commit message and also describing in the body a summary of what you are documenting and reasons. Thanks, Melissa > Signed-off-by: Arthur Grillo > --- >

Re: [PATCH 6/7] drm/vkms: Change the gray RGB representation

2024-03-12 Thread Melissa Wen
On 03/06, Arthur Grillo wrote: > Using the drm_fixed calls, this needs to be changed. Which in fact is > more correct, colour.YCbCr_to_RGB() gives 0x8080 for same the yuv > parameters. Hi Arthur, For consistency, shouldn't this change be together with the previous patch that uses the drm_fixed

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

2024-03-12 Thread Melissa Wen
Drop bits from commit description that didn't contribute >anything of value > > Fixes: db1f254f2cfaf ("drm/vkms: Add support to 1D gamma LUT") > Signed-off-by: Harry Wentland > Cc: Arthur Grillo > Reviewed-by: Melissa Wen Same. Already applied upstream: https://cgit.freed

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

2024-03-12 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > 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:

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

2024-03-12 Thread Melissa Wen
On 03/06, Arthur Grillo wrote: > As well noted by Pekka[1], the rounding of drm_fixp2int_round is wrong. > To round a number, you need to add 0.5 to the number and floor that, > drm_fixp2int_round() is adding 0.076. Make it add 0.5. > > [1]: >

[PATCH] drm/amd/display: check dc_link before dereferencing

2024-02-27 Thread Melissa Wen
Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 32efce81a5a7..46dd06e8fc7e 100644 --- a/drive

Re: [RFC PATCH 2/2] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-02-05 Thread Melissa Wen
On 01/26, Alex Hung wrote: > > > On 2024-01-26 09:28, Melissa Wen wrote: > > Replace raw edid handling (struct edid) with the opaque EDID type > > (struct drm_edid) on amdgpu_dm_connector for consistency. It may also > > prevent mismatch of approaches in differe

Re: [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to

2024-02-05 Thread Melissa Wen
On 01/29, Jani Nikula wrote: > On Fri, 26 Jan 2024, Mario Limonciello wrote: > > On 1/26/2024 10:28, Melissa Wen wrote: > >> Hi, > >> > >> I'm debugging a null-pointer dereference when running > >> igt@kms_connector_force_edid and the way I found to

[RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to

2024-01-26 Thread Melissa Wen
ssed - I'm looking for the best replacement. I appreciate any feedback and testing. Melissa Melissa Wen (2): drm/amd/display: fix null-pointer dereference on edid reading drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid .../gpu/drm/amd/display/amdgpu_dm/amdgpu

[RFC PATCH 2/2] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-01-26 Thread Melissa Wen
. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 63 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 9 +-- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 23 +++ 4 files changed, 51

[RFC PATCH 1/2] drm/amd/display: fix null-pointer dereference on edid reading

2024-01-26 Thread Melissa Wen
0f ("drm/amd/display: Remove unwanted drm edid references") Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++ 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive

[PATCH] drm/amd/display: cleanup inconsistent indenting in amdgpu_dm_color

2024-01-05 Thread Melissa Wen
smatch warnings: amdgpu_dm_update_plane_color_mgmt() warn: inconsistent indenting Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401051643.ppdbmg1u-...@intel.com/ Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +- 1

Re: [PATCH] drm/v3d: Show the memory-management stats on debugfs

2024-01-05 Thread Melissa Wen
m_device *dev = entry->dev; > + struct v3d_dev *v3d = to_v3d_dev(dev); > + > + spin_lock(>mm_lock); > + drm_mm_print(>mm, ); > + spin_unlock(>mm_lock); > + > + return 0; > +} LGTM. Reviewed-by: Melissa Wen > + > static const struct drm_debugfs_info v3

[RFC PATCH] drm/amd/display: fix bandwidth validation failure on DCN 2.1

2023-12-29 Thread Melissa Wen
, the atomic check needs to perform a full state validation. Therefore, set fast_validation to false in the dc_validate_global_state call for atomic check. Fixes: b8272241ff9d ("drm/amd/display: Drop dc_commit_state in favor of dc_commit_streams") Signed-off-by: Melissa Wen --- Hi, It's a

[PATCH] drm/amd/display: fix documentation for dm_crtc_additional_color_mgmt()

2023-12-14 Thread Melissa Wen
warning: expecting prototype for drm_crtc_additional_color_mgmt(). Prototype was for dm_crtc_additional_color_mgmt() instead Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312141801.o9ebcxt9-...@intel.com/ Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd

Re: [RFC PATCH v3 01/23] drm: Don't treat 0 as -1 in drm_fixp2int_ceil

2023-12-08 Thread Melissa Wen
On 12/06, Melissa Wen wrote: > On 11/08, Harry Wentland wrote: > > 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. > >

Re: [RFC PATCH v3 05/23] drm/vkms: Avoid reading beyond LUT array

2023-12-06 Thread Melissa Wen
On 12/06, Melissa Wen wrote: > On 11/10, Arthur Grillo wrote: > > > > > > On 08/11/23 13:36, Harry Wentland wrote: > > > When the floor LUT index (drm_fixp2int(lut_index) is the last > > > index of the array the ceil LUT index will point to an entry >

Re: [RFC PATCH v3 05/23] drm/vkms: Avoid reading beyond LUT array

2023-12-06 Thread Melissa Wen
On 11/10, Arthur Grillo wrote: > > > On 08/11/23 13:36, Harry Wentland wrote: > > When the floor LUT index (drm_fixp2int(lut_index) is the last > > index of the array the ceil LUT index will point to an entry > > beyond the array. Make sure we guard against it and use the > > value of the floor

Re: [RFC PATCH v3 03/23] drm/vkms: Create separate Kconfig file for VKMS

2023-12-06 Thread Melissa Wen
On 11/08, Harry Wentland wrote: > 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) LGTM. I plan to apply this one to drm-misc-next.

Re: [RFC PATCH v3 01/23] drm: Don't treat 0 as -1 in drm_fixp2int_ceil

2023-12-06 Thread Melissa Wen
AIU, this one: Fixes: 64566b5e767f9 ("drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil") Reviewed-by: Melissa Wen > Signed-off-by: Harry Wentland > Reviewed-by: Simon Ser > --- > include/drm/drm_fixed.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH next] drm/v3d: Fix missing error code in v3d_submit_cpu_ioctl()

2023-12-04 Thread Melissa Wen
; > + ret = -EINVAL; > goto fail; > } > > if (args->bo_handle_count != > cpu_job_bo_handle_count[cpu_job->job_type]) { > DRM_DEBUG("This CPU job was not submitted with the proper > number of BOs

[PATCH v3 6/9] drm/amd/display: create DCN3-specific log for MPC state

2023-11-28 Thread Melissa Wen
-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 48 ++- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 7 +++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc

[PATCH v3 8/9] drm/amd/display: add DPP and MPC color caps to DTN log

2023-11-28 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/hwss/dcn10/dcn10_hwseq.c | 23 +++ .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 23 +++ 2 files changed, 46 insertions(+) diff --git

[PATCH v3 9/9] drm/amd/display: hook up DCN20 color blocks data to DTN log

2023-11-28 Thread Melissa Wen
31.32. Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 30 ++--- .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 24 +++- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../amd/display/dc/hwss/dcn20

[PATCH v3 7/9] drm/amd/display: hook up DCN30 color blocks data to DTN log

2023-11-28 Thread Melissa Wen
remap matrix log v3: - read MPC gamut remap matrix in fixed 31.32 format - extend to DCN3.0+ and DCN3.1+ drivers (Harry) Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + .../gpu/drm/amd/display/dc/dcn31

[PATCH v3 5/9] drm/amd/display: add get_gamut_remap helper for MPC3

2023-11-28 Thread Melissa Wen
We want to be able to read the MPC's gamut remap matrix similar to what we do with .dpp_get_gamut_remap functions. On the other hand, we don't need a hook here because only DCN3+ has the MPC gamut remap block, being absent in previous families. Signed-off-by: Melissa Wen --- .../gpu/drm/amd

[PATCH v3 2/9] drm/amd/display: Add dpp_get_gamut_remap functions

2023-11-28 Thread Melissa Wen
From: Harry Wentland We want to be able to read the DPP's gamut remap matrix. v2: - code-style and doc comments clean-up (Melissa) Signed-off-by: Harry Wentland Signed-off-by: Melissa Wen --- .../drm/amd/display/dc/basics/conversion.c| 34 + .../drm/amd/display/dc/basics

[PATCH v3 4/9] drm/amd/display: fill up DCN3 DPP color state

2023-11-28 Thread Melissa Wen
Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 37 ++- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 8 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd

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

2023-11-28 Thread Melissa Wen
functions Melissa Wen (8): drm/amd/display: decouple color state from hw state log drm/amd/display: read gamut remap matrix in fixed-point 31.32 format drm/amd/display: fill up DCN3 DPP color state drm/amd/display: add get_gamut_remap helper for MPC3 drm/amd/display: create DCN3-specific log

[PATCH v3 3/9] drm/amd/display: read gamut remap matrix in fixed-point 31.32 format

2023-11-28 Thread Melissa Wen
Instead of read gamut remap data from hw values, convert HW register values (S2D13) into a fixed-point 31.32 matrix for color state log. Change DCN10 log to print data in the format of the gamut remap matrix. Signed-off-by: Melissa Wen --- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 38

[PATCH v3 1/9] drm/amd/display: decouple color state from hw state log

2023-11-28 Thread Melissa Wen
Prepare to hook up color state log according to the DCN version. v3: - put functions in single line (Siqueira) Signed-off-by: Melissa Wen --- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 26 +-- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm

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

2023-11-16 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 v5 31/32] drm/amd/display: add plane CTM support

2023-11-16 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 v5 32/32] drm/amd/display: Add 3x4 CTM support for plane CTM

2023-11-16 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 v5 27/32] drm/amd/display: add plane blend LUT and TF support

2023-11-16 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 v5 29/32] drm/amd/display: copy 3D LUT settings from crtc state to stream_update

2023-11-16 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 v5 28/32] drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG

2023-11-16 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 v5 23/32] drm/amd/display: add plane shaper LUT support

2023-11-16 Thread Melissa Wen
) 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/display/amdgpu_dm/amdgpu_dm_color.c | 93 ++- 3 files changed, 92 insertions(+), 4 deletions(-) diff

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

2023-11-16 Thread Melissa Wen
instead of # of entries Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 102 +- 2 files changed, 99 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd

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

2023-11-16 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 v5 22/32] drm/amd/display: add HDR multiplier support

2023-11-16 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 v5 14/32] drm/amd/display: encapsulate atomic regamma operation

2023-11-16 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 | 55 --- 1 file changed, 35 insertions(+), 20 deletions

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

2023-11-16 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 v5 19/32] drm/amd/display: add plane degamma TF and LUT support

2023-11-16 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 v5 17/32] drm/amd/display: mark plane as needing reset if color props change

2023-11-16 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 v5 18/32] drm/amd/display: decouple steps for mapping CRTC degamma to DC plane

2023-11-16 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 v5 15/32] drm/amd/display: add CRTC gamma TF support

2023-11-16 Thread Melissa Wen
). v2: - update crtc color mgmt if regamma TF differs between states (Joshua) - map inverse EOTF to DC transfer function (Melissa) v3: - update AMDGPU TF list v4: - update comment regarding regamma behavior Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen

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

2023-11-16 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 v5 21/32] drm/amd/display: add dc_fixpt_from_s3132 helper

2023-11-16 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 v5 09/32] drm/amd/display: add plane 3D LUT driver-specific properties

2023-11-16 Thread Melissa Wen
-dimension v5: - get lut3d blob correctly (Joshua) - fix doc about 3d-lut dimension size (Sebastian) Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 18 ++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 9 +++ .../amd/display/amdgpu_dm

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

2023-11-16 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 v5 13/32] drm/amd/display: add comments to describe DM crtc color mgmt behavior

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

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

2023-11-16 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) Reviewed-by: Harry Wentland 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/d

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

2023-11-16 Thread Melissa Wen
Wentland Co-developed-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

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

2023-11-16 Thread Melissa Wen
and comments (Harry) 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 | 7 ++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 8 +++ .../amd/display/amdgpu_dm/amdgpu_dm_color.c

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

2023-11-16 Thread Melissa Wen
(Harry) - replace BT709 EOTF by inv OETF v5: - get shaper blob correctly (Joshua) Reviewed-by: Harry Wentland 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

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

2023-11-16 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 Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 27 +--- .../amd/display/amdgpu_dm

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

2023-11-16 Thread Melissa Wen
out TF+LUT behavior in the commit and comments (Harry) v5: - get blend blob correctly Reviewed-by: Harry Wentland 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

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

2023-11-16 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 v5 03/32] drm/drm_plane: track color mgmt changes per plane

2023-11-16 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 v5 04/32] drm/amd/display: add driver-specific property for plane degamma LUT

2023-11-16 Thread Melissa Wen
prop description - move private color operations from amdgpu_display to amdgpu_dm_color v5: - get degamma blob correctly (Joshua) 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

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

2023-11-16 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 v5 00/32] drm/amd/display: add AMD driver-specific properties for color mgmt

2023-11-16 Thread Melissa Wen
ies are guarded by cflags `AMD_PRIVATE_COLOR`. Best Regards, Melissa Wen [1] https://github.com/ValveSoftware/gamescope [2] https://store.steampowered.com/news/app/1675200/view/3686804163591367815 [3] https://lore.kernel.org/dri-devel/20230721132431.692158-1-m...@igalia.com Joshua Ashton (14):

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

2023-11-16 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: [PATCH] MAINTAINERS: Add Maira to V3D maintainers

2023-11-08 Thread Melissa Wen
On 11/06, Maíra Canal wrote: > I've been contributing to V3D with improvements, reviews, testing and > debugging. Therefore, add myself as a co-maintainer of the V3D driver. > > Signed-off-by: Maíra Canal Acked-by: Melissa Wen > --- > MAINTAINERS | 1 + > 1 file

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

  1   2   3   4   5   6   7   >