Re: [Intel-gfx] [PATCH v2] drm/i915/gen9bc: Handle TGP PCH during suspend/resume

2021-02-16 Thread Lyude Paul
On Tue, 2021-02-16 at 21:36 -0500, Lyude Paul wrote: > On Tue, 2021-02-16 at 20:08 +0200, Imre Deak wrote: > > Hi, > > > > thanks for respinning this patchset, some comments below. > > > > On Fri, Feb 12, 2021 at 01:50:53PM -0500, Lyude Paul

Re: [Intel-gfx] [PATCH v2] drm/i915/gen9bc: Handle TGP PCH during suspend/resume

2021-02-16 Thread Lyude Paul
On Tue, 2021-02-16 at 20:08 +0200, Imre Deak wrote: > Hi, > > thanks for respinning this patchset, some comments below. > > On Fri, Feb 12, 2021 at 01:50:53PM -0500, Lyude Paul wrote: > > From: Tejas Upadhyay > > > > For Legacy S3 suspend/resume GEN9 BC need

Re: [RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-15 Thread Lyude Paul
On Mon, 2021-02-15 at 19:34 +0100, Thomas Zimmermann wrote: > Hi > > Am 09.02.21 um 00:03 schrieb Lyude Paul: > > > > > > > +   } else { > > > > +   buf[0] = level; > > > > +   } > > > > + > >

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

2021-02-12 Thread Lyude Paul
On Wed, 2021-02-10 at 23:15 -0500, Rodrigo Vivi wrote: > On Mon, Feb 08, 2021 at 06:39:00PM -0500, Lyude Paul wrote: > > Since we're about to implement eDP backlight support in nouveau using the > > standard protocol from VESA, we might as well just take the code that's >

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

2021-02-12 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/i915/i915_irq.c | 53 ++--- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 98145a7f28a4..7d912aa950ee 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b

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

2021-02-11 Thread Lyude Paul
On Wed, 2021-02-10 at 23:15 -0500, Rodrigo Vivi wrote: > On Mon, Feb 08, 2021 at 06:39:00PM -0500, Lyude Paul wrote: > > Since we're about to implement eDP backlight support in nouveau using the > > standard protocol from VESA, we might as well just take the code that's >

[PATCH v5 2/4] drm/i915/gen9_bc: Introduce TGP PCH DDC pin mappings

2021-02-09 Thread Lyude Paul
: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_bios.c | 9 + drivers/gpu/drm/i915/display/intel_hdmi.c | 20 2 files changed, 29 insertions

[PATCH v5 4/4] drm/i915/gen9_bc: Add W/A for missing STRAP config on TGP PCH + CML combos

2021-02-09 Thread Lyude Paul
Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_display.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display

[PATCH v5 3/4] drm/i915/gen9_bc: Introduce HPD pin mappings for TGP PCH + CML combos

2021-02-09 Thread Lyude Paul
: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_ddi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu

[PATCH v5 1/4] drm/i915/gen9_bc: Recognize TGP PCH + CML combos

2021-02-09 Thread Lyude Paul
Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/intel_pch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pch.c b/drivers/gpu/drm/i915/intel_pch.c index 4813207fc053..7476f0e063c6 100644 --- a/drivers

[RFC v4 09/11] drm/i915/dpcd_bl: Print return codes for VESA backlight failures

2021-02-08 Thread Lyude Paul
Also, stop printing the DPCD register that failed, and just describe it instead. Saves us from having to look up each register offset when reading through kernel logs (plus, DPCD dumping with drm.debug |= 0x100 will give us that anyway). Signed-off-by: Lyude Paul --- .../drm/i915/display

[RFC v4 11/11] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau

2021-02-08 Thread Lyude Paul
. For reference: there's some mentions of PWM backlight values in nouveau_reg.h, but I'm not sure these are the values we would want to use. If we figure out how to get this information in the future, we'll have the benefit of more granular backlight control. Signed-off-by: Lyude Paul Cc: Jani Nikula

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

