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

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

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

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

Re: [RFC PATCH v2 06/17] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2023-11-08 Thread Harry Wentland
On 2023-11-08 07:18, Shankar, Uma wrote: > > >> -Original Message----- >> From: Harry Wentland >> Sent: Friday, October 20, 2023 2:51 AM >> To: dri-devel@lists.freedesktop.org >> Cc: wayland-de...@lists.freedesktop.org; Harry Wentland >> ; Vil

Re: [Intel-gfx] [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-05-18 Thread Harry Wentland
On 5/18/22 01:38, Modem, Bhanuprakash wrote: > On Mon-16-05-2022 02:09 pm, Jani Nikula wrote: >> On Mon, 02 May 2022, Harry Wentland wrote: >>> Both the kernel and IGT series look good to me. >>> >>> I recommend you merge the entire kernel set as one into d

[PATCH v2] drm: Don't block HDR_OUTPUT_METADATA on unknown EOTF

2022-06-01 Thread Harry Wentland
kka) Signed-off-by: Harry Wentland Cc: ppaala...@gmail.com Cc: sebastian.w...@redhat.com Cc: vpros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Acked-by: Pekka Paalanen --- drivers/gpu/drm/drm_edid.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.

[PATCH] drm: Don't block HDR_OUTPUT_METADATA on unknown EOTF

2022-05-24 Thread Harry Wentland
immediately make use of it. Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/609 Signed-off-by: Harry Wentland Cc: ppaala...@gmail.com Cc: sebastian.w...@redhat.com Cc: vpros...@amd.com Cc: Uma Shankar --- drivers/gpu/drm/drm_edid.c | 6 ++ 1 file changed, 2 insertions(+), 4

Re: [PATCH][next] drm/amdgpu/display: Fix spelling mistake "supporing" -> "supporting"

2022-06-23 Thread Harry Wentland
On 2022-06-23 04:09, Colin Ian King wrote: > There is a spelling mistake in a dml_print message. Fix it. > > Signed-off-by: Colin Ian King Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- > 1 file changed,

Re: [PATCH] drm/amd/display: Fix unsigned expression compared with zero

2022-07-07 Thread Harry Wentland
On 2022-07-07 14:22, Alex Deucher wrote: > On Wed, Jul 6, 2022 at 3:41 AM Zhongjun Tan wrote: >> >> From: Zhongjun Tan >> >> Fix unsigned expression compared with zero >> >> Signed-off-by: Zhongjun Tan >> --- >> .../gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 4 ++-- >> 1

Re: [RFC PATCH 2/5] Documentation/amdgpu/display: add DC color caps info

2022-06-28 Thread Harry Wentland
On 6/19/22 18:31, Melissa Wen wrote: > Add details about color correction capabilities and explain a bit about > differences between DC hw generations and also how they are mapped > between DRM and DC interface. Two schemas for DCN 2.0 and 3.0 > (rasterized from the original png) is included to

Re: [RFC PATCH 1/5] Documentation/amdgpu_dm: Add DM color correction documentation

2022-06-28 Thread Harry Wentland
nected > * displays will be forced to synchronize. > * @dmcub_trace_event_en: enable dmcub trace events > + * @num_of_edps: dumber of embedded Display Ports /s/dumber/number Thanks for turning these into kerneldocs. With the above minor nit fixed this is Reviewed-by:

Re: [RFC PATCH 0/5] DRM CRTC 3D LUT interface for AMD DCN

2022-06-28 Thread Harry Wentland
On 2022-06-19 18:30, Melissa Wen wrote: > Hi, > > I've been working on a proposal to add 3D LUT interface to DRM CRTC > color mgmt, that means new **after-blending** properties for color > correction. As I'm targeting AMD display drivers, I need to map these > new properties to AMD DC

Re: [RFC PATCH 4/5] drm/drm_color_mgmt: add 3D LUT to color mgmt properties

2022-06-28 Thread Harry Wentland
On 6/19/22 18:31, Melissa Wen wrote: > Add 3D LUT for gammar correction using a 3D lookup table. The position > in the color correction pipeline where 3D LUT is applied depends on hw > design, being after CTM or gamma. If just after CTM, a shaper lut must > be set to shape the content for a

