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

2023-01-25 Thread Joshua Ashton
e's no advantage for anything more here. - Joshie 🐸✨ On Fri, Jan 13, 2023 at 5:26 PM Harry Wentland wrote: 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 en

[PATCH 1/3] drm/connector: Convert DRM_MODE_COLORIMETRY to enum

2023-02-02 Thread Joshua Ashton
From: Harry Wentland This allows us to use strongly typed arguments. Signed-off-by: Harry Wentland Reviewed-by: Simon Ser 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

[PATCH 2/3] drm/connector: Add enum documentation to drm_colorspace

2023-02-02 Thread Joshua Ashton
To match the other enums, and add more information about these values. Signed-off-by: Joshua Ashton 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

[PATCH 3/3] drm/connector: Deprecate split for BT.2020 in drm_colorspace enum

2023-02-02 Thread Joshua Ashton
ut linear YCbCr. Signed-off-by: Joshua Ashton 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/display/drm_hdmi_helper.c | 9 ---

Re: [PATCH 3/3] drm/connector: Deprecate split for BT.2020 in drm_colorspace enum

2023-02-03 Thread Joshua Ashton
at 10:24:52AM -0500, Harry Wentland wrote: On 2/3/23 10:19, Ville Syrjälä wrote: On Fri, Feb 03, 2023 at 09:39:42AM -0500, Harry Wentland wrote: On 2/3/23 07:59, Sebastian Wick wrote: On Fri, Feb 3, 2023 at 11:40 AM Ville Syrjälä wrote: On Fri, Feb 03, 2023 at 02:07:44AM +, Joshua

Re: [PATCH 3/3] drm/connector: Deprecate split for BT.2020 in drm_colorspace enum

2023-02-09 Thread Joshua Ashton
On 2/8/23 09:30, Pekka Paalanen wrote: On Fri, 3 Feb 2023 02:07:44 + Joshua Ashton wrote: Userspace has no way of controlling or knowing the pixel encoding currently, so there is no way for it to ever get the right values here. When we do add pixel_encoding control from userspace,we

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

2022-12-12 Thread Joshua Ashton
random commit comes from). Once the documentation comment is fixed in "[PATCH 07/16] drm/connector: Print connector colorspace in state debugfs" this series is Reviewed-By: Joshua Ashton - Joshie 🐸✨ On 12/12/22 18:21, Harry Wentland wrote: This patchset enables the DP and HDMI

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

2023-01-09 Thread Joshua Ashton
On 6/27/22 13: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 just after CT

Re: [RFC] Plane color pipeline KMS uAPI

2023-05-05 Thread Joshua Ashton
Some corrections and replies inline. On Fri, 5 May 2023 at 12:42, Pekka Paalanen wrote: > > On Thu, 04 May 2023 15:22:59 + > Simon Ser wrote: > > > Hi all, > > > > The goal of this RFC is to expose a generic KMS uAPI to configure the color > > pipeline before blending, ie. after a pixel is t

Re: [RFC] Plane color pipeline KMS uAPI

2023-05-05 Thread Joshua Ashton
On 5/5/23 15:16, Pekka Paalanen wrote: On Fri, 5 May 2023 14:30:11 +0100 Joshua Ashton wrote: Some corrections and replies inline. On Fri, 5 May 2023 at 12:42, Pekka Paalanen wrote: On Thu, 04 May 2023 15:22:59 + Simon Ser wrote: ... To wrap things up, let's take a real-

[RFC PATCH 0/4] uapi, drm: Add and implement RLIMIT_GPUPRIO

2023-04-03 Thread Joshua Ashton
may have. :D Thanks! - Joshie Joshua Ashton (4): drm/scheduler: Add DRM_SCHED_PRIORITY_VERY_HIGH drm/scheduler: Split out drm_sched_priority to own file uapi: Add RLIMIT_GPUPRIO drm/amd/amdgpu: Check RLIMIT_GPUPRIO in priority permissions drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 13 +

[RFC PATCH 1/4] drm/scheduler: Add DRM_SCHED_PRIORITY_VERY_HIGH

2023-04-03 Thread Joshua Ashton
This allows AMDGPU scheduler priority above normal to be expressed using the DRM_SCHED_PRIORITY enum. Signed-off-by: Joshua Ashton --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/msm/msm_gpu.h | 2 +- include/drm/gpu_scheduler.h | 1 + 3 files changed