2021-02-08 Thread Lyude Paul
* Basic probing of backlight capabilities * Helpers for enabling and disabling the backlight v3: * Split out changes to i915's backlight code to separate patches to make it easier to review v4: * Style/spelling changes from Thomas Zimmermann Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie

[RFC v4 08/11] drm/i915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT

2021-02-08 Thread Lyude Paul
. Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index 611eb3a7cc08

[RFC v4 06/11] drm/i915/dpcd_bl: Cache some backlight capabilities in intel_panel.backlight

2021-02-08 Thread Lyude Paul
for instance). Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi --- .../drm/i915/display/intel_display_types.h| 2 ++ .../drm/i915/display/intel_dp_aux_backlight.c | 29 --- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[RFC v4 02/11] drm/nouveau/kms: Don't probe eDP connectors more then once

2021-02-08 Thread Lyude Paul
eDP doesn't do hotplugging, so there's no reason for us to reprobe it (unless a connection status change is being forced, of course). Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++ 1 file changed

[RFC v4 07/11] drm/i915/dpcd_bl: Move VESA backlight enabling code closer together

2021-02-08 Thread Lyude Paul
No functional changes, just move set_vesa_backlight_enable() closer to it's only caller: intel_dp_aux_vesa_enable_backlight(). Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi --- .../drm/i915/display/intel_dp_aux_backlight.c | 54 +-- 1 file changed, 27 insertions(+), 27

[RFC v4 05/11] drm/i915/dpcd_bl: Cleanup intel_dp_aux_vesa_enable_backlight() a bit

2021-02-08 Thread Lyude Paul
Get rid of the extraneous switch case in here, and just open code edp_backlight_mode as we only ever use it once. v4: * Check that backlight mode is DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD, not DP_EDP_BACKLIGHT_CONTROL_MODE_MASK - imirkin Signed-off-by: Lyude Paul --- .../gpu/drm/i915/display

[RFC v4 04/11] drm/i915/dpcd_bl: Handle drm_dpcd_read/write() return values correctly

2021-02-08 Thread Lyude Paul
work again, also because I'd rather not mix a tree-wide refactor like that in with a patch series intended to be around introducing DP backlight helpers. So, for now let's just handle the return values from each function correctly. Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi --- .../drm

[RFC v4 03/11] drm/i915/dpcd_bl: Remove redundant AUX backlight frequency calculations

2021-02-08 Thread Lyude Paul
this value in intel_panel.backlight, and re-writing it as-needed. Changes since v1: * Wrap panel->backlight.edp.vesa.pwm_freq_pre_divider in DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP check - Jani Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- .../drm/i

[RFC v4 01/11] drm/nouveau/kms/nv40-/backlight: Assign prop type once

2021-02-08 Thread Lyude Paul
Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c

Re: [RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-08 Thread Lyude Paul
On Mon, 2021-02-08 at 09:46 +0100, Thomas Zimmermann wrote: > Hi > > Am 06.02.21 um 00:45 schrieb Lyude Paul: > > Since we're about to implement eDP backlight support in nouveau using the > > standard protocol from VESA, we might as well just take the code that'

[RFC v3 06/10] drm/i915/dpcd_bl: Cache some backlight capabilities in intel_panel.backlight

2021-02-05 Thread Lyude Paul
for instance). Signed-off-by: Lyude Paul --- .../drm/i915/display/intel_display_types.h| 2 ++ .../drm/i915/display/intel_dp_aux_backlight.c | 29 --- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu

[RFC v3 09/10] drm/i915/dpcd_bl: Print return codes for VESA backlight failures

2021-02-05 Thread Lyude Paul
Also, stop printing the DPCD register that failed, and just describe it instead. Saves us from having to look up each register offset when reading through kernel logs (plus, DPCD dumping with drm.debug |= 0x100 will give us that anyway). Signed-off-by: Lyude Paul --- .../drm/i915/display

[RFC v3 08/10] drm/i915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT

2021-02-05 Thread Lyude Paul
. Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index 431758058aa0

[RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-05 Thread Lyude Paul
* Basic probing of backlight capabilities * Helpers for enabling and disabling the backlight v3: * Split out changes to i915's backlight code to separate patches to make it easier to review Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm

[RFC v3 07/10] drm/i915/dpcd_bl: Move VESA backlight enabling code closer together

2021-02-05 Thread Lyude Paul
No functional changes, just move set_vesa_backlight_enable() closer to it's only caller: intel_dp_aux_vesa_enable_backlight(). Signed-off-by: Lyude Paul --- .../drm/i915/display/intel_dp_aux_backlight.c | 54 +-- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git

[RFC v3 05/10] drm/i915/dpcd_bl: Cleanup intel_dp_aux_vesa_enable_backlight() a bit

2021-02-05 Thread Lyude Paul
Get rid of the extraneous switch case in here, and just open code edp_backlight_mode as we only ever use it once. Signed-off-by: Lyude Paul --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm

[RFC v3 01/10] drm/nouveau/kms/nv40-/backlight: Assign prop type once

2021-02-05 Thread Lyude Paul
Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c

[RFC v3 04/10] drm/i915/dpcd_bl: Handle drm_dpcd_read/write() return values correctly

2021-02-05 Thread Lyude Paul
work again, also because I'd rather not mix a tree-wide refactor like that in with a patch series intended to be around introducing DP backlight helpers. So, for now let's just handle the return values from each function correctly. Signed-off-by: Lyude Paul --- .../drm/i915/display

[RFC v3 02/10] drm/nouveau/kms: Don't probe eDP connectors more then once

2021-02-05 Thread Lyude Paul
eDP doesn't do hotplugging, so there's no reason for us to reprobe it (unless a connection status change is being forced, of course). Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++ 1 file changed

[RFC v3 03/10] drm/i915/dpcd_bl: Remove redundant AUX backlight frequency calculations

2021-02-05 Thread Lyude Paul
this value in intel_panel.backlight, and re-writing it as-needed. Changes since v1: * Wrap panel->backlight.edp.vesa.pwm_freq_pre_divider in DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP check - Jani Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- .../drm/i

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

2021-02-05 Thread Lyude Paul
138631]  ret_from_fork+0x22/0x30 > kern  :warn  : [   21.138640] ---[ end trace a93fe4d40a5a37bb ]--- > > > > To reproduce: > >     git clone https://github.com/intel/lkp-tests.git >     cd lkp-tests >     bin/lkp install job.yaml  # job file is attached in t

Re: [RFC v2 4/5] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-03 Thread Lyude Paul
On Wed, 2021-02-03 at 15:58 -0500, Rodrigo Vivi wrote: > On Mon, Jan 25, 2021 at 07:10:30PM -0500, Lyude Paul wrote: > > Since we're about to implement eDP backlight support in nouveau using the > > standard protocol from VESA, we might as well just take the code that's >

Re: [Linaro-mm-sig] [PATCH 08/29] dma-buf: Avoid comma separated statements

2021-02-02 Thread Lyude Paul
ok! I just thought it was mildly entertaining to see, as my email client formatted the message timestamp "Next Wednesday" :) > > Christian. > > Am 01.02.21 um 22:54 schrieb Lyude Paul: > > This is entirely unrelated to this thread, but I noticed when going through > >

Re: [PATCH v3 3/4] drm_dp_mst_topology: export two functions

2021-02-01 Thread Lyude Paul
p_mst_port *port); >   > +struct drm_dp_mst_port *drm_dp_mst_topology_get_port_validated > +(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); > +void drm_dp_mst_topology_put_port(struct drm_dp_mst_port *port); > + >  struct edid *drm_dp_mst_get_edid(struct drm_co

Re: [PATCH v3 2/4] drm_dp_mst_topology: use correct AUX channel

2021-02-01 Thread Lyude Paul
, > port->port_num = port_number; > port->mgr = mgr; > port->aux.name = "DPMST"; > +   mutex_init(>aux.hw_mutex); > +   mutex_init(>aux.cec.lock); You're missing a matching mutex_destroy() for both of these With that fixed:

Re: [PATCH v3 1/4] dp/dp_mst: Add support for sink event notify messages

2021-02-01 Thread Lyude Paul
VENT_DSC_CHUNK_LENGTH_ERROR   BIT(4) > +#define DP_SINK_EVENT_CEC_IRQ_EVENTBIT(5) > + > +struct drm_dp_sink_event_notify { > +   u8 port_number; > +   u8 guid[16]; > +   u16 event_id; > +}; > + >  struct drm_dp_query_payl

Re: [PATCH 08/29] dma-buf: Avoid comma separated statements

2021-02-01 Thread Lyude Paul
_callback)) { > > > +   miss++; > > > +   cb.seen = true; > > > +   } > > >   > > > > > >     if (!t->before) > > > dma_fence_signal(f1); > > >

