Re: [PATCH V2 2/2] drm/amd/display/dcn401: use pre-allocated temp structure for bounding box

2024-06-05 Thread Harry Wentland
0x30 [amdgpu] > > v2: drop extra memcpy > > Fixes: 669d6b078ed8 ("drm/amd/display: avoid large on-stack structures") > Suggested-by: Hamza Mahfooz > Signed-off-by: Alex Deucher > Cc: George Zhang > Cc: Arnd Bergmann > Cc: harry.wentl...@amd.com > Cc: sunpeng.

Re: [PATCH] drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update

2024-06-05 Thread Harry Wentland
queira > Cc: Roman Li > Cc: Hersen Wu > Cc: Alex Hung > Cc: Aurabindo Pillai > Cc: Harry Wentland > Signed-off-by: Srinivasan Shanmugam Reviewed-by: Harry Wentland Harry > --- > .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 16 > 1

Re: [PATCH] drm/amd/display: use pre-allocated temp structure for bounding box

2024-06-05 Thread Harry Wentland
; Signed-off-by: Alex Deucher > Cc: George Zhang > Cc: Arnd Bergmann > Cc: harry.wentl...@amd.com > Cc: sunpeng...@amd.com > Cc: rodrigo.sique...@amd.com Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dc.h | 1 + > .../d

Re: [PATCH] drm/amd/display: Add null check for 'afb' in amdgpu_dm_update_cursor

2024-06-05 Thread Harry Wentland
(!dc_stream_set_cursor_position(crtc_state->stream, > 8443 )) > 8444 DRM_ERROR("DC failed to set cursor > position\n"); > 8445 > 8446 update->cursor_position =

Re: [PATCH 13/13] drm/amd/display: Enable copying of bounding box data from VBIOS DMUB

2024-05-27 Thread Harry Wentland
On 2024-05-23 15:20, Aurabindo Pillai wrote: > Allocate some memory, send the address in chunks to dmub, and finally > ask it to copy the bounding box data into the newly allocated memory. > > Signed-off-by: Aurabindo Pillai The entire series is Acked-by: Harry Went

Re: [PATCH v2] drm/amd/display: Enable colorspace property for MST connectors

2024-05-23 Thread Harry Wentland
: 69a959610229 ("drm/amd/display: Temporary Disable MST DP Colorspace Property"). Reported-and-tested-by: Tyler Schneider Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353 Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry --- drivers/gpu/drm/amd/display

Re: [PATCH] drm/amd/display: Pass errors from amdgpu_dm_init() up

2024-05-22 Thread Harry Wentland
On 2024-05-19 09:02, Mario Limonciello wrote: > Errors in amdgpu_dm_init() are silently ignored and dm_hw_init() > will succeed. However often these are fatal errors and it would > be better to pass them up. > > Signed-off-by: Mario Limonciello Reviewed-by: Harry W

Re: [PATCH] drm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position

2024-05-22 Thread Harry Wentland
dc_allow_idle_optimizations(dc, false); > > Fixes: f63f86b5affc ("drm/amd/display: Separate setting and programming of > cursor") > Reported-by: Dan Carpenter > Cc: Harry Wentland > Cc: Tom Chung > Cc: Rodrigo Siqueira > Cc: Roman Li > Cc: Aurab

Re: [PATCH] drm/amd/display: Don't register panel_power_savings on OLED panels

2024-05-13 Thread Harry Wentland
/drm/amd/-/issues/3359 Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 --- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers

Re: [PATCH] drm/amdgpu: Assign correct bits for SDMA HDP flush

2024-05-07 Thread Harry Wentland
On 2024-05-06 22:50, Lazar, Lijo wrote: > > > On 5/7/2024 6:00 AM, Harry Wentland wrote: >> This patch is causing crashes of Manor Lords on my Navi 21 on the 6.8.9 >> stable kernel. It leads to an assertion failure in wine: >> >> File: ../src-wine/dlls/winevul

Re: [PATCH] drm/amdgpu: Assign correct bits for SDMA HDP flush

2024-05-06 Thread Harry Wentland
This patch is causing crashes of Manor Lords on my Navi 21 on the 6.8.9 stable kernel. It leads to an assertion failure in wine: File: ../src-wine/dlls/winevulkan/loader_thunks.c Line: 3621 Expression "!status && vkEndCommandBuffer"" This happens both with radv and amdvlk. It starts happening

Re: [PATCH v2] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-30 Thread Harry Wentland
On 2024-04-25 07:21, Dan Carpenter wrote: > These lines are indented too far. Clean the whitespace. > Thanks. Reviewed-by: Harry Wentland In the process of merging it into amd-staging-drm-next. Harry > Signed-off-by: Dan Carpenter > --- > v2: Delete another blank line