[RFC PATCH 3/4] uapi: Add RLIMIT_GPUPRIO

2023-04-03 Thread Joshua Ashton
o DRM master, but having a realtime queue is still advantageous. With adding RLIMIT_GPUPRIO, a process outside of a container or eg. rtkit could call `prlimit` on the process inside to allow it to make a realtime queue and solve these problems. Signed-off-by: Joshua Ashton --- fs/proc/base.c

[RFC PATCH 2/4] drm/scheduler: Split out drm_sched_priority to own file

2023-04-03 Thread Joshua Ashton
This allows it to be used by other parts of the codebase without fear of a circular include dependency being introduced. Signed-off-by: Joshua Ashton --- include/drm/drm_sched_priority.h | 41 include/drm/gpu_scheduler.h | 15 +--- 2 files changed

[RFC PATCH 4/4] drm/amd/amdgpu: Check RLIMIT_GPUPRIO in priority permissions

2023-04-03 Thread Joshua Ashton
Add support for the new RLIMIT_GPUPRIO when doing the priority checks creating an amdgpu_ctx. Signed-off-by: Joshua Ashton --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b

Re: [RFC PATCH 0/4] uapi, drm: Add and implement RLIMIT_GPUPRIO

2023-04-03 Thread Joshua Ashton
On 4/3/23 20:54, Christian König wrote: Am 03.04.23 um 21:40 schrieb Joshua Ashton: Hello all! I would like to propose a new API for allowing processes to control the priority of GPU queues similar to RLIMIT_NICE/RLIMIT_RTPRIO. The main reason for this is for compositors such as Gamescope

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

2023-03-17 Thread Joshua Ashton
On 3/17/23 13:35, Pekka Paalanen wrote: On Fri, 17 Mar 2023 14:50:40 +0200 Ville Syrjälä wrote: On Fri, Mar 17, 2023 at 10:53:35AM +0200, Pekka Paalanen wrote: On Fri, 17 Mar 2023 01:01:38 +0200 Ville Syrjälä wrote: On Thu, Mar 16, 2023 at 10:13:54PM +0100, Sebastian Wick wrote: On

Re: [RFC PATCH 03/40] drm/amd/display: introduce Steam Deck color features to AMD display driver

2023-05-09 Thread Joshua Ashton
t; enable AMD driver-private properties used on Steam Deck color mgmt > > > pipeline. > > > > > > Co-developed-by: Joshua Ashton > > > Signed-off-by: Joshua Ashton > > > Signed-off-by: Melissa Wen > > > --- > > > drivers/gpu/drm/a

Re: [RFC PATCH 12/40] drm/amd/display: add plane HDR multiplier driver-private property

2023-05-09 Thread Joshua Ashton
n 4/23/23 10:10, Melissa Wen wrote: > > > From: Joshua Ashton > > > > > > Multiplier to 'gain' the plane. When PQ is decoded using the fixed func > > > transfer function to the internal FP16 fb, 1.0 -> 80 nits (on AMD at > > > least) Wh

Re: [RFC PATCH 07/40] drm/amd/display: add CRTC gamma TF to driver-private props

2023-05-09 Thread Joshua Ashton
I am okay with us dropping the shaper + 3D LUT from crtc. It has problems anyway wrt. atomicity. On Tue, 9 May 2023 at 16:34, Melissa Wen wrote: > > On 05/08, Harry Wentland wrote: > > > > > > On 4/23/23 10:10, Melissa Wen wrote: > > > From: Joshua Ashton &g

Re: [RFC PATCH 12/40] drm/amd/display: add plane HDR multiplier driver-private property

2023-05-09 Thread Joshua Ashton
: > > On 5/9/23 12:54, Joshua Ashton wrote: > > We currently do not have a use for this as we settled on per-plane 3D > > LUT + Shaper, but we might end up wanting to use in our scRGB stack > > someday so I would like to keep it. > > > > uAPI should always have a usersp

Re: [RFC] Plane color pipeline KMS uAPI

2023-05-11 Thread Joshua Ashton
When we are talking about being 'prescriptive' in the API, are we outright saying we don't want to support arbitrary 3D LUTs, or are we just offering certain algorithms to be 'executed' for a plane/crtc/etc in the atomic API? I am confused... There is so much stuff to do with color, that I don't t