[RFC v2 5/5] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau

2021-01-26 Thread Lyude Paul
. For reference: there's some mentions of PWM backlight values in nouveau_reg.h, but I'm not sure these are the values we would want to use. If we figure out how to get this information in the future, we'll have the benefit of more granular backlight control. Signed-off-by: Lyude Paul Cc: Jani Nikula

[RFC v2 4/5] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-01-26 Thread Lyude Paul
* Basic probing of backlight capabilities * Helpers for enabling and disabling the backlight Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/drm_dp_helper.c | 332 ++ .../drm/i915/display/intel_display_types.h

[RFC v2 3/5] drm/i915/dp: Remove redundant AUX backlight frequency calculations

2021-01-26 Thread Lyude Paul
this value in intel_panel.backlight, and re-writing it as-needed. Changes since v1: * Wrap panel->backlight.edp.vesa.pwm_freq_pre_divider in DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP check - Jani Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- .../drm/i

[RFC v2 2/5] drm/nouveau/kms: Don't probe eDP connectors more then once

2021-01-26 Thread Lyude Paul
eDP doesn't do hotplugging, so there's no reason for us to reprobe it (unless a connection status change is being forced, of course). Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++ 1 file changed

[RFC v2 1/5] drm/nouveau/kms/nv40-/backlight: Assign prop type once

2021-01-25 Thread Lyude Paul
Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c

Re: [RFC 4/5] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-01-25 Thread Lyude Paul
On Fri, 2020-12-11 at 17:01 +0200, Jani Nikula wrote: > On Wed, 09 Dec 2020, Lyude Paul wrote: > > Since we're about to implement eDP backlight support in nouveau using the > > standard protocol from VESA, we might as well just take the code that's > > already writ

[PATCH] drm/i915/dp: Don't use DPCD backlights that need PWM enable/disable

2021-01-21 Thread Lyude Paul
, there shouldn't be any issue with just leaving DPCD backlight controls disabled in such situations. This should fix the issues with PWM being left on that were being observed on fi-bdw-samus. Signed-off-by: Lyude Paul Fixes: 4a8d79901d5b ("drm/i915/dp: Enable Intel's HDR backlight inte

[PATCH 2/3] drm/nouveau/kms/nv50-: Report max cursor size to userspace

2021-01-18 Thread Lyude Paul
Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index c6367035970e..5f4f09a601d4

[PATCH 1/3] drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes

2021-01-18 Thread Lyude Paul
Cline Cc: Simon Ser Cc: # v5.8+ Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c index ce451242f79e..27

[PATCH 3/3] drm/nouveau/kms/nve4-nv138: Fix > 64x64 cursors

2021-01-18 Thread Lyude Paul
Cc: Simon Ser Cc: # v5.9+ Signed-off-by: Lyude Paul Fixes: ed0b86a90bf9 ("drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_set()") --- drivers/gpu/drm/nouveau/dispnv50/head917d.c | 28 ++- .../drm/nouveau/include/nvhw/class/cl917d.h | 4 +++ 2 files c

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

2021-01-18 Thread Lyude Paul
: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/crc907d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc907d.c b/drivers/gpu/drm/nouveau/dispnv50/crc907d.c index 0a89ae9523d4..f9cb484437aa 100644 --- a/drivers/gpu

[PATCH 3/5] drm/nouveau/kms/nv140-: Use hard-coded wndws or core channel for CRC channel

