[PATCH v3 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-04-19 Thread Lyude Paul
in drm_dp_mst_atomic_check_mstb_bw_limit() Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss --- drivers/gpu/drm/drm_dp_mst_topology.c | 368 +- 1 file changed, 187 insertions(+), 181 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH v3 18/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-04-19 Thread Lyude Paul
_dp_dump_access Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss --- drivers/gpu/drm/drm_dp_helper.c | 121 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c ind

[PATCH v3 17/20] drm/print: Handle potentially NULL drm_devices in drm_dbg_*

2021-04-19 Thread Lyude Paul
we should do the same for ours. Signed-off-by: Lyude Paul --- include/drm/drm_print.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index a3c58c941bdc..9b66be54dd16 100644 --- a/include/drm/drm_pri

[PATCH v3 19/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-04-19 Thread Lyude Paul
, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers

[PATCH v3 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-04-19 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4

[PATCH v3 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-04-19 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- include/drm

[PATCH v3 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-04-19 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH v3 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed

[PATCH v3 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-04-19 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v3 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-04-19 Thread Lyude Paul
the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h

[PATCH v3 10/20] drm/dp: Always print aux channel name in logs

2021-04-19 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH v3 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c

[PATCH v3 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3

[PATCH v3 06/20] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-04-19 Thread Lyude Paul
ure to point this out in the documentation for struct drm_dp_aux. v3: * Add WARN_ON_ONCE() to drm_dp_aux_register() if drm_dev isn't filled out Signed-off-by: Lyude Paul Acked-by: Thierry Reding --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 7 --- .../gpu/drm/amd/disp

[PATCH v3 07/20] drm/dp: Clarify DP AUX registration time

2021-04-19 Thread Lyude Paul
bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 57 + 1 file changed, 37 insertions(+), 20 deletions(-) diff --git

[PATCH v3 04/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-04-19 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v3 05/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-04-19 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 25 - 1 file changed, 20 insertions(+), 5 deletions

[PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-19 Thread Lyude Paul
() and hook it up in all DRM drivers across the kernel to take care of cleaning up the i2c adapter once it's no longer needed. This should also fix the regressions noted in the Tegra driver. Signed-off-by: Lyude Paul Fixes: 39c17ae60ea9 ("drm/tegra: Don't register DP AUX channels before conne

[PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()

2021-04-19 Thread Lyude Paul
connector creation doesn't attempt to do any real error handling. So, let's fix this and also cleanup amdgpu_dm_initialize_dp_connector() while we're at it. This way we can handle the error codes from drm_dp_aux_init(). Signed-off-by: Lyude Paul --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29

[PATCH v3 02/20] drm/dp: Add __no_check to drm_dp_aux_register()

2021-04-19 Thread Lyude Paul
Since we're about to make it so that drm_dp_aux_init() can fail (and thus - should have it's return value checked) - we should require that callers of drm_dp_aux_register() also check it's return value since drm_dp_aux_init() can be called from there. Signed-off-by: Lyude Paul --- include/drm

Re: [PATCH 03/30] drm/tegra: Don't register DP AUX channels before connectors

2021-04-14 Thread Lyude Paul
On Wed, 2021-04-14 at 18:49 +0200, Thierry Reding wrote: > On Fri, Feb 19, 2021 at 04:52:59PM -0500, Lyude Paul wrote: > > As pointed out by the documentation for drm_dp_aux_register(), > > drm_dp_aux_init() should be used in situations where the AUX channel for a > &g

Re: [drm/i915/dp] 4a8d79901d: WARNING:at_drivers/gpu/drm/i915/display/intel_display_power.c:#assert_can_disable_lcpll[i915]

2021-04-09 Thread Lyude Paul
Could you retest this against the latest drm-tip? I pushed something that I think might fix this On Thu, 2021-03-25 at 21:53 +0800, Oliver Sang wrote: > Hi, Lyude, > > On Tue, Mar 23, 2021 at 01:27:29PM -0400, Lyude Paul wrote: > > BTW Oliver - I'm still happy to look at this iss

[PATCH v2 1/3] drm/nouveau: Use helper to convert nouveau_drm to drm_device

2021-03-26 Thread Lyude Paul
implementations. This patch should introduce no functional changes. Signed-off-by: Jeremy Cline Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 10 +++--- drivers/gpu/drm/nouveau/dispnv50/base.c | 2 +- drivers/gpu/drm/nouveau/dispnv50

[PATCH v2 3/3] drm/nouveau: begin documenting core nouveau structures

2021-03-26 Thread Lyude Paul
From: Jeremy Cline Start on documentation for the Nouveau device structure and the NVIF client structure it uses. This documentation is not complete as the structures are non-trivial and I am not familiar with large portions of them. Signed-off-by: Jeremy Cline Signed-off-by: Lyude Paul

[PATCH v2 2/3] drm/nouveau: manage nouveau_drm lifetime with devres

2021-03-26 Thread Lyude Paul
the deallocation of nouveau_drm currently occurs. Signed-off-by: Jeremy Cline Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_drm.c | 44 --- drivers/gpu/drm/nouveau/nouveau_drv.h | 10 -- 2 files changed, 26 insertions(+), 28 deletions

Re: [PATCH v2 0/3] drm/nouveau: fix a use-after-free in postclose()

2021-03-26 Thread Lyude Paul
This patch series is: Reviewed-by: Lyude Paul Btw - in the future if you need to send a respin of multiple patches, you need to send it as it's own separate series instead of replying to the previous one (one-off respins can just be posted as replies though), otherwise patchwork won't pick

Re: [PATCH] drm/nouveau: avoid a use-after-free when BO init fails

2021-03-26 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2020-12-02 at 19:02 -0500, Jeremy Cline wrote: > nouveau_bo_init() is backed by ttm_bo_init() and ferries its return code > back to the caller. On failures, ttm_bo_init() invokes the provided > destructor which should de-initialize and free the memory.

[PATCH v2 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-03-26 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-03-26 Thread Lyude Paul
in drm_dp_mst_atomic_check_mstb_bw_limit() Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_mst_topology.c | 368 +- 1 file changed, 187 insertions(+), 181 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index

[PATCH v2 19/20] drm/dp_mst: Drop DRM_ERROR() on kzalloc() fail in drm_dp_mst_handle_up_req()

2021-03-26 Thread Lyude Paul
Checkpatch was complaining about this - there's no need for us to print errors when kzalloc() fails, as kzalloc() will already WARN for us. So, let's fix that before converting things to make checkpatch happy. Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH v2 17/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-03-26 Thread Lyude Paul
_dp_dump_access Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_helper.c | 121 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 54e19d7b9c51..4940

[PATCH v2 18/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-03-26 Thread Lyude Paul
, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers

[PATCH v2 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed

[PATCH v2 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-03-26 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v2 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-03-26 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- include/drm

[PATCH v2 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-03-26 Thread Lyude Paul
the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h

[PATCH v2 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-03-26 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4

[PATCH v2 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c

[PATCH v2 10/20] drm/dp: Always print aux channel name in logs

2021-03-26 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH v2 06/20] drm/dp: Clarify DP AUX registration time

2021-03-26 Thread Lyude Paul
bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 44 +++-- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git

[PATCH v2 07/20] drm/print: Fixup DRM_DEBUG_KMS_RATELIMITED()

2021-03-26 Thread Lyude Paul
that we can reuse for defining new ratelimited DRM debug macros more easily. v2: * Make sure to use tabs where possible in __DRM_DEFINE_DBG_RATELIMITED() Signed-off-by: Lyude Paul Cc: Robert Foss --- include/drm/drm_print.h | 20 1 file changed, 12 insertions(+), 8 deletions

[PATCH v2 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3

[PATCH v2 05/20] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-03-26 Thread Lyude Paul
ure to point this out in the documentation for struct drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 1 + drivers/

[PATCH v2 02/20] drm/tegra: Don't register DP AUX channels before connectors

2021-03-26 Thread Lyude Paul
device instead of being a grandchild of the DRM device. Since we're about to add a backpointer to a DP AUX channel's respective DRM device, let's fix this so that we don't potentially allow userspace to use the AUX channel before we've associated it with it's DRM connector. Signed-off-by: Lyude Paul

[PATCH v2 01/20] drm/dp: Fixup kernel docs for struct drm_dp_aux

2021-03-26 Thread Lyude Paul
-off-by: Lyude Paul Acked-by: Randy Dunlap --- include/drm/drm_dp_helper.h | 44 ++--- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 632ad7faa006..5efa0d329b67 100644 --- a/include

[PATCH v2 04/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-03-26 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 26 ++--- 1 file changed, 18 insertions(+), 8 deletions

[PATCH v2 03/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-03-26 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [drm/i915/dp] 4a8d79901d: WARNING:at_drivers/gpu/drm/i915/display/intel_display_power.c:#assert_can_disable_lcpll[i915]

2021-03-23 Thread Lyude Paul
BTW Oliver - I'm still happy to look at this issue, I just need the extra logs I mentioned below in order to figure out what's going on here On Thu, 2021-03-18 at 13:16 -0400, Lyude Paul wrote: > Well this is surprising, because I had been pretty sure we had asked someone > at > Inte

Re: [PATCH] drivers: gpu: priv.h is included twice

2021-03-23 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2021-03-22 at 20:45 +0800, Wan Jiabing wrote: > priv.h has been included at line 22, so remove > the duplicate include at line 24. > > Signed-off-by: Wan Jiabing > --- >  drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c | 2 -- >  1 file

Re: [PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

2021-03-23 Thread Lyude Paul
On Tue, 2021-03-23 at 16:06 +0200, Jani Nikula wrote: > On Thu, 18 Mar 2021, Lyude Paul wrote: > > Actually-NAK this. I just realized I've been misreading the bug and that > > this > > doesn't actually seem to be fixed. Will resend once I figure out what's > >

Re: [PATCH 14/19] drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static

2021-03-19 Thread Lyude Paul
Reviewed-by: Lyude Paul On Fri, 2021-03-19 at 08:24 +, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > >  drivers/gpu/drm/nouveau/dispnv50/headc57d.c:173:1: warning: no previous > prototype for ‘headc57d_olut’ [-Wmissing-prototypes] > > Cc: Ben S

[PATCH v2] drm/nouveau/kms/nv50-: Correct size checks for cursors

2021-03-18 Thread Lyude Paul
dth of the scanout surface is the same as the framebuffer width, and that there's no offset being used for the cursor surface. Signed-off-by: Lyude Paul Cc: Martin Peres Cc: Jeremy Cline --- drivers/gpu/drm/nouveau/dispnv50/curs507a.c | 15 ++- 1 file changed, 14 insertions(+), 1 delet

Re: [Nouveau] [PATCH] drm/nouveau/kms/nv50-: Check plane size for cursors, not fb size

2021-03-18 Thread Lyude Paul
On Thu, 2021-03-18 at 18:13 -0400, Ilia Mirkin wrote: > On Thu, Mar 18, 2021 at 5:56 PM Lyude Paul wrote: > > > > Found this while trying to make some changes to the kms_cursor_crc test. > > curs507a_acquire checks that the width and height of the cursor framebuffer > >

[PATCH] drm/nouveau/kms/nv50-: Check plane size for cursors, not fb size

2021-03-18 Thread Lyude Paul
ual size of the cursor. But this seems to fix things, and the code before was definitely incorrect - so it's not really worth looking into further imho. Signed-off-by: Lyude Paul Cc: Martin Peres Cc: Jeremy Cline --- drivers/gpu/drm/nouveau/dispnv50/curs507a.c | 2 +- drivers/gpu/drm/nouveau/dispn

Re: [PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

2021-03-18 Thread Lyude Paul
Actually-NAK this. I just realized I've been misreading the bug and that this doesn't actually seem to be fixed. Will resend once I figure out what's going on On Thu, 2021-03-18 at 13:02 -0400, Lyude Paul wrote: > Looks like that there actually are another subset of laptops on the mar

Re: [drm/i915/dp] 4a8d79901d: WARNING:at_drivers/gpu/drm/i915/display/intel_display_power.c:#assert_can_disable_lcpll[i915]

2021-03-18 Thread Lyude Paul
? It's hard to see what's actually going on here that's causing this issue to still reoccur. Also adding Tomi P Sarvela onto this thread, since they were the ones who originally tested this On Thu, 2021-03-18 at 10:13 +0800, Oliver Sang wrote: > Hi Lyude, sorry for later. > > before we

[PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT

2021-03-18 Thread Lyude Paul
to be safe. We might be able to try enabling this again by default in the future. Fixes: 2227816e647a ("drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight") Cc: Jani Nikula Cc: Rodrigo Vivi Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3169 Signed-off

[PATCH 2/2] drm/nouveau/kms/nv50-: Always validate LUTs in nv50_head_atomic_check_lut()

2021-03-17 Thread Lyude Paul
state. Of course though, actual programming of the degamma lut to hardware is still handled in each plane's atomic check and commit. Signed-off-by: Lyude Paul Testcase: igt/kms_color/pipe-invalid-*-lut-sizes --- drivers/gpu/drm/nouveau/dispnv50/base907c.c | 6 + drivers/gpu/drm/nouveau

[PATCH 1/2] drm/nouveau/kms/nv50-: Use NV_ATOMIC() in nv50_head_atomic_check_lut()

2021-03-17 Thread Lyude Paul
Since this is used in the atomic check, we should use the right debug macro for it. Signed-off-by: Lyude Paul Cc: Martin Peres Cc: Jeremy Cline --- drivers/gpu/drm/nouveau/dispnv50/head.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau

[PATCH v2] drm/nouveau/kms/nve4-nv108: Don't advertise 256x256 cursor support yet

2021-03-05 Thread Lyude Paul
the issues that users were seeing. Coincidentally - this is also why small ovlys don't work on Kepler: the ctxdma we use for ovlys is set to large pages. Changes since v2: * Fix comments and patch description Signed-off-by: Lyude Paul Fixes: d3b2f0f7921c ("drm/nouveau/kms/nv50-: Repor

[PATCH] drm/nouveau/kms/nve4-nv108: Limit cursors to 128x128

2021-03-04 Thread Lyude Paul
- a size small enough to always default to small pages. This means small ovlys are still broken on Kepler, but it is extremely unlikely anyone cares about those anyway :). Signed-off-by: Lyude Paul Fixes: d3b2f0f7921c ("drm/nouveau/kms/nv50-: Report max cursor size to userspace") Cc

Re: [PATCH 17/53] drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static

2021-03-03 Thread Lyude Paul
Reviewed-by: Lyude Paul Thanks! On Wed, 2021-03-03 at 13:42 +, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > >  drivers/gpu/drm/nouveau/dispnv50/headc57d.c:173:1: warning: no previous > prototype for ‘headc57d_olut’ [-Wmissing-prototypes] > > Cc

Re: [PATCH 15/30] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-02-24 Thread Lyude Paul
On Sun, 2021-02-21 at 20:21 +0200, Laurent Pinchart wrote: > Hi Lyude, > > Thank you for the patch. > > On Fri, Feb 19, 2021 at 04:53:11PM -0500, Lyude Paul wrote: > > This is something that we've wanted for a while now: the ability to > > actually look up the respec

Re: [PATCH 01/30] drm/dp: Rewrap kdocs for struct drm_dp_aux

2021-02-24 Thread Lyude Paul
On Fri, 2021-02-19 at 15:42 -0800, Randy Dunlap wrote: > On 2/19/21 1:52 PM, Lyude Paul wrote: > > Since we're about to be adding some more fields and update this > > documentation, let's rewrap it to the new column limit of 100 beforehand. > > No actual doc or functional

[PATCH v2] drm/nouveau/kms/nvd9-nv138: Fix CRC calculation for the cursor channel

2021-02-23 Thread Lyude Paul
to fix this issues to open-gpu-docs, so pull in the actual macro definitions for it Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/crc907d.c | 3 ++- drivers/gpu/drm/nouveau/include/nvhw/class/cl907d.h | 3 +++ 2 files

[PATCH 29/30] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-02-19 Thread Lyude Paul
, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers

[PATCH 30/30] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-02-19 Thread Lyude Paul
And finally, convert all of the code in drm_dp_mst_topology.c over to using drm_err() and drm_dbg*(). Note that this refactor would have been a lot more complicated to have tried writing a coccinelle script for, so this whole thing was done by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH 28/30] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-02-19 Thread Lyude Paul
C(expr); + drm_dbg_atomic(aux->drm_dev, expr); | - DRM_DEBUG_KMS_RATELIMITED(expr); + drm_dbg_kms_ratelimited(aux->drm_dev, expr); | - DRM_ERROR(expr); + drm_err(aux->drm_dev, expr); ) Followed by correcting the resulting line-wrapping in the results by hand. Signed-off-by: Lyude Paul -

[PATCH 27/30] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-02-19 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH 26/30] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-02-19 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed

[PATCH 25/30] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-02-19 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff

[PATCH 22/30] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-02-19 Thread Lyude Paul
the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h

[PATCH 24/30] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-02-19 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4

[PATCH 23/30] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-02-19 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- include/drm

[PATCH 21/30] drm/dp: Always print aux channel name in logs

2021-02-19 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH 20/30] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-02-19 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c| 14

[PATCH 19/30] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-02-19 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_dp_link_training.c

[PATCH 15/30] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-02-19 Thread Lyude Paul
ure to point this out in the documentation for struct drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 1 + drivers/

[PATCH 18/30] drm/print: Fixup DRM_DEBUG_KMS_RATELIMITED()

2021-02-19 Thread Lyude Paul
that we can reuse for defining new ratelimited DRM debug macros more easily. Signed-off-by: Lyude Paul --- include/drm/drm_print.h | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index f32d179e139d

[PATCH 12/30] drm/bridge/analogix/anx6345: Cleanup on errors in anx6345_bridge_attach()

2021-02-19 Thread Lyude Paul
Another drive-by fix I found when fixing DP AUX adapter across the kernel tree - make sure we don't leak resources (and by proxy-AUX adapters) on failures in anx6345_bridge_attach() by unrolling on errors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 11

[PATCH 16/30] drm/dp: Rewrap drm_dp_aux_register()/drm_dp_aux_init() kdocs

2021-02-19 Thread Lyude Paul
We're about to make a correction to these, so let's rewrap the kernel docs for these while we're at it. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b

[PATCH 17/30] drm/dp: Clarify DP AUX registration time

2021-02-19 Thread Lyude Paul
bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git

[PATCH 13/30] drm/bridge/analogix/dp_core: Unregister DP AUX channel on error in analogix_dp_probe()

2021-02-19 Thread Lyude Paul
Just another drive-by fix I noticed while going through the tree to cleanup DP aux adapter registration - make sure we unregister the DP AUX dev if analogix_dp_probe() fails. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion

[PATCH 14/30] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-02-19 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 26 ++--- 1 file changed, 18 insertions(+), 8 deletions

[PATCH 11/30] drm/bridge/analogix/anx6345: Don't link encoder until after connector registration

2021-02-19 Thread Lyude Paul
Another case of linking an encoder to a connector after the connector's been registered. The proper place to do this is before connector registration, so let's fix that. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 12 ++-- 1 file changed, 6

[PATCH 10/30] drm/bridge/analogix/anx6345: Add missing drm_dp_aux_unregister() call

2021-02-19 Thread Lyude Paul
Another driver I found that seems to forget to unregister it's DP AUX device. Let's fix this by adding anx6345_bridge_detach(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bridge

[PATCH 09/30] drm/bridge/analogix/anx78xx: Cleanup on error in anx78xx_bridge_attach()

2021-02-19 Thread Lyude Paul
-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c index 338dd8531d4b..f20558618220 100644

[PATCH 02/30] drm/dp: Fixup kernel docs for struct drm_dp_aux

2021-02-19 Thread Lyude Paul
-off-by: Lyude Paul --- include/drm/drm_dp_helper.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 2891a98eebc8..b35a1c1339e8 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_help

[PATCH 06/30] drm/bridge/ti-sn65dsi86: (Un)register aux device on bridge attach/detach

2021-02-19 Thread Lyude Paul
a ti_sn_bridge_detach() callback. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index f27306c51e4d..88df4dd0f39d 100644

[PATCH 05/30] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-02-19 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 08/30] drm/bridge/analogix/anx78xx: Setup encoder before registering connector

2021-02-19 Thread Lyude Paul
Since encoder mappings for connectors are exposed to userspace, we should be attaching the encoder before exposing the connector to userspace. Just a drive-by fix for an issue I noticed while fixing up usages of drm_dp_aux_init()/drm_dp_aux_register() across the tree. Signed-off-by: Lyude Paul

[PATCH 07/30] drm/bridge/analogix/anx78xx: Add missing drm_dp_aux_unregister() call

2021-02-19 Thread Lyude Paul
Surprisingly, this bridge actually registers it's AUX adapter at the correct time already. Nice job! However, it does forget to actually unregister the AUX adapter, so let's add a bridge function to handle that. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c

[PATCH 03/30] drm/tegra: Don't register DP AUX channels before connectors

2021-02-19 Thread Lyude Paul
device instead of being a grandchild of the DRM device. Since we're about to add a backpointer to a DP AUX channel's respective DRM device, let's fix this so that we don't potentially allow userspace to use the AUX channel before we've associated it with it's DRM connector. Signed-off-by: Lyude Paul

[PATCH 04/30] drm/bridge/tc358767: Don't register DP AUX channel until bridge is attached

2021-02-19 Thread Lyude Paul
drm_dp_aux_init() in tc_probe() and wait until tc_bridge_attach() to register our AUX channel. We also add tc_bridge_detach() to handle unregistering the AUX adapter once the bridge has been disconnected. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/tc358767.c | 20 +++- 1

[PATCH 01/30] drm/dp: Rewrap kdocs for struct drm_dp_aux

2021-02-19 Thread Lyude Paul
Since we're about to be adding some more fields and update this documentation, let's rewrap it to the new column limit of 100 beforehand. No actual doc or functional changes are made here. Signed-off-by: Lyude Paul --- include/drm/drm_dp_helper.h | 42 - 1

Re: [Intel-gfx] [RFC v4 10/11] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-19 Thread Lyude Paul
On Thu, 2021-02-18 at 17:31 +0200, Ville Syrjälä wrote: > On Thu, Feb 18, 2021 at 10:35:05AM +0200, Jani Nikula wrote: > > On Fri, 12 Feb 2021, Lyude Paul wrote: > > > I think it wouldn't be a bad idea to just address this with a followup > > > series > > >

Re: [PATCH v4] drm/i915/gen9bc: Handle TGP PCH during suspend/resume

2021-02-17 Thread Lyude Paul
On Wed, 2021-02-17 at 23:18 +0200, Imre Deak wrote: > On Wed, Feb 17, 2021 at 01:00:16PM -0500, Lyude Paul wrote: > > From: Tejas Upadhyay > > > > For Legacy S3 suspend/resume GEN9 BC needs to enable and > > setup TGP PCH. > > > > v2: > > * Move Wa_

[PATCH v4] drm/i915/gen9bc: Handle TGP PCH during suspend/resume

2021-02-17 Thread Lyude Paul
Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/i915_irq.c | 49 + 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 98145a7f28a4..9b56a8f81e1a

[PATCH v3 2/2] drm/i915/icp+: Use icp_hpd_irq_setup() instead of spt_hpd_irq_setup()

2021-02-16 Thread Lyude Paul
correctly anyway, let's move platforms using PCH_ICP which aren't handled by gen11_hpd_irq_setup() over to icp_hpd_irq_setup(). Cc: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/i915_irq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_irq.c b

[PATCH v3 1/2] drm/i915/gen9bc: Handle TGP PCH during suspend/resume

2021-02-16 Thread Lyude Paul
identical to spt_hpd_irq_setup() minus additionally enabling one port. Will update i915 to use icp_hpd_irq_setup() for ICP in a separate patch. Cc: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/i915_irq.c | 52 + 1

  1   2   3   4   5   6   7   8   9   10   >