Re: [PATCH 06/36] drm/amd/display: add CRTC driver-specific property for gamma TF

2023-06-06 Thread Joshua Ashton
: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 36 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 8 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 22 ++ .../amd/display/amdgpu_dm

Re: [PATCH v5 00/13] Enable Colorspace connector property in amdgpu

2023-06-06 Thread Joshua Ashton
Thanks Harry. Looks good. Reviewed-by: Joshua Ashton - Joshie 🐸✨ On 6/6/23 21:25, Harry Wentland wrote: This patchset is based on Joshua's previous patchset [1], as well as my previous patchset [2]. It is - enabling support for the colorspace property in amdgpu, as well as - all

Re: [PATCH 07/36] drm/amd/display: add plane driver-specific properties for degamma LUT

2023-06-09 Thread Joshua Ashton
ttach driver-private properties for plane color management. First add plane degamma LUT properties that means user-blob and its size. We will add more plane color properties in the next commits. In addition, we keep these driver-private plane properties limited by defining AMD_PRIVATE_COLOR. Co-dev

Re: [PATCH v2 19/34] drm/amd/display: decouple steps for mapping CRTC degamma to DC plane

2023-08-28 Thread Joshua Ashton
Degamma has always been on the plane on AMD. CRTC DEGAMMA_LUT has actually just been applying it to every plane pre-blend. Degamma makes no sense after blending anyway. The entire point is for it to happen before blending to blend in linear space. Otherwise DEGAMMA_LUT and REGAMMA_LUT are the exac

Re: [RFC] amdgpu: Add a context flag to disable implicit sync

2024-08-07 Thread Joshua Ashton
I was thinking about this more recently. I was initially considering "maybe this should be a per-BO import," but I couldn't think of anything in the GL model that would actually benefit given its not "true" bindless and there's no update-after-bind there. Worth others more familiar with GL aski

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

2023-11-01 Thread Joshua Ashton
On 10/5/23 18:15, Melissa Wen wrote: Add 3D LUT property for plane color transformations using a 3D lookup table. 3D LUT allows for highly accurate and complex color transformations and is suitable to adjust the balance between color channels. It's also more complex to manage and require more

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

2023-11-02 Thread Joshua Ashton
there) The reason it looked like it worked for you now is because the duplicate was broken, so color mgmt for planes was always being marked as dirty there. Thanks - Joshie 🐸✨ On 11/2/23 03:48, Joshua Ashton wrote: On 10/5/23 18:15, Melissa Wen wrote: Add 3D LUT property fo

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

2023-11-08 Thread Joshua Ashton
; Sebastian Wick ; Shashank Sharma ; Alexander Goins ; Joshua Ashton ; Michel Dänzer ; Aleix Pol ; Xaver Hugl ; Victoria Brekenfeld ; Sima ; Shankar, Uma ; Naseer Ahmed ; Christopher Braga ; Abhinav Kumar ; Arthur Grillo ; Hector Martin ; Liviu Dudau ; Sasha McIntosh Subject: [RFC PATCH v2 06/17

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

2024-02-27 Thread Joshua Ashton
rse EOTF - Add 2nd enumerated TF colorop to VKMS - Fix LUTs and some issues 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

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

2024-02-29 Thread Joshua Ashton
ahl 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 Cc: Uma Shankar Cc: Naseer Ahmed Cc: Christopher Braga Cc: Abhinav Kumar Cc: Arthur Grillo Cc: Hector Martin Cc: Liviu Dud

epoll + dmabuf + close = Kernel BUG NULL pointer dereference

2023-12-01 Thread Joshua Ashton
Hello! I was rewriting the code in our compositor for Steam Deck, Gamescope, to use epoll for dmabuf image waits. I found out that using epoll + dmabufs + close(...) while it is added to the epoll causes a NULL pointer dereference BUG in the kernel. Using epoll_ctl with EPOLL_CTL_DEL before '

Re: [PATCH] drm/amdgpu: fix a possible null pointer dereference

2024-06-23 Thread Joshua Ashton
Are you planning on submitting a bogus CVE for this patch too? - Joshie 🐸✨ On June 22, 2024 9:22:19 AM GMT+01:00, Ma Ke wrote: >In amdgpu_connector_add_common_modes(), the return value of drm_cvt_mode() >is assigned to mode, which will lead to a NULL pointer dereference on >failure of drm_cvt_mo