2021-01-18 Thread Lyude Paul
mapping. We also can entirely drop the wndw parameter from our set_src callbacks, and the atomic state. Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 1 + drivers/gpu/drm/nouveau/dispnv50/corec57d.c | 2 +- drivers

[PATCH 5/5] drm/nouveau/kms/nv140-: Add CRC methods to gv100_disp_core_mthd_head

2021-01-18 Thread Lyude Paul
tracing is enabled in nvkm. So, fix that. Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c b/drivers/gpu

[PATCH 2/5] drm/nouveau/kms/nv50-: Check vbl count after CRC context flip

2021-01-18 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/crc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c index 3c50b29a37ff..ef942248345c 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/crc.c

[PATCH 1/5] drm/nouveau/kms/nv50-: Use drm_dbg_kms() in crc.c

2021-01-18 Thread Lyude Paul
Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/crc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c index

[PATCH v7 3/5] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2021-01-14 Thread Lyude Paul
fail to read the current backlight mode from the DPCD * s/uint8_t/u8/ * Remove unneeded parenthesis in intel_dp_aux_hdr_enable_backlight() * Use drm_dbg_kms() in intel_dp_aux_init_backlight_funcs() Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick

[PATCH v7 4/5] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2021-01-14 Thread Lyude Paul
in the wild that report the VESA interface in their VBT, but actually only support the Intel backlight interface). v3: * Rebase Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 45

[PATCH v7 5/5] drm/dp: Revert "drm/dp: Introduce EDID-based quirks"

2021-01-14 Thread Lyude Paul
in DRM. So, let's just revert it for now since we were the only driver using this. v3: * Rebase v2: * Fix indenting error picked up by checkpatch in intel_edp_init_connector() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm

[PATCH v7 2/5] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-14 Thread Lyude Paul
intel_panel_bl_funcs() for pwm_funcs * Explain why we drop lpt_get_backlight() Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick squash! drm/i915: Keep track of pwm-related backlight hooks separately Signed-off-by: Lyude Paul --- .../drm/i915/display/

[PATCH v7 1/5] drm/i915: Pass port to intel_panel_bl_funcs.get()

2021-01-14 Thread Lyude Paul
an additional pipe parameter in intel_panel_bl_funcs->get(), and leave figuring out the current display pipe up to the caller. Signed-off-by: Lyude Paul --- .../drm/i915/display/intel_display_types.h| 2 +- .../drm/i915/display/intel_dp_aux_backlight.c | 4 +- .../i915/display/intel_dsi_dc

Re: [PATCH v6 1/4] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-14 Thread Lyude Paul
On Thu, 2021-01-14 at 09:12 +0200, Jani Nikula wrote: > On Wed, 13 Jan 2021, Lyude Paul wrote: > > Currently, every different type of backlight hook that i915 supports is > > pretty straight forward - you have a backlight, probably through PWM > > (but maybe DPCD), with a s

[PATCH v6 3/4] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2021-01-13 Thread Lyude Paul
in the wild that report the VESA interface in their VBT, but actually only support the Intel backlight interface). v3: * Rebase Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 45

[PATCH v6 2/4] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2021-01-13 Thread Lyude Paul
fail to read the current backlight mode from the DPCD * s/uint8_t/u8/ * Remove unneeded parenthesis in intel_dp_aux_hdr_enable_backlight() * Use drm_dbg_kms() in intel_dp_aux_init_backlight_funcs() Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick

[PATCH v6 4/4] drm/dp: Revert "drm/dp: Introduce EDID-based quirks"

2021-01-13 Thread Lyude Paul
in DRM. So, let's just revert it for now since we were the only driver using this. v3: * Rebase v2: * Fix indenting error picked up by checkpatch in intel_edp_init_connector() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm

[PATCH v6 1/4] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-13 Thread Lyude Paul
p_backlight() instead of indirection * Don't move intel_dp_aux_init_bcklight_funcs() call to bottom of intel_panel_init_backlight_funcs() quite yet v3: * Reuse intel_panel_bl_funcs() for pwm_funcs * Explain why we drop lpt_get_backlight() Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: th

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