Re: [PATCH] drm/amd/display: Remove condition with no effect

2022-07-08 Thread Harry Wentland
On 2022-07-07 23:10, Zhongjun Tan wrote: > From: Zhongjun Tan > > Remove condition with no effect Please explain why you think this has no effect. Harry > > Signed-off-by: Zhongjun Tan > --- > .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 4 > 1 file changed, 4

Re: [PATCH] drm/amd/display: correct check of coverage blend mode

2022-07-12 Thread Harry Wentland
st robot > Reported-by: Dan Carpenter > Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Harry > --- > 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/amdgp

Re: [RFC PATCH 4/5] drm/drm_color_mgmt: add 3D LUT to color mgmt properties

2022-06-28 Thread Harry Wentland
On 2022-06-27 08:18, Ville Syrjälä wrote: > On Sun, Jun 19, 2022 at 09:31:03PM -0100, Melissa Wen wrote: >> Add 3D LUT for gammar correction using a 3D lookup table. The position >> in the color correction pipeline where 3D LUT is applied depends on hw >> design, being after CTM or gamma. If

Re: [PATCH] drm/amd/display: remove repeated includes

2022-07-06 Thread Harry Wentland
On 2022-07-06 05:13, Guo Zhengkui wrote: > Remove a repeated "#include " > > Signed-off-by: Guo Zhengkui Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/os_types.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers

Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DEBUG_FS is not set

2022-06-15 Thread Harry Wentland
On 2022-06-15 17:00, Alex Deucher wrote: > amdgpu_dm_crtc_late_register is only used when CONFIG_DEBUG_FS > so make it dependent on that. > > Fixes: 4cd79f614b50 ("drm/amd/display: Move connector debugfs to drm") > Cc: Bhanuprakash Modem > Cc: Harry Wentland >

Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Harry Wentland
On 2022-06-14 11:57, Randy Dunlap wrote: > Fix build error when CONFIG_DEBUG_FS is not enabled by adding a > stub function for crtc_debugfs_init(). > > Eliminates this build error: > > ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function > ‘amdgpu_dm_crtc_late_register’:

DRM/KMS PWL API Thoughts and Questions