Re: [PATCH][next] drm/amd/display: Fix spelling various spelling mistakes

2024-04-30 Thread Harry Wentland
On 2024-04-24 12:28, Colin Ian King wrote: > There are various spelling mistakes in dml2_printf messages, fix them. > Thanks. Reviewed-by: Harry Wentland In the process of merging it into amd-staging-drm-next. Harry > Signed-off-by: Colin Ian King > --- > .../dc

Re: [PATCH] drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity()

2024-04-30 Thread Harry Wentland
d value > and definition, so silence the warning by casting the enumeration to an > integer explicitly to make it clear to the compiler. > > Fixes: 3df48ddedee4 ("drm/amd/display: Add new DCN401 sources") Thanks. Reviewed-by: Harry Wentland In the process of merging it

Re: [PATCH v4 13/15] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-04-30 Thread Harry Wentland
I and method of adjusting CFLAGS. > > Acked-by: Alex Deucher > Reviewed-by: Christoph Hellwig Really nice set of changes. Acked-by: Harry Wentland Harry > Signed-off-by: Samuel Holland > --- > > (no changes since v2) > > Changes in v2: > - Split altivec remova

Re: [PATCH v4 12/15] drm/amd/display: Only use hard-float, not altivec on powerpc

2024-04-30 Thread Harry Wentland
t; to only enable FPU use. > > Signed-off-by: Michael Ellerman > Acked-by: Alex Deucher > Signed-off-by: Samuel Holland Acked-by: Harry Wentland Harry > --- > > (no changes since v2) > > Changes in v2: > - New patch for v2 > > drivers/gpu/drm/amd/displa

Re: [PATCH] drm/amd/display: Disable panel replay by default for now

2024-04-30 Thread Harry Wentland
0 ("drm/amd/display: Enable Panel Replay for static screen > use case") > Signed-off-by: Mario Limonciello Acked-by: Harry Wentland Harry > --- > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 +++ > 1 file changed, 12 insertions(+), 9 deletions(-) &g

Re: [PATCH v2 2/2] drm/amd/display: Override DCN410 IP version

2024-04-30 Thread Harry Wentland
On 2024-04-30 09:43, Aurabindo Pillai wrote: > Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is > made in DC codebase to use 4.1.0 > > Signed-off-by: Aurabindo Pillai Series is Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/amdgpu/

Re: [PATCH] drm/amd/display: Override DCN410 IP version

2024-04-30 Thread Harry Wentland
On 2024-04-30 09:23, Aurabindo Pillai wrote: > Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is > made in DC codebase to use 4.1.0 > > Signed-off-by: Aurabindo Pillai > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 + > 1 file changed, 5 insertions(+) >

Re: [PATCH] drm/amd/display: Remove unnecessary NULL check in dcn20_set_input_transfer_func

2024-04-23 Thread Harry Wentland
e, > > Fixes the below Smatch static checker warning: > drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn20/dcn20_hwseq.c:1112 > dcn20_set_input_transfer_func() warn: address of > 'plane_state->in_transfer_func' is non-NULL > > Fixes: 285a7054bf81 ("drm/amd/

Re: [PATCH] Revert "drm/amd/display: Add fallback configuration when set DRR"

2024-04-22 Thread Harry Wentland
oadworth > Cc: Daniel Wheeler > Cc: Harry Wentland > Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Harry > --- > .../gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c| 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --g

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] drm/amd/display: Set color_mgmt_changed to true on unsuspend

2024-04-17 Thread Harry Wentland
hua Ashton Going through old emails and found this. Reviewed-by: Harry Wentland Pulling it into amd-staging-drm-next. Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm

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] drm/amd/display: Enable ogam_ram for dcn32+dcn35+dcn351

2024-04-15 Thread Harry Wentland
On 2024-04-15 11:27, Melissa Wen wrote: > On 04/12, Harry Wentland wrote: >> >> >> On 2024-04-12 16:22, Harry Wentland wrote: >>> >>> >>> On 2024-04-12 12:26, Melissa Wen wrote: >>>> On 04/12, Joshua Ashton wrote: >>>>>

Re: [PATCH] drm/amd/display: Enable ogam_ram for dcn32+dcn35+dcn351

2024-04-12 Thread Harry Wentland
On 2024-04-12 16:22, Harry Wentland wrote: > > > On 2024-04-12 12:26, Melissa Wen wrote: >> On 04/12, Joshua Ashton wrote: >>> >>> >>> On 4/11/24 3:26 PM, Melissa Wen wrote: >>>> On 04/10, Joshua Ashton wrote: >>

Re: [PATCH] drm/amd/display: Enable ogam_ram for dcn32+dcn35+dcn351