2021-01-13 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2021-01-13 at 08:07 +, 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 v5 2/4] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2021-01-07 Thread Lyude Paul
fail to read the current backlight mode from the DPCD * s/uint8_t/u8/ * Remove unneeded parenthesis in intel_dp_aux_hdr_enable_backlight() * Use drm_dbg_kms() in intel_dp_aux_init_backlight_funcs() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick

[PATCH v5 4/4] drm/dp: Revert "drm/dp: Introduce EDID-based quirks"

2021-01-07 Thread Lyude Paul
in DRM. So, let's just revert it for now since we were the only driver using this. v3: * Rebase v2: * Fix indenting error picked up by checkpatch in intel_edp_init_connector() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm

[PATCH v5 3/4] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2021-01-07 Thread Lyude Paul
in the wild that report the VESA interface in their VBT, but actually only support the Intel backlight interface). v3: * Rebase Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 45

[PATCH v5 1/4] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-07 Thread Lyude Paul
on * Don't move intel_dp_aux_init_bcklight_funcs() call to bottom of intel_panel_init_backlight_funcs() quite yet v3: * Reuse intel_panel_bl_funcs() for pwm_funcs * Explain why we drop lpt_get_backlight() Signed-off-by: Lyude Paul Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../d

[PATCH v4 4/4] drm/dp: Revert "drm/dp: Introduce EDID-based quirks"

2021-01-05 Thread Lyude Paul
in DRM. So, let's just revert it for now since we were the only driver using this. v3: * Rebase v2: * Fix indenting error picked up by checkpatch in intel_edp_init_connector() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm

[PATCH v4 2/4] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2021-01-05 Thread Lyude Paul
from the DPCD * s/uint8_t/u8/ * Remove unneeded parenthesis in intel_dp_aux_hdr_enable_backlight() * Use drm_dbg_kms() in intel_dp_aux_init_backlight_funcs() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display

[PATCH v4 3/4] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2021-01-05 Thread Lyude Paul
in the wild that report the VESA interface in their VBT, but actually only support the Intel backlight interface). v3: * Rebase Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 45

[PATCH v4 1/4] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-05 Thread Lyude Paul
ht_funcs() call to bottom of intel_panel_init_backlight_funcs() quite yet v3: * Reuse intel_panel_bl_funcs() for pwm_funcs * Explain why we drop lpt_get_backlight() Signed-off-by: Lyude Paul Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_display_types.h| 4 +

Re: [PATCH v3 4/9] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-05 Thread Lyude Paul
On Wed, 2020-12-23 at 18:37 +0200, Jani Nikula wrote: > On Fri, 04 Dec 2020, Lyude Paul wrote: > > Currently, every different type of backlight hook that i915 supports is > > pretty straight forward - you have a backlight, probably through PWM > > (but maybe DPCD), with a s

[PATCH] drm/ttm: Remove pinned bos from LRU in ttm_bo_move_to_lru_tail()

2021-01-04 Thread Lyude Paul
, add back the hunks in ttm_bo_del_from_lru() that were removed which checked whether we want to call bdev->driver->del_from_lru_notify() or not. We do this last part to avoid calling the hook when the bo in question was already removed from the LRU. Signed-off-by: Lyude Paul Fixes: 3d1a88

Re: [PATCH 2/7] Revert "ACPI / OSI: Add OEM _OSI string to enable NVidia HDMI audio"

2020-12-10 Thread Lyude Paul
;NVidia Linux driver" that's Nouveau, any > out of tree driver does _not_ matter. And with Nouveau all of this works even > though it required a proper fix first, but we have that now. > > Signed-off-by: Karol Herbst > CC: Alex Hung > CC: Rafael J. Wysocki > CC: D

[RFC 2/5] drm/nouveau/kms: Don't probe eDP connectors more then once

2020-12-09 Thread Lyude Paul
eDP doesn't do hotplugging, so there's no reason for us to reprobe it (unless a connection status change is being forced, of course). Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++ 1 file changed