2022-06-10 Thread Harry Wentland
(I'm sending this as an email as lowest common denominator but feel an issue on the color-and-hdr repo would be a better interface for productive discussion. Please pop over to https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/10 if you agree. Hopefully we can drive the discussion there

Re: [PATCH] drm/amd/display: Enable building new display engine with KCOV enabled

2022-07-13 Thread Harry Wentland
enabled for the rest of the kernel. > > Fixes: 9d1d02ff3678 ("drm/amd/display: Don't build DCN1 when kcov is enabled") > Cc: Arnd Bergmann > Cc: Leo Li > Signed-off-by: Guenter Roeck Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/

Re: [Intel-gfx] [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-05-02 Thread Harry Wentland
gt;> drm >>> layer. >>> >>> This patch will also move "Current" bpc to the crtc debugfs from >>> connector >>> debugfs, since we are getting this info from crtc_state. >>> >>> Cc: Harry Wentland >>> Cc: Rodrigo Siqueira >

Re: [Intel-gfx] [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-05-02 Thread Harry Wentland
On 2022-05-02 10:27, Modem, Bhanuprakash wrote: > On Mon-02-05-2022 07:08 pm, Harry Wentland wrote: >> >> >> On 2022-05-02 09:28, Modem, Bhanuprakash wrote: >>> On Fri-29-04-2022 08:02 pm, Murthy, Arun R wrote: >>>> >>>> >>>

Re: [PATCH v4] drm/amdgpu: Disable ABM when AC mode

2022-04-27 Thread Harry Wentland
On 2022-04-27 04:08, Ryan Lin wrote: Disable ABM feature when the system is running on AC mode to get the more perfect contrast of the display. v2: remove "UPSTREAM" from the subject. v3: adv->pm.ac_power updating by amd gpu_acpi_event_handler. V4: Add the file I lost to fix the build

Re: How should "max bpc" KMS property work?

2022-04-27 Thread Harry Wentland
On 2022-04-27 06:52, Pekka Paalanen wrote: > Hi Ville and Alex, > > thanks for the replies. More below. > > TL;DR: > > My take-away from this is that I should slam 'max bpc' to the max by > default, and offer a knob for the user in case they want to lower it. > > > On Tue, 26 Apr 2022

Re: [V2 1/3] drm/debug: Expose connector's max supported bpc via debugfs

2022-05-02 Thread Harry Wentland
comments (Harry) > > Cc: Jani Nikula > Cc: Ville Syrjälä > Cc: Harry Wentland > Signed-off-by: Bhanuprakash Modem Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/drm_debugfs.c | 21 + > 1 file changed, 21 insertions(+) > >

Re: [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-05-02 Thread Harry Wentland
tc debugfs from > connector debugfs, since we are getting this info from crtc_state. > > Cc: Harry Wentland > Cc: Rodrigo Siqueira > Signed-off-by: Bhanuprakash Modem > Reported-by: kernel test robot Reviewed-by: Harry Wentland Harry > --- > .../gpu/drm/amd/display

Re: [Intel-gfx] [V2 3/3] drm/amd/display: Move connector debugfs to drm

2022-05-02 Thread Harry Wentland
On 2022-05-02 10:29, Harry Wentland wrote: > > > On 2022-05-02 10:27, Modem, Bhanuprakash wrote: >> On Mon-02-05-2022 07:08 pm, Harry Wentland wrote: >>> >>> >>> On 2022-05-02 09:28, Modem, Bhanuprakash wrote: >>>

Re: [PATCH v2] drm/amd/display: add an ASSERT() to irq service functions

2022-10-17 Thread Harry Wentland
On 2022-10-17 11:38, Hamza Mahfooz wrote: > Currently, if we encounter unimplemented functions, it is difficult to > tell what caused them just by looking at dmesg and that is compounded by > the fact that it is often hard to reproduce said issues, for instance we > have had reports of this

Re: [PATCH -next] drm/amd/display: make dcn32_mmhubbub_funcs static

2022-10-19 Thread Harry Wentland
. Should it be static? > > Signed-off-by: ruanjinjie Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhu

Re: [PATCH -next] drm/amd/display: make dcn32_mpc_funcs static

2022-10-19 Thread Harry Wentland
tatic? > > Signed-off-by: ruanjinjie Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c > b/drivers/gpu/dr

Re: [PATCH] drm/amd/display: Remove duplicate code for DCN314 DML calculation

2022-10-21 Thread Harry Wentland
On 2022-10-20 18:10, Rafael Mendonca wrote: > This is an extension of commit fd3bc691fc7b ("drm/amd/display: Remove > duplicate code across dcn30 and dcn31"), which removed duplicate code for > the function CalculateBytePerPixelAnd256BBlockSizes() across dcn30 and > dcn31. At the time the

Re: [PATCH 3/3] Revert "drm/amd/display: Limit max DSC target bpp for specific monitors"

2022-10-25 Thread Harry Wentland
Series is Reviewed-by: Harry Wentland Harry On 2022-10-24 15:22, Hamza Mahfooz wrote: > This reverts commit 55eea8ef98641f6e1e1c202bd3a49a57c1dd4059. > > This quirk is now handled in the DRM core, so we can drop all of > the internal code that was added to handle it. > > Si

Re: [PATCH v3] drm/amd/display: add an ASSERT() to irq service functions

2022-10-17 Thread Harry Wentland
counter an unimplemented function. > > Signed-off-by: Hamza Mahfooz Reviewed-by: Harry Wentland Harry > --- > v2: detail specific instance that I'm interested in and use ASSERT() > instead of WARN(). > > v3: move ASSERT()s inside the new if blocks. > --- > .

Re: [PATCH] drm/amd/display: add parameter backlight_min

2022-10-31 Thread Harry Wentland
e it looks like this if I wanted to set the first device to a minimum of 2 and leave the default for the 2nd one: amdgpu.backlight_min=2:-1 Either way, this patch is Reviewed-by: Harry Wentland Harry > Link: https://bugzilla.kernel.org/show_bug.cgi?id=203439>> > Signed-off-by: Fili

Re: [PATCH] drm/amd/display (gcc13): fix enum mismatch

2022-10-31 Thread Harry Wentland
*, int)' > > I.e. the type of the 2nd parameter of > rn_vbios_smu_set_dcn_low_power_state() in the declaration is int, while > the definition spells enum dcn_pwr_state. Synchronize them to the > latter (and add a forward enum declaration). > > Cc: Martin Liska > Cc: Harry W

Re: [PATCH v2] drm/plane-helper: Add a drm_plane_helper_atomic_check() helper

2022-09-13 Thread Harry Wentland
On 2022-09-13 05:33, Javier Martinez Canillas wrote: > Provides a default plane state check handler for primary planes that are a > fullscreen scanout buffer and whose state scale and position can't change. > Even though this might be how some drivers are handling the primary plane this

Re: [PATCH v2] drm/plane-helper: Add a drm_plane_helper_atomic_check() helper

2022-09-13 Thread Harry Wentland
On 2022-09-13 10:46, Javier Martinez Canillas wrote: > On 9/13/22 15:49, Harry Wentland wrote: >> >> >> On 2022-09-13 05:33, Javier Martinez Canillas wrote: >>> Provides a default plane state check handler for primary planes that are a >>> fullscre

Re: [PATCH 03/15] drm/amd/display: stop using connector->override_edid

2022-10-11 Thread Harry Wentland
aconnector->base.name); > > aconnector->base.force = DRM_FORCE_OFF; > - aconnector->base.override_edid = false; I'm not even sure the DRM_FORCE_OFF business is right. Either way, I don't think amdgpu should be messing with override_edid, so this is Re

Re: [PATCH -next] drm/amd/display: Simplify bool conversion

2022-10-11 Thread Harry Wentland
On 2022-10-10 03:38, Yang Li wrote: > The result of 'pwr_status == 0' is Boolean, and the question mark > expression is redundant. > > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2354 > Reported-by: Abaci Robot > Signed-off-by: Yang Li Reviewed-by: Harr

Re: [PATCH v3 0/6] Add support for atomic async page-flips

2022-09-30 Thread Harry Wentland
es > drm: introduce drm_mode_config.atomic_async_page_flip_not_supported > drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits > drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP > amd/display: indicate support for atomic async page-flips on DC > Finally had a chance to

Re: [PATCH v3 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-09-30 Thread Harry Wentland
On 9/12/22 11:59, Maíra Canal wrote: > From: Tales Aparecida > > The fixed31_32 library performs a lot of the mathematical operations > involving fixed-point arithmetic and the conversion of integers to > fixed-point representation. > > This unit tests intend to assure the proper functioning

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Harry Wentland
On 2022-08-04 16:43, Nathan Chancellor wrote: > On Thu, Aug 04, 2022 at 09:24:41PM +0200, Arnd Bergmann wrote: >> On Thu, Aug 4, 2022 at 8:52 PM Linus Torvalds >> wrote: >>> >>> On Thu, Aug 4, 2022 at 11:37 AM Sudip Mukherjee (Codethink) >>> wrote:cov_trace_cmp git bisect points to

Re: [PATCH] drm/amd/display: remove DML Makefile duplicate lines

2022-08-02 Thread Harry Wentland
ot, remove the one entry between CONFIG_DRM_AMD_DC_DCN ifdef > guards. > > Signed-off-by: Magali Lemes Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/dis

Re: [PATCH] drm/amd/display: restore plane with no modifiers code.

2022-08-04 Thread Harry Wentland
get dropped. Linus noticed on this > rx580 and I've reproduced on FIJI which makes sense as these > are pre-modifier GPUs. > > With this applied, I get gdm back. > > Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") > Signed-off-by: Dave Airlie

Re: [PATCH] drm/amd/display: drop vblank_lock from struct amdgpu_display_manager

2022-10-31 Thread Harry Wentland
; > Signed-off-by: Hamza Mahfooz Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 --- > 2 files changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/disp

Re: [PATCH v6 42/45] drm/amd: Use `amdgpu_ucode_*` helpers for DMCU

2023-01-05 Thread Harry Wentland
cher > Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
On 1/5/23 15:12, Leo Li wrote: > > > > On 1/5/23 15:07, Hamza Mahfooz wrote: >> On 1/5/23 13:29, Harry Wentland wrote: >>> >>> >>> On 1/5/23 12:38, Hamza Mahfooz wrote: >>>> Currently, there are issues with enabling PSR-SU + DSC. This

Re: [PATCH -next] drm/amd/display: Remove redundant assignment to variable dc

2023-01-05 Thread Harry Wentland
check whether 'stream' is > NULL. Fix it by remove redundant assignment. > > Signed-off-by: Yi Yang If this didn't blow up until now we might not even need the NULL check below, but either way this is correct and Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/dis

Re: [PATCH v3] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
_granularity to feed the DSC slice height into > PSR-SU code. > > Signed-off-by: Hamza Mahfooz Acked-by: Harry Wentland Harry > --- > v2: move code to modules/power. > v3: use ASSERT() instead of WARN() and add a condition that clarifies > that PSR-SU + DSC can onl

Re: [PATCH v6 25/45] drm/amd: Use `amdgpu_ucode_release` helper for DMUB

2023-01-05 Thread Harry Wentland
On 1/4/23 22:42, Mario Limonciello wrote: > The `amdgpu_ucode_release` helper is for symmetry on unloading. > > Reviewed-by: Alex Deucher > Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry > --- > v5->v6: > * Adjust for amdgpu_ucode

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Harry Wentland
On 1/5/23 12:38, Hamza Mahfooz wrote: > Currently, there are issues with enabling PSR-SU + DSC. This stems from > the fact that DSC imposes a slice height on transmitted video data and > we are not conforming to that slice height in PSR-SU regions. So, pass > slice_height into su_y_granularity

Re: [PATCH v4] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-06 Thread Harry Wentland
_granularity to feed the DSC slice height into > PSR-SU code. > > Signed-off-by: Hamza Mahfooz Acked-by: Harry Wentland Would be good if you can get Leo's review. Harry > --- > v2: move code to modules/power. > v3: use ASSERT() instead of WARN() and add a condition that cla

Re: [PATCH v4 24/27] drm/amd/display: Load DMUB microcode during early_init

2023-01-04 Thread Harry Wentland
by: Mario Limonciello In addition to changing the FW load order this also changes request_firmware_direct to request_firmware but this seems to be the correct thing here anyways, since DMUB is not optional. Reviewed-by: Harry Wentland Harry > --- > v3->v4: > * New patch > ---

[PATCH v2 00/21] Enable Colorspace connector property in amdgpu

2023-01-13 Thread Harry Wentland
Dänzer Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Harry Wentland (16): drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF drm/connector: print max_requested_bpc in state debugfs drm/connector: Drop COLORIMETRY_NO_DATA drm/connector: Convert DRM_MODE_C

[PATCH v2 01/21] drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF

2023-01-13 Thread Harry Wentland
v3: Rebase; drm_hdmi_infoframe_set_hdr_metadata moved to drm_hdmi_helper.c Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc:

[PATCH v2 02/21] drm/connector: print max_requested_bpc in state debugfs

2023-01-13 Thread Harry Wentland
This is useful to understand the bpc defaults and support of a driver. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd

[PATCH v2 10/21] drm/amd/display: Signal mode_changed if colorspace changed

2023-01-13 Thread Harry Wentland
We need to signal mode_changed to make sure we update the output colorspace. v2: No need to call drm_hdmi_avi_infoframe_colorimetry as DC does its own infoframe packing. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc

[PATCH v2 17/21] drm/amd/display: Format input and output CSC matrix

2023-01-13 Thread Harry Wentland
Format the input and output CSC matrix so they look like 3x4 matrixes. This will make parsing them much easier and allows us to quickly spot potential mistakes. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel

[PATCH v2 16/21] drm/amd/display: Don't restrict bpc to 8 bpc

2023-01-13 Thread Harry Wentland
ly get all modes that can be supported by at least 6 bpc. The driver will enable the mode with the highest possible bpc that is supported by the display. v2: - explain why this is no longer needed (Michel) - refer to commit that fixed bpc fallback (Michel) Signed-off-by: Harry Wentland Cc: Pekk

[PATCH v2 20/21] drm/amd/display: Calculate output_color_space after pixel encoding adjustment

2023-01-13 Thread Harry Wentland
From: Joshua Ashton Code in get_output_color_space depends on knowing the pixel encoding to determine whether to pick between eg. COLOR_SPACE_SRGB or COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver. Signed-off-by: Joshua Ashton Signed-off-by: Harry Wentland Cc: Pe

[PATCH v2 13/21] drm/amd/display: Add support for explicit BT601_YCC

2023-01-13 Thread Harry Wentland
We use this by default but if userspace passes this explicitly we should respect it. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed-By: Joshua

[PATCH v2 11/21] drm/amd/display: Send correct DP colorspace infopacket

2023-01-13 Thread Harry Wentland
Look at connector->colorimetry to determine output colorspace. We don't want to impact current SDR behavior, so DRM_MODE_COLORIMETRY_DEFAULT preserves current behavior. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc:

[PATCH v2 15/21] drm/amd/display: Add default case for output_color_space switch

2023-01-13 Thread Harry Wentland
Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed-By: Joshua Ashton --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 43 ++- 1 file

Re: [PATCH] Revert "drm/display/dp_mst: Move all payload info into the atomic state"

2023-01-13 Thread Harry Wentland
>>> driver only tries to add/remove a specific payload stream only. The newly >>> design idea conflicts with the implementation in amdgpu nowadays. >>> >>> [How] >>> Revert this patch first. After addressing all regression problems caused by >>>

[PATCH v2 21/21] drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix

2023-01-13 Thread Harry Wentland
From: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd

[PATCH v2 14/21] drm/amd/display: Add debugfs for testing output colorspace

2023-01-13 Thread Harry Wentland
In order to IGT test colorspace we'll want to print the currently enabled colorspace on a stream. We add a new debugfs to do so, using the same scheme as current bpc reporting. This might also come in handy when debugging display issues. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc

[PATCH v2 07/21] drm/connector: Print connector colorspace in state debugfs

2023-01-13 Thread Harry Wentland
v3: Fix kerneldocs (kernel test robot) Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed

[PATCH v2 05/21] drm/connector: Pull out common create_colorspace_property code

2023-01-13 Thread Harry Wentland
Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed-By: Joshua Ashton --- drivers/gpu/drm

[PATCH v2 09/21] drm/amd/display: Register Colorspace property for DP and HDMI

2023-01-13 Thread Harry Wentland
We want compositors to be able to set the output colorspace on DP and HDMI outputs, based on the caps reported from the receiver via EDID. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc

[PATCH v2 03/21] drm/connector: Drop COLORIMETRY_NO_DATA

2023-01-13 Thread Harry Wentland
The value is the same as DEFAULT. The HDMI_COLORIMETRY_NO_DATA makes sense for the infopacket but it's meaningless for the connector colorspace. or, in otherwise, just means to go with driver default. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros

[PATCH v2 08/21] drm/amd/display: Always pass connector_state to stream validation

2023-01-13 Thread Harry Wentland
We need the connector_state for colorspace and scaling information and can get it from connector->state. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.

[PATCH v2 06/21] drm/connector: Allow drivers to pass list of supported colorspaces

2023-01-13 Thread Harry Wentland
to indicate support for all colorspaces (Jani) - Print drm_dbg_kms message when drivers pass 0 to signal that drivers should specify supported colorspaecs explicity (Jani) Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville

[PATCH v2 04/21] drm/connector: Convert DRM_MODE_COLORIMETRY to enum

2023-01-13 Thread Harry Wentland
This allows us to use strongly typed arguments. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Reviewed

[PATCH v2 12/21] drm/amd/display: Always set crtcinfo from create_stream_for_sink

2023-01-13 Thread Harry Wentland
From: Joshua Ashton Given that we always pass dm_state into here now, this won't ever trigger anymore. This is needed for we will always fail mode validation with invalid clocks or link bandwidth errors. Signed-off-by: Joshua Ashton Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc

[PATCH v2 19/21] drm/amd/display: Refactor avi_info_frame colorimetry determination

2023-01-13 Thread Harry Wentland
From: Joshua Ashton Replace the messy two if-else chains here that were on the same value with a switch on the enum. Signed-off-by: Joshua Ashton Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Joshua Ashton Cc: dri-devel

[PATCH v2 18/21] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB

2023-01-13 Thread Harry Wentland
From: Joshua Ashton Userspace might not aware whether we're sending RGB or YCbCr data to the display. If COLOR_SPACE_2020_RGB_FULLRANGE is requested but the output encoding is YCbCr we should send COLOR_SPACE_2020_YCBCR. Signed-off-by: Joshua Ashton Signed-off-by: Harry Wentland Cc: Pekka

Re: [PATCH] drm/amd/display: Fix set scaling doesn's work

2023-01-11 Thread Harry Wentland
tate->scaling != dm_new_con_state->scaling) >>   new_crtc_state->connectors_changed = true; >>   } >>   > > Hi, > > This change lgtm, and I also run it in our CI, and from IGT perspective, we > are good. > > Harry, do you have any comment about this change? > LGTM Reviewed-by: Harry Wentland Harry > Thanks > Siqueira

Re: [PATCH 16/16] drm/amd/display: Don't restrict bpc to 8 bpc

2022-12-23 Thread Harry Wentland
On 12/14/22 04:01, Pekka Paalanen wrote: > On Tue, 13 Dec 2022 18:20:59 +0100 > Michel Dänzer wrote: > >> On 12/12/22 19:21, Harry Wentland wrote: >>> This will let us pass kms_hdr.bpc_switch. >>> >>> I don't see any good reasons why we still n

Re: [PATCH] drm/display: Include missing DPCD definitions from DP2.0 spec

2022-12-09 Thread Harry Wentland
The commit subject is very generic. A better one might be "Add missing Adaptive Sync DPCD definitions" On 12/8/22 14:25, Sung Joon Kim wrote: > The missing DPCD defintions from DP2.0 spec is as follows: > > DOWNSPREAD_CTRL (107h): > ADAPTIVE_SYNC_SDP_EN (bit 6) > For sink

[PATCH 00/16] Enable Colorspace connector property in amdgpu

2022-12-12 Thread Harry Wentland
@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Harry Wentland (15): drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF drm/connector: print max_requested_bpc in state debugfs drm/connector: Drop COLORIMETRY_NO_DATA drm/connector: Convert DRM_MODE_COLORIMETRY to enum drm/connector

[PATCH 07/16] drm/connector: Print connector colorspace in state debugfs

2022-12-12 Thread Harry Wentland
Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org --- drivers/gpu/drm/drm_atomic.c| 1 + drivers/gpu/drm

[PATCH 03/16] drm/connector: Drop COLORIMETRY_NO_DATA

2022-12-12 Thread Harry Wentland
The value is the same as DEFAULT. The HDMI_COLORIMETRY_NO_DATA makes sense for the infopacket but it's meaningless for the connector colorspace. or, in otherwise, just means to go with driver default. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros

[PATCH 06/16] drm/connector: Allow drivers to pass list of supported colorspaces

2022-12-12 Thread Harry Wentland
Drivers might not support all colorspaces defined in dp_colorspaces and hdmi_colorspaces. This results in undefined behavior when userspace is setting an unsupported colorspace. Allow drivers to pass the list of supported colorspaces when creating the colorspace property. Signed-off-by: Harry

[PATCH 01/16] drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF

2022-12-12 Thread Harry Wentland
v3: Rebase; drm_hdmi_infoframe_set_hdr_metadata moved to drm_hdmi_helper.c Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.

[PATCH 02/16] drm/connector: print max_requested_bpc in state debugfs

2022-12-12 Thread Harry Wentland
This is useful to understand the bpc defaults and support of a driver. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org

Re: [PATCH v2] drm/display: Add missing Adaptive Sync DPCD definitions

2022-12-12 Thread Harry Wentland
les > of the line whichever occurs first. > VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED (bit 4) > Bit to check sink device has SDP framework version 1 capability You're missing your Signed-off-by. Make sure to add it before pushing. With that fixed this is:

[PATCH 05/16] drm/connector: Pull out common create_colorspace_property code

2022-12-12 Thread Harry Wentland
Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org --- drivers/gpu/drm/drm_connector.c | 54

[PATCH 10/16] drm/amd/display: Set colorspace for HDMI infoframe

2022-12-12 Thread Harry Wentland
Now that we have the HDMI colorimetry fill the corresponding AVI infoframe info. Also signal "mode_changed" if colorimetry changed. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashto

[PATCH 04/16] drm/connector: Convert DRM_MODE_COLORIMETRY to enum

2022-12-12 Thread Harry Wentland
This allows us to use strongly typed arguments. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org --- include/drm/display

[PATCH 15/16] drm/amd/display: Add default case for output_color_space switch

2022-12-12 Thread Harry Wentland
Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 43

[PATCH 09/16] drm/amd/display: Register Colorspace property for DP and HDMI

2022-12-12 Thread Harry Wentland
We want compositors to be able to set the output colorspace on DP and HDMI outputs, based on the caps reported from the receiver via EDID. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc

[PATCH 16/16] drm/amd/display: Don't restrict bpc to 8 bpc

2022-12-12 Thread Harry Wentland
value. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file

[PATCH 11/16] drm/amd/display: Send correct DP colorspace infopacket

2022-12-12 Thread Harry Wentland
Look at connector->colorimetry to determine output colorspace. We don't want to impact current SDR behavior, so DRM_MODE_COLORIMETRY_DEFAULT preserves current behavior. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Vi

[PATCH 08/16] drm/amd/display: Always pass connector_state to stream validation

2022-12-12 Thread Harry Wentland
We need the connector_state for colorspace and scaling information and can get it from connector->state. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org

[PATCH 12/16] drm/amd/display: Always set crtcinfo from create_stream_for_sink

2022-12-12 Thread Harry Wentland
From: Joshua Ashton Given that we always pass dm_state into here now, this won't ever trigger anymore. This is needed for we will always fail mode validation with invalid clocks or link bandwidth errors. Signed-off-by: Joshua Ashton Cc: Pekka Paalanen Cc: Sebastian Wick Cc:

[PATCH 14/16] drm/amd/display: Add debugfs for testing output colorspace

2022-12-12 Thread Harry Wentland
In order to IGT test colorspace we'll want to print the currently enabled colorspace on a stream. We add a new debugfs to do so, using the same scheme as current bpc reporting. This might also come in handy when debugging display issues. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc

[PATCH 13/16] drm/amd/display: Add support for explicit BT601_YCC

2022-12-12 Thread Harry Wentland
We use this by default but if userspace passes this explicitly we should respect it. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: vitaly.pros...@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd

Re: [PATCH 06/16] drm/connector: Allow drivers to pass list of supported colorspaces

2022-12-14 Thread Harry Wentland
On 12/14/22 03:55, Pekka Paalanen wrote: > On Tue, 13 Dec 2022 11:32:01 -0500 > Harry Wentland wrote: > >> On 12/13/22 05:23, Pekka Paalanen wrote: >>> On Mon, 12 Dec 2022 13:21:27 -0500 >>> Harry Wentland wrote: >>> >>>

Re: [PATCH 06/16] drm/connector: Allow drivers to pass list of supported colorspaces

2022-12-13 Thread Harry Wentland
On 12/13/22 05:23, Pekka Paalanen wrote: > On Mon, 12 Dec 2022 13:21:27 -0500 > Harry Wentland wrote: > >> Drivers might not support all colorspaces defined in >> dp_colorspaces and hdmi_colorspaces. This results in >> undefined behavior when userspace is setting a

Re: [PATCH 06/16] drm/connector: Allow drivers to pass list of supported colorspaces

2022-12-13 Thread Harry Wentland
On 12/13/22 05:34, Pekka Paalanen wrote: > Sorry, hand slipped on keyboard and sent out a draft of this email too > early. > > > On Mon, 12 Dec 2022 13:21:27 -0500 > Harry Wentland wrote: > >> Drivers might not support all colorspaces defined in >> dp

<    3   4   5   6   7   8   9   10   11   >