2024-04-12 Thread Harry Wentland
e introduced and implemented here: > - https://gitlab.freedesktop.org/agd5f/linux/-/commit/a820190204aef > - https://gitlab.freedesktop.org/agd5f/linux/-/commit/90f33674a0756 > and we would need to update the DM color mgmt anyway to check these > new/unknown functions. > > Seems

Re: [PATCH] Revert "drm/amd/display: fix USB-C flag update after enc10 feature init"

2024-04-12 Thread Harry Wentland
; Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3254 >> Signed-off-by: Alex Deucher >> Cc: Muhammad Ahmed >> Cc: Tom Chung >> Cc: Charlene Liu >> Cc: Hamza Mahfooz >> Cc: Harry Wentland Reviewed-by: Harry Wentland Harry >> --- >

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 30/43] drm/amd/display: Enable cur_rom_en even if cursor degamma is not enabled

2024-04-01 Thread Harry Wentland
On 2024-04-01 09:40, Melissa Wen wrote: > > > On 28/03/2024 16:50, roman...@amd.com wrote: >> From: Rodrigo Siqueira Where is the commit description. Why is this needed? What is this fixing? Like Melissa said, this might cause a regression. Harry >> >> Signed-off-by: Rodrigo Siqueira >>

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] drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR

2024-03-12 Thread Harry Wentland
er color space. > So apparently this caused regressions on some panels. I sent a revert and we'll need to revisit this. https://gitlab.freedesktop.org/drm/amd/-/issues/3207 https://gitlab.freedesktop.org/drm/amd/-/issues/3151 > Signed-off-by: Joshua Ashton > > Cc: Harry

Re: [PATCH] drm/amd/display: Get min/max vfreq from display_info

2024-03-12 Thread Harry Wentland
On 2024-03-12 10:58, Alex Deucher wrote: > On Tue, Mar 12, 2024 at 9:57 AM Harry Wentland wrote: >> >> We need the min/max vfreq on the amdgpu_dm_connector in order to >> program VRR. >> >> Fixes: db3e4f1cbb84 ("drm/amd/display: Use freesync when >&

[PATCH] Revert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR"

2024-03-12 Thread Harry Wentland
bfd4e0b7eb4467f9db5bb37268565afec6cf513e. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3207 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3151 Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++- .../amd/display/modules/info_packet

[PATCH] drm/amd/display: Get min/max vfreq from display_info

2024-03-12 Thread Harry Wentland
We need the min/max vfreq on the amdgpu_dm_connector in order to program VRR. Fixes: db3e4f1cbb84 ("drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found") Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +-- 1 file

Re: [PATCH v2] drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

2024-03-08 Thread Harry Wentland
Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry --- v1->v2: * Use is_dp_capable_without_timing_msa() as well for new case * Move edid checks up a level --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 +++ 1 file changed, 11 insertions(+)

Re: [PATCH] drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

2024-03-08 Thread Harry Wentland
On 2024-03-05 15:57, Mario Limonciello wrote: The monitor shipped with the Framework 16 supports VRR [1], but it's not being advertised. This is because the detailed timing block doesn't contain `EDID_DETAIL_MONITOR_RANGE` which amdgpu looks for to find min and max frequencies. This check

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: [PATCH] drm/amd/display: handle range offsets in VRR ranges

2024-03-01 Thread Harry Wentland
s://gitlab.freedesktop.org/drm/amd/-/issues/3203 >> Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Harry >> --- >> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 ++- >> 1 file changed, 14 insertions(+), 5 deletions(-) >> >> diff

Re: [PATCH] drm/amd/display: Add monitor patch for specific eDP

2024-02-28 Thread Harry Wentland
control interface > is incorrect. > > [HOW] > Add a new panel patch to remove sink ext caps(HDR,OLED...etc) > > Cc: sta...@vger.kernel.org # 6.5.x > Cc: Hamza Mahfooz > Cc: Tsung-hua Lin > Cc: Chris Chi > Cc: Harry Wentland > Tested-by: Daniel Wheeler >

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 28/42] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

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

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

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

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

[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

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: [PATCH] drm/amd/display: Clear phantom stream count and plane count

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

Re: [PATCH] drm/amd/display: only call sysfs_remove_group() for eDP connectors

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

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] drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'

2024-01-23 Thread Harry Wentland
ing too much 30 vs 10 > > Fixes: c06e09b76639 ("drm/amd/display: Add DSC parameters logging to debugfs") > Cc: Alex Hung > Cc: Qingqing Zhuo > Cc: Rodrigo Siqueira > Cc: Aurabindo Pillai > Cc: Alex Deucher > Signed-off-by: Srinivasan Shanmugam Reviewed-by:

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

  1   2   3   4   5   6   7   8   9   10   >