[RFC 1/5] drm/nouveau/kms/nv40-/backlight: Assign prop type once

2020-12-09 Thread Lyude Paul
Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c

[RFC 5/5] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau

2020-12-09 Thread Lyude Paul
. For reference: there's some mentions of PWM backlight values in nouveau_reg.h, but I'm not sure these are the values we would want to use. If we figure out how to get this information in the future, we'll have the benefit of more granular backlight control. Signed-off-by: Lyude Paul Cc: Jani Nikula

[RFC 3/5] drm/i915/dp: Remove redundant AUX backlight frequency calculations

2020-12-09 Thread Lyude Paul
this value in intel_panel.backlight, and re-writing it as-needed. Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- .../drm/i915/display/intel_display_types.h| 1 + .../drm/i915/display/intel_dp_aux_backlight.c | 64 ++- 2 files changed

[RFC 4/5] drm/dp: Extract i915's eDP backlight code into DRM helpers

2020-12-09 Thread Lyude Paul
* Basic probing of backlight capabilities * Helpers for enabling and disabling the backlight Signed-off-by: Lyude Paul Cc: Jani Nikula Cc: Dave Airlie Cc: greg.depo...@gmail.com --- drivers/gpu/drm/drm_dp_helper.c | 332 ++ .../drm/i915/display/intel_display_types.h

[PATCH v3 8/9] drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight

2020-12-04 Thread Lyude Paul
in the wild that report the VESA interface in their VBT, but actually only support the Intel backlight interface). v3: * Rebase Signed-off-by: Lyude Paul Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 45 +-- drivers/gpu/drm/i915

[PATCH v3 9/9] drm/dp: Revert "drm/dp: Introduce EDID-based quirks"

2020-12-04 Thread Lyude Paul
in DRM. So, let's just revert it for now since we were the only driver using this. v3: * Rebase v2: * Fix indenting error picked up by checkpatch in intel_edp_init_connector() Signed-off-by: Lyude Paul Acked-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm

[PATCH v3 5/9] drm/i915/dp: Rename eDP VESA backlight interface functions

2020-12-04 Thread Lyude Paul
. v3: * Rebase Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_dp_aux_backlight.c | 62 ++- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[PATCH v3 6/9] drm/i915/dp: Add register definitions for Intel HDR backlight interface

2020-12-04 Thread Lyude Paul
No functional changes yet, this just adds definitions for all of the known DPCD registers used by Intel's HDR backlight interface. Since we'll only ever use this in i915, we just define them in intel_dp_aux_backlight.c Reviewed-by: Rodrigo Vivi Signed-off-by: Lyude Paul Cc: thay...@noraisin.net

[PATCH v3 7/9] drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)

2020-12-04 Thread Lyude Paul
control * If the panel's VBT reports any other backlight type: just assume it doesn't have DPCD backlight controls Signed-off-by: Lyude Paul Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_display_types.h| 9 +- .../drm/i915/display/intel_dp_aux_backlight.c

[PATCH v3 4/9] drm/i915: Keep track of pwm-related backlight hooks separately

2020-12-04 Thread Lyude Paul
redundant. v3: * Reuse intel_panel_bl_funcs() for pwm_funcs * Explain why we drop lpt_get_backlight() Signed-off-by: Lyude Paul Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- .../drm/i915/display/intel_display_types.h| 4 + drivers/gpu/drm/i915/display/intel_panel.c| 344 ++--

[PATCH v3 3/9] drm/i915: Pass down brightness values to enable/disable backlight callbacks

2020-12-04 Thread Lyude Paul
ack will be responsible for converting the current brightness value to it's respective PWM level. Signed-off-by: Lyude Paul --- .../drm/i915/display/intel_display_types.h| 4 +- .../drm/i915/display/intel_dp_aux_backlight.c | 8 +-- .../i915/display/intel_dsi_dcs_backlight.c| 7 +- drivers/gpu/

[PATCH v3 2/9] drm/i915: Rename pwm_* backlight callbacks to ext_pwm_*

2020-12-04 Thread Lyude Paul
functions is a bit more obvious. This introduces no functional changes. Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Reviewed-by: Jani Nikula Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm/i915/display/intel_panel.c | 28 +++--- 1 file changed, 14

[PATCH v3 1/9] drm/i915/dp: Program source OUI on eDP panels

2020-12-04 Thread Lyude Paul
initialization Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Cc: thay...@noraisin.net Cc: Vasily Khoruzhick --- drivers/gpu/drm/i915/display/intel_dp.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm

Re: [Intel-gfx] [RFC v2 3/8] drm/i915: Keep track of pwm-related backlight hooks separately

2020-11-30 Thread Lyude Paul
On Thu, 2020-11-26 at 13:57 +0200, Jani Nikula wrote: > On Thu, 26 Nov 2020, Dave Airlie wrote: > > On Thu, 17 Sept 2020 at 03:19, Lyude Paul wrote: > > > > > > Currently, every different type of backlight hook that i915 supports is > > > pretty straight forw

Re: [Intel-gfx] [RFC v2 3/8] drm/i915: Keep track of pwm-related backlight hooks separately

2020-11-30 Thread Lyude Paul
On Thu, 2020-11-26 at 11:03 +1000, Dave Airlie wrote: > On Thu, 17 Sept 2020 at 03:19, Lyude Paul wrote: > > > > Currently, every different type of backlight hook that i915 supports is > > pretty straight forward - you have a backlight, probably through PWM > > (but

Re: [RFC v2 1/8] drm/i915/dp: Program source OUI on eDP panels

2020-11-30 Thread Lyude Paul
On Thu, 2020-11-26 at 12:51 +0200, Jani Nikula wrote: > On Wed, 16 Sep 2020, Lyude Paul wrote: > > Since we're about to start adding support for Intel's magic HDR > > backlight interface over DPCD, we need to ensure we're properly > > programming this field so that Intel s

Re: [PATCH 3/3] drm/nouveau: clean up all clients on device removal

2020-11-25 Thread Lyude Paul
    * return to avoid a double-free situation. > +    */ > +   if (!drm_dev_enter(dev, _index)) > +   return; >   > pm_runtime_get_sync(dev->dev); >   > @@ -1126,6 +1155,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct > drm_file *fpriv

Re: [PATCH 2/3] drm/nouveau: Add a dedicated mutex for the clients list

2020-11-25 Thread Lyude Paul
/nouveau_drv.h > @@ -141,6 +141,11 @@ struct nouveau_drm { >   >     struct list_head clients; >   > +   /** > +    * @clients_lock: Protects access to the @clients list of > nouveau_cli. > +    */ > +   struct mutex clients_lock; > + > u8

Re: [PATCH 29/42] drm/selftests/test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

2020-11-16 Thread Lyude Paul
Huh-could have sworn I had reviewed this one already. Reviewed-by: Lyude Paul On Mon, 2020-11-16 at 17:40 +, Lee Jones wrote: > The stack is too full. > > Fixes the following W=1 kernel build warning(s): > >  drivers/gpu/drm/selftests/test-drm_dp_mst_helper

[PATCH 2/8] drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks

2020-11-13 Thread Lyude Paul
signed to the given encoder there's no point in this check. So just remove it. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 37 - 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/g

[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks

2020-11-13 Thread Lyude Paul
enabled connector in each nouveau_encoder struct so that we don't need to check any atomic states. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 66 --- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_encoder.h

[PATCH 1/8] drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere

2020-11-13 Thread Lyude Paul
It turns out that I forgot to go through and make sure that I converted all encoder callbacks to use atomic_enable/atomic_disable(), so let's go and actually do that. Signed-off-by: Lyude Paul Cc: Kirill A. Shutemov Fixes: 09838c4efe9a ("drm/nouveau/kms: Search for encoders' conne

[PATCH 6/8] drm/nouveau/kms/nv50-: Lookup current encoder/crtc from atomic state

2020-11-13 Thread Lyude Paul
locks in those would be a mess. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 59 - 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index

<    1   2   3   4   5   6   7   8   9   10   >