[PATCH 1/2] drm/i915/de: register wait function renames

2024-03-20 Thread Jani Nikula
function be called in a number of places. Signed-off-by: Jani Nikula --- Use 'git show -w --color-words' for easy review. --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 68 +-- drivers/gpu/drm/i915/display/intel_de.h | 20 +++--- drivers/gpu/drm/i915/display/intel_

Re: Weirdness in parsing cpp macros

2024-03-20 Thread Jani Nikula
On Wed, 20 Mar 2024, Julia Lawall wrote: > On Wed, 20 Mar 2024, Jani Nikula wrote: >> Okay, I have another one wrt macros. :) >> >> I'm trying to add a completely new variadic macro, but it fails at >> "...". I've tried all sorts of things, but can'

Re: [RFC 0/7] drm/i915: pass encoder around more for port/phy checks

2024-03-20 Thread Jani Nikula
On Wed, 20 Mar 2024, Ville Syrjälä wrote: > I have basically that same patch sitting in some branch. I would expect no less. ;D > With commit messages polished the series is > Reviewed-by: Ville Syrjälä Thanks, fixed up the commit messages and posted v1 for CI. BR, Jani. -- Ja

[CI 7/7] drm/i915/cx0: pass encoder instead of i915 and port around

2024-03-20 Thread Jani Nikula
The encoder is a much more useful thing to pass around than the i915 and port combo. Also drive-by clean up some cases where both i915 and encoder are passed; only the latter is needed. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 258

[CI 6/7] drm/i915/cx0: remove the unused intel_is_c10phy()

2024-03-20 Thread Jani Nikula
The intel_is_c10phy() is now unused. Remove. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 14 -- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers

[CI 2/7] drm/i915/ddi: pass encoder to intel_wait_ddi_buf_active()

2024-03-20 Thread Jani Nikula
Pass encoder to intel_wait_ddi_buf_active(). The encoder will be more helpful than just port in the subsequent changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff

[CI 1/7] drm/hdmi: convert *_port_to_ddc_pin() to *_encoder_to_ddc_pin()

2024-03-20 Thread Jani Nikula
Pass encoder to the _port_to_ddc_pin() functions, and rename to _encoder_to_ddc_pin(). The encoder will be more helpful than just port in the subsequent changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_hdmi.c | 60 ++- 1

[CI 5/7] drm/i915/display: use intel_encoder_is/to_* functions

2024-03-20 Thread Jani Nikula
coder_to_phy() intel_port_to_tc() -> intel_encoder_to_tc() Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 36 ++ drivers/gpu/drm/i915/display/intel_ddi.c | 116 +++--- .../drm/i915/display/intel_ddi_buf_t

[CI 4/7] drm/i915/display: add intel_encoder_is_*() and _to_*() functions

2024-03-20 Thread Jani Nikula
-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 9 + drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + drivers/gpu/drm/i915/display/intel_display.c | 40 drivers/gpu/drm/i915/display/intel_display.h | 7 4 files changed

[CI 3/7] drm/i915/snps: pass encoder to intel_snps_phy_update_psr_power_state()

2024-03-20 Thread Jani Nikula
Pass encoder to intel_snps_phy_update_psr_power_state(). The encoder will be more helpful than just port in the subsequent changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_psr.c | 7 ++- drivers/gpu/drm/i915/display/intel_snps_phy.c

[CI 0/7] drm/i915: pass encoder around more for port/phy checks

2024-03-20 Thread Jani Nikula
v1 after the reviewed RFC [1]. BR, Jani. [1] https://lore.kernel.org/r/cover.1710253533.git.jani.nik...@intel.com Jani Nikula (7): drm/hdmi: convert *_port_to_ddc_pin() to *_encoder_to_ddc_pin() drm/i915/ddi: pass encoder to intel_wait_ddi_buf_active() drm/i915/snps: pass encoder

Re: Weirdness in parsing cpp macros

2024-03-20 Thread Jani Nikula
tested that my cocci patch works with x's: + #define fn(p, xxx) foo(__VA_ARGS__) but when I try to make it actually variadic like: + #define fn(p, ...) foo(__VA_ARGS__) it gives me error. Is there a way to escape? Even tried to use a fresh identifier vararg = "..."; but cocci made them unique with numbering "...0" and "...1" etc. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] drm/xe/display: fix type of intel_uncore_read*() functions

2024-03-20 Thread Jani Nikula
On Tue, 19 Mar 2024, Luca Coelho wrote: > On Tue, 2024-03-19 at 17:06 +0200, Jani Nikula wrote: >> On Tue, 19 Mar 2024, Lucas De Marchi wrote: >> > On Thu, Mar 14, 2024 at 08:52:21AM +0200, Luca Coelho wrote: >> > > Some of the backported intel_uncore_re

Re: [PATCH] drm/xe/display: fix type of intel_uncore_read*() functions

2024-03-19 Thread Jani Nikula
gt;>Signed-off-by: Luca Coelho > > if a patch affects xe, please always Cc the xe mailing list so it > triggers CI on those machines Indeed. I just bounced the patch to intel-xe to trigger CI. BR, Jani. > > Lucas De Marchi -- Jani Nikula, Intel

Re: [PATCH 2/2] drm/i915/bios: Use the platform's port_mask when there is no VBT

2024-03-19 Thread Jani Nikula
for ((__port) = PORT_A; (__port) < I915_MAX_PORTS; (__port)++) +#define for_each_port(__i915, __port) \ + for_each_set_bit(__port, _RUNTIME_INFO(__i915)->port_mask, sizeof(DISPLAY_RUNTIME_INFO(__i915)->port_mask)) but then we have DSI code that reli

Re: [PATCH 1/2] drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()

2024-03-19 Thread Jani Nikula
ncoder_supports_dp_dual_mode(const > struct intel_bios_encoder_da > { > const struct child_device_config *child = >child; The above oopses already. BR, Jani. > > + if (!devdata) > + return false; > + > if (!intel_bios_encoder_supports_dp(devdata) || &g

Re: [RESEND v3 1/6] drm/mst: read sideband messaging cap

2024-03-19 Thread Jani Nikula
On Tue, 19 Mar 2024, Jani Nikula wrote: > Amend drm_dp_read_mst_cap() to return an enum, indicating "SST", "SST > with sideband messaging", or "MST". Modify all call sites to take the > new return value into account. drm-misc and nouveau maintainers, ack

[RESEND v3 5/6] drm/i915/mst: add intel_dp_mst_disconnect()

2024-03-19 Thread Jani Nikula
Abstract the MST mode disconnect to a separate function. Cc: Arun R Murthy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers

[RESEND v3 6/6] drm/i915/mst: enable MST mode for 128b/132b single-stream sideband

2024-03-19 Thread Jani Nikula
of the register. Cc: Arun R Murthy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c

[RESEND v3 3/6] drm/i915/mst: abstract choosing the MST mode to use

2024-03-19 Thread Jani Nikula
Clarify the conditions for choosing the MST mode to use by adding a new function intel_dp_mst_mode_choose(). This also prepares for being able to extend the MST modes to single-stream sideband messaging. Cc: Arun R Murthy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula

[RESEND v3 4/6] drm/i915/mst: use the MST mode detected previously

2024-03-19 Thread Jani Nikula
Murthy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- .../drm/i915/display/intel_display_types.h| 1 + drivers/gpu/drm/i915/display/intel_dp.c | 21 --- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915

[RESEND v3 2/6] drm/i915/mst: improve debug logging of DP MST mode detect

2024-03-19 Thread Jani Nikula
tect before early returns from intel_dp_detect_dpcd() Cc: Arun R Murthy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dp.c | 52 ++--- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/

[RESEND v3 1/6] drm/mst: read sideband messaging cap

2024-03-19 Thread Jani Nikula
ude Paul Cc: Danilo Krummrich Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 20 ++-- drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_dp.c | 2 +- include/drm/display/

[RESEND v3 0/6] drm/i915/mst: enable MST mode for 128b/132b single-stream sideband

2024-03-19 Thread Jani Nikula
Resend because I forgot to Cc: dri-devel on the original submission. Jani Nikula (6): drm/mst: read sideband messaging cap drm/i915/mst: improve debug logging of DP MST mode detect drm/i915/mst: abstract choosing the MST mode to use drm/i915/mst: use the MST mode detected previously drm

Re: [PATCH v17 0/9] Enable Adaptive Sync SDP Support for DP

2024-03-18 Thread Jani Nikula
e/drm/display/drm_dp_helper.h | 30 + > 13 files changed, 325 insertions(+), 3 deletions(-) -- Jani Nikula, Intel

Re: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off

2024-03-18 Thread Jani Nikula
rule in kernel development. BR, Jani. PS. Please try to reply inline instead of top-posting in public mailing lists. > > > On 3/15/24 19:02, Ville Syrjälä wrote: >> On Wed, Mar 06, 2024 at 12:19:42PM +0200, Jani Nikula wrote: >>> On Wed, 06 Mar 2024, gareth...@inte

Re: [PATCH] drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()

2024-03-18 Thread Jani Nikula
On Wed, 13 Mar 2024, Jani Nikula wrote: > On Wed, 13 Mar 2024, Jonathon Hall wrote: >> Since commit 0c65dc062611 ("drm/i915/jsl: s/JSL/JASPERLAKE for >> platform/subplatform defines"), boot freezes on a Jasper Lake tablet >> (Librem 11), usually with graphica

Re: [PATCH 0/6] drm: debug logging improvements

2024-03-14 Thread Jani Nikula
On Thu, 07 Mar 2024, Jani Nikula wrote: > Switch a handful of places over to drm device based logging and WARNs, > unify connector and crtc logging, etc. Ping for review, please. :) > > Jani Nikula (6): > drm/modes: add drm_mode_print() to dump mode in drm_printer >

Re: [PATCH v5] drm/i915/dp: Increase idle pattern wait timeout to 2ms

2024-03-14 Thread Jani Nikula
gt;> if (intel_de_wait_for_set(dev_priv, >> dp_tp_status_reg(encoder, crtc_state), >>- DP_TP_STATUS_IDLE_DONE, 1)) >>+ DP_TP_STATUS_IDLE_DONE, 2)) >> drm_err(_priv->drm, >> "Timed out waiting for DP idle patterns\n"); >> } >>-- >>2.34.1 >> -- Jani Nikula, Intel

Re: [PATCH] drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()

2024-03-13 Thread Jani Nikula
ve IS_JASPERLAKE() to fix the regression. > > Signed-off-by: Jonathon Hall > Cc: sta...@vger.kernel.org Thanks for the patch! Fixes: 0c65dc062611 ("drm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform defines") Cc: # v6.6+ Reviewed-by: Jani Nikula > --- > drive

Re: [PATCH 0/8] drm: fix .get_modes() return values

2024-03-13 Thread Jani Nikula
no compiler warnings, and you'd be screwed because you wouldn't even have a way of checking. You'd just get 4294967284 modes. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] drm/i915: add intel_opregion_vbt_present() stub function

2024-03-13 Thread Jani Nikula
el_connector > *connector) > return NULL; > } > > +static inline bool intel_opregion_vbt_present(struct drm_i915_private *i915) > +{ > + return false; > +} > + > static inline const void * > intel_opregion_get_vbt(struct drm_i915_private *i915, size_t *size) > { -- Jani Nikula, Intel

RE: [PATCH] drm/i915/opregion: add intel_opregion_vbt_present() stub for ACPI=n

2024-03-13 Thread Jani Nikula
On Tue, 12 Mar 2024, "Sripada, Radhakrishna" wrote: > LGTM, > Reviewed-by: Radhakrishna Sripada Thanks for the review, pushed to drm-intel-next. BR, Jani. -- Jani Nikula, Intel

[RFC 7/7] drm/i915/cx0: pass encoder instead of i915 and port around

2024-03-12 Thread Jani Nikula
Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 258 ++- 1 file changed, 136 insertions(+), 122 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index b88ffc75cf4a..d2e4439562e3

[RFC 6/7] drm/i915/cx0: remove intel_is_c10phy()

2024-03-12 Thread Jani Nikula
Unused. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 14 -- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915

[RFC 5/7] drm/i915/display: use intel_encoder_is/to_* functions

2024-03-12 Thread Jani Nikula
Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 36 ++ drivers/gpu/drm/i915/display/intel_ddi.c | 116 +++--- .../drm/i915/display/intel_ddi_buf_trans.c| 14 +-- .../i915/display/intel_display_power_well.c | 2 +- drivers/gpu/drm/i915

[RFC 4/7] drm/i915/display: add intel_encoder_is_*() and _to_*() functions

2024-03-12 Thread Jani Nikula
-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 9 + drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + drivers/gpu/drm/i915/display/intel_display.c | 40 drivers/gpu/drm/i915/display/intel_display.h | 7 4 files changed, 57 insertions(+) diff --git

[RFC 3/7] drm/i915/snps: pass encoder to intel_snps_phy_update_psr_power_state()

2024-03-12 Thread Jani Nikula
Pass encoder to intel_snps_phy_update_psr_power_state(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_psr.c | 7 ++- drivers/gpu/drm/i915/display/intel_snps_phy.c | 6 -- drivers/gpu/drm/i915/display/intel_snps_phy.h | 4 ++-- 3 files changed, 8 insertions

[RFC 2/7] drm/i915/ddi: pass encoder to intel_wait_ddi_buf_active()

2024-03-12 Thread Jani Nikula
Pass encoder to intel_wait_ddi_buf_active(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index

[RFC 1/7] drm/hdmi: convert *_port_to_ddc_pin() to *_encoder_to_ddc_pin()

2024-03-12 Thread Jani Nikula
Pass encoder to the _port_to_ddc_pin() functions, and rename to _encoder_to_ddc_pin(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_hdmi.c | 60 ++- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c

[RFC 0/7] drm/i915: pass encoder around more for port/phy checks

2024-03-12 Thread Jani Nikula
ely not being able to do stuff unless you have that encoder for that specific port/phy. And have a reference to it. Thoughts? BR, Jani. [1] https://lore.kernel.org/r/87y1dnswgo@intel.com Jani Nikula (7): drm/hdmi: convert *_port_to_ddc_pin() to *_encoder_to_ddc_pin() drm/i915/ddi: pass enco

Re: [PATCH v2] Fix divide-by-zero regression on DP MST unplug with nouveau

2024-03-12 Thread Jani Nikula
2f174 100644 >> --- a/drivers/gpu/drm/display/drm_dp_helper.c >> +++ b/drivers/gpu/drm/display/drm_dp_helper.c >> @@ -3982,6 +3982,13 @@ int drm_dp_bw_overhead(int lane_count, int hactive, >> u32 overhead = 100; >> int symbol_cycles; >> >> +if (bpp_x16 == 0) { >> +DRM_DEBUG("drm_dp_bw_overhead called with bpp 0\n"); >> +} >> +if (lane_count == 0 || hactive == 0 || bpp_x16 == 0) { > > Could you add lane_count and hactive to the debug print as well? > Something like "Invalid BW overhead params: lane_count %d, hactive %d, > bpp_x16 %d.04d". And within one if instead of two, and use DRM_DEBUG_KMS, and it debug logs the function, no need to duplicate it. BR, Jani. > >> +return 0; >> +} >> + >> /* >> * DP Standard v2.1 2.6.4.1 >> * SSC downspread and ref clock variation margin: >> -- >> 2.39.2 >> -- Jani Nikula, Intel

Re: [PATCH v3 4/6] drm/i915: Extract opregion vbt presence check

2024-03-12 Thread Jani Nikula
he report, fix at https://lore.kernel.org/r/20240312115757.683584-1-jani.nik...@intel.com BR, Jani. -- Jani Nikula, Intel

[PATCH] drm/i915/opregion: add intel_opregion_vbt_present() stub for ACPI=n

2024-03-12 Thread Jani Nikula
check") Cc: Radhakrishna Sripada Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_opregion.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_opregion.h b/drivers/gpu/drm/i915/display/intel_opregion.h index 63573c38d735..4b2b8e752

RE: [REGRESSION] Divide-by-zero on DisplayPort MST unplug with nouveau

2024-03-11 Thread Jani Nikula
t >> > drm_buddy ttm drm_display_helper drm_kms_helper cec rc_core drm nvme >> > nvme_core mxm_wmi xhci_pci xhci_pci_renesas video wmi >> > pinctrl_cannonlake mac_hid ---[ end trace ]--- >> > >> > Fix this by avoiding the divide if bpp is 0. >> > >> > Fixes: c1d6a22b7219 ("drm/dp: Add helpers to calculate the link BW >> > overhead") >> > Signed-off-by: Chris Bainbridge >> > --- >> > drivers/gpu/drm/display/drm_dp_helper.c | 3 +++ >> > 1 file changed, 3 insertions(+) >> > >> > diff --git a/drivers/gpu/drm/display/drm_dp_helper.c >> > b/drivers/gpu/drm/display/drm_dp_helper.c >> > index b1ca3a1100da..bb8794c8f99c 100644 >> > --- a/drivers/gpu/drm/display/drm_dp_helper.c >> > +++ b/drivers/gpu/drm/display/drm_dp_helper.c >> > @@ -4024,6 +4024,9 @@ int drm_dp_bw_overhead(int lane_count, int >> hactive, >> > bpp_x16, >> symbol_size, >> > is_mst); >> > >> > + /* Avoid potential divide by zero in DIV_ROUND_UP_ULL */ >> > + if (bpp_x16 == 0) >> > + return 0; >> >return DIV_ROUND_UP_ULL(mul_u32_u32(symbol_cycles * >> symbol_size * lane_count, >> >overhead * 16), >> >hactive * bpp_x16); >> >> P. P.S.: >> >> #regzbot duplicate: >> https://lore.kernel.org/all/ZcfpqwnkSoiJxeT9@debian.local/ >> #regzbot poke -- Jani Nikula, Intel

Re: [PATCH v2 00/16] drm: fix headers, add header test facility

2024-03-11 Thread Jani Nikula
On Fri, 08 Mar 2024, Jani Nikula wrote: > Follow-up to [1], with the already merged patches dropped, review > comments addressed, some new patches added, etc. > > I did still leave in the FIXME comments in "drm/i2c: silence ch7006.h > and sil164.h kernel-doc warnings

Re: [PATCH v2 16/16] drm: ensure drm headers are self-contained and pass kernel-doc

2024-03-11 Thread Jani Nikula
On Fri, 08 Mar 2024, Jani Nikula wrote: > Ensure drm headers build, are self-contained, have header guards, and > have no kernel-doc warnings, when CONFIG_DRM_HEADER_TEST=y. > > The mechanism follows similar patters used in i915, xe, and usr/include. > > To cover include/drm,

Re: [PATCH v3 0/6] VBT read cleanup

2024-03-11 Thread Jani Nikula
rs/gpu/drm/i915/display/intel_opregion.c | 58 ++ > drivers/gpu/drm/i915/display/intel_opregion.h | 1 + > 3 files changed, 92 insertions(+), 75 deletions(-) -- Jani Nikula, Intel

[PATCH v3] drm/ttm: fix ttm_bo.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Some renames, some formatting fixes, add some missing documentation. v3: Fix struct ttm_buffer_object .sg documentation (Christian) Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Jani Nikula --- include/drm/ttm/ttm_bo.h | 17

[PATCH 8/8] drm/exynos: simplify the return value handling in exynos_dp_get_modes()

2024-03-08 Thread Jani Nikula
Just use 0 and 1 directly, instead of the confusing local variable that's always set to 0. Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Signed-off-by: Jani Nikula --- drivers/gpu/drm/exynos/exynos_dp.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[PATCH 7/8] drm/bridge: lt9611uxc: use int for holding number of modes

2024-03-08 Thread Jani Nikula
lt9611uxc_connector_get_modes() propagates the return value of drm_edid_connector_add_modes() but stores the int temporarily in an unsigned int. Use the correct type. Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Signed-off-by: Jani Nikula --- drivers/gpu/drm/bridge/lontium

[PATCH 6/8] drm/vc4: hdmi: do not return negative values from .get_modes()

2024-03-08 Thread Jani Nikula
The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Maxime Ripard Cc: sta...@vger.kernel.org Signed-off-by: Jani Nikula --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 5/8] drm/imx/ipuv3: do not return negative values from .get_modes()

2024-03-08 Thread Jani Nikula
The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Philipp Zabel Cc: sta...@vger.kernel.org Signed-off-by: Jani Nikula --- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 4/8] drm/bridge: lt8912b: do not return negative values from .get_modes()

2024-03-08 Thread Jani Nikula
The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Adrien Grassein Cc: sta...@vger.kernel.org Signed-off-by: Jani Nikula --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 16 +++- 1 file changed, 7 insertions(+), 9

[PATCH 3/8] drm/exynos: do not return negative values from .get_modes()

2024-03-08 Thread Jani Nikula
The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: sta...@vger.kernel.org Signed-off-by: Jani Nikula --- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 ++-- drivers/gpu/drm

[PATCH 2/8] drm/panel: do not return negative error codes from drm_panel_get_modes()

2024-03-08 Thread Jani Nikula
-by: Jani Nikula --- drivers/gpu/drm/drm_panel.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index e814020bbcd3..cfbe020de54e 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm

[PATCH 0/8] drm: fix .get_modes() return values

2024-03-08 Thread Jani Nikula
The drm_connector_helper_funcs .get_modes() hooks are not supposed to return negative error codes. Some do, but they're not checked, and could lead to mysterious errors. Fix this all over the place. BR, Jani. Jani Nikula (8): drm/probe-helper: warn about negative .get_modes() drm/panel: do

[PATCH 1/8] drm/probe-helper: warn about negative .get_modes()

2024-03-08 Thread Jani Nikula
. Cc: sta...@vger.kernel.org Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_probe_helper.c | 7 +++ include/drm/drm_modeset_helper_vtables.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm

Re: [PATCH 01/50] drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes

2024-03-08 Thread Jani Nikula
*/ > > #include > +#include > +#include > #include > > #include "i915_memcpy.h" -- Jani Nikula, Intel

[PATCH v2 16/16] drm: ensure drm headers are self-contained and pass kernel-doc

2024-03-08 Thread Jani Nikula
/Kbuild files. Suggested-by: Daniel Vetter Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Masahiro Yamada Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- Kbuild | 1 + drivers/gpu/drm/Kconfig | 11

[PATCH v2 15/16] drm: avoid includes in drm_crtc_helper_internal.h

2024-03-08 Thread Jani Nikula
Prefer forward declarations over includes where possible. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_helper_internal.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm

[PATCH v2 14/16] drm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h

2024-03-08 Thread Jani Nikula
Prefer forward declarations over includes where possible. Signed-off-by: Jani Nikula --- drivers/gpu/drm/display/drm_dp_mst_topology_internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology_internal.h b/drivers/gpu/drm

[PATCH v2 13/16] drm/ttm: make ttm_pool.h self-contained

2024-03-08 Thread Jani Nikula
struct seq_file needs a forward declaration in some configs. Sort the forward declarations while at it. Cc: Christian Koenig Cc: Huang Rui Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403072259.eec2vf1x-...@intel.com/ Signed-off-by: Jani Nikula --- include

[PATCH v2 12/16] drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
There's no proper way to document function pointer members, but at least silence the warnings. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- include/drm/ttm/ttm_kmap_iter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 11/16] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Fix some formatting errors and excess documentation. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- include/drm/ttm/ttm_execbuf_util.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/drm/ttm/ttm_execbuf_util.h

[PATCH v2 10/16] drm/ttm: make ttm_caching.h self-contained

2024-03-08 Thread Jani Nikula
Include for pgprot_t. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- include/drm/ttm/ttm_caching.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/ttm/ttm_caching.h b/include/drm/ttm/ttm_caching.h index 235a743d90e1

[PATCH v2 09/16] drm/ttm: fix ttm_bo.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Some renames, some formatting fixes, add some missing documentation. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- include/drm/ttm/ttm_bo.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/drm/ttm

[PATCH v2 08/16] m68k: pgtable: Add missing #include

2024-03-08 Thread Jani Nikula
From: Geert Uytterhoeven When just including : include/asm-generic/pgtable-nop4d.h:9:18: error: unknown type name ‘pgd_t’ 9 | typedef struct { pgd_t pgd; } p4d_t; | ^ Make self-contained by including . Reported-by: Jani Nikula Closes: https

[PATCH v2 07/16] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Make documentation match code. Slightly fix up the documentation comments while at it. v2: - Move comments next to members instead of struct comment (Lucas) - Small fixups while at it Cc: Lucas De Marchi Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- include/drm

[PATCH v2 06/16] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Make the documentation match code. v2: Small fixups while at it (Lucas) Acked-by: Thomas Zimmermann Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula --- include/drm/i915_hdcp_interface.h | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/include

[PATCH v2 05/16] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc

2024-03-08 Thread Jani Nikula
There's no proper way to document function pointer members, but at least silence the warnings. Acked-by: Thomas Zimmermann Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula --- include/drm/i915_gsc_proxy_mei_interface.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 04/16] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings

2024-03-08 Thread Jani Nikula
Mark some members private to silence kernel-doc warnings, and add FIXME comments. Signed-off-by: Jani Nikula --- include/drm/i2c/ch7006.h | 1 + include/drm/i2c/sil164.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/drm/i2c/ch7006.h b/include/drm/i2c/ch7006.h index 8390b437a1f8

[PATCH v2 03/16] drm/encoder: improve drm_encoder_slave.h kernel-doc

2024-03-08 Thread Jani Nikula
Document structs drm_encoder_slave_funcs, drm_encoder_slave, and drm_i2c_encoder_driver. v2: Actually document the structs instead of just silencing kernel-doc Signed-off-by: Jani Nikula --- include/drm/drm_encoder_slave.h | 91 +++-- 1 file changed, 74 insertions

[PATCH v2 02/16] drm: add missing header guards to drm_crtc_helper_internal.h

2024-03-08 Thread Jani Nikula
Including the file twice can lead to errors. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_helper_internal.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h index 28e04e750130

[PATCH v2 01/16] drm: add missing header guards to drm_crtc_internal.h

2024-03-08 Thread Jani Nikula
Including the file twice can lead to errors. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_internal.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index c0c5d79ed4c9..0c693229a1c9 100644

[PATCH v2 00/16] drm: fix headers, add header test facility

2024-03-08 Thread Jani Nikula
ostly self-explanatory. I hope that's fine. BR, Jani. [1] https://lore.kernel.org/all/cover.1709749576.git.jani.nik...@intel.com/ Geert Uytterhoeven (1): m68k: pgtable: Add missing #include Jani Nikula (15): drm: add missing header guards to drm_crtc_internal.h drm: add missing hea

Re: [PATCH 4/4] drm/i915: Drop pointless (void*) cast

2024-03-08 Thread Jani Nikula
On Thu, 07 Mar 2024, Ville Syrjala wrote: > From: Ville Syrjälä > > Remove the pointless (void*) cast, the incoming pointer is already > the correct type. > > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/intel_sdvo.c | 2

Re: [PATCH 3/4] drm/i915: Use container_of_const() for states

2024-03-08 Thread Jani Nikula
rguments to be a bit more > descriptive than just 'x'. Reviewed-by: Jani Nikula > > TODO: maybe convert *all* container_of() uses to container_of_const()? I wish they'd made container_of() handle constness directly... but that approach probably fails all over the place exactly bec

Re: [PATCH 2/4] drm/i915: Don't cast away const

2024-03-08 Thread Jani Nikula
On Thu, 07 Mar 2024, Ville Syrjala wrote: > From: Ville Syrjälä > > The connector state passed to .atomic_get_property() is const. > We should preserve that when downcasting to our version. > > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > driv

Re: [PATCH 1/4] drm/i915/dsi: Use enc_to_intel_dsi()

2024-03-08 Thread Jani Nikula
On Thu, 07 Mar 2024, Ville Syrjala wrote: > From: Ville Syrjälä > > Use enc_to_intel_dsi() instead hand rolling it. > > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/icl_dsi.c | 3 +-- > drivers/gpu/drm/i915/display/vlv_

Re: [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Lucas De Marchi wrote: > On Wed, Mar 06, 2024 at 08:31:22PM +0200, Jani Nikula wrote: >>Make documentation match code. >> >>Signed-off-by: Jani Nikula >>--- >> include/drm/i915_pxp_tee_interface.h | 19 --- >> 1 file

Re: [PATCH 6/6] drm/client: switch to drm device based logging, and more

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Jani Nikula wrote: > Switch to drm device based logging and WARNs, and unify connector and > crtc logging formats. Pass drm device around a bit more to be able to do > this. Forgot to mention that I also stop logging about -ENOMEM, instead of converting that ov

Re: [PATCH 5/6] drm/sysfs: switch to drm device based logging

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Jani Nikula wrote: > @@ -489,7 +489,6 @@ void drm_sysfs_connector_hotplug_event(struct > drm_connector *connector) > drm_dbg_kms(connector->dev, > "[CONNECTOR:%d:%s] generating connector hotplug event\n", >

[PATCH 6/6] drm/client: switch to drm device based logging, and more

2024-03-07 Thread Jani Nikula
Switch to drm device based logging and WARNs, and unify connector and crtc logging formats. Pass drm device around a bit more to be able to do this. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_client_modeset.c | 129 +++ 1 file changed, 70 insertions(+), 59

[PATCH 4/6] drm/modes: switch to drm device based error logging

2024-03-07 Thread Jani Nikula
Prefer drm_err() over DRM_ERROR(). Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_modes.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 0fff5a8d4d81..bf0f745dd9bd 100644

[PATCH 5/6] drm/sysfs: switch to drm device based logging

2024-03-07 Thread Jani Nikula
Prefer drm_dbg_kms() and drm_dbg_lease() over DRM_DEBUG_KMS() and DRM_DEBUG() to debug log the drm device info. Fix some debug categories and unify connector logging while at it. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_sysfs.c | 21 ++--- 1 file changed, 10 insertions

[PATCH 3/6] drm/modes: switch drm_mode_prune_invalid() to use struct drm_printer

2024-03-07 Thread Jani Nikula
to format: i915 :00:02.0: [drm] Rejected mode: "6144x3456": 60 1378800 6144 6192 6224 6464 3456 3459 3464 3555 0x48 0x9 i915 :00:02.0: [drm] Rejected mode: "6144x3456": CLOCK_HIGH Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_modes.c | 11 +++ 1 fi

[PATCH 2/6] drm/probe-helper: switch to drm device based logging

2024-03-07 Thread Jani Nikula
60 533250 3840 3888 3920 4000 2160 2163 2168 0x48 0x9 Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_probe_helper.c | 41 +++--- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_

[PATCH 1/6] drm/modes: add drm_mode_print() to dump mode in drm_printer

2024-03-07 Thread Jani Nikula
Add a printer based function for dumping the modeline, so it's not limited to KMS debug. Note: The printed output intentionally does not have the "Modeline" prefix. Prefix, if any, is for the caller to decide when initializing drm_printer. Signed-off-by: Jani Nikula --- drive

[PATCH 0/6] drm: debug logging improvements

2024-03-07 Thread Jani Nikula
Switch a handful of places over to drm device based logging and WARNs, unify connector and crtc logging, etc. Jani Nikula (6): drm/modes: add drm_mode_print() to dump mode in drm_printer drm/probe-helper: switch to drm device based logging drm/modes: switch drm_mode_prune_invalid() to use

Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Geert Uytterhoeven wrote: > Hi Jani, > > On Thu, Mar 7, 2024 at 9:44 AM Jani Nikula wrote: >> On Thu, 07 Mar 2024, kernel test robot wrote: >> > kernel test robot noticed the following build errors: >> >> So I'm trying to make include/

Re: [PATCH 00/22] drm: fix headers, add header test facility

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Thomas Zimmermann wrote: > Hi > > Am 06.03.24 um 19:31 schrieb Jani Nikula: >> First, fix a bunch of issues in drm headers, uncovered with the last >> patch. A few kernel-doc warnings are just brushed under the carpet for >> now, with a FIXME

Re: [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Alex Deucher wrote: > On Wed, Mar 6, 2024 at 1:43 PM Jani Nikula wrote: >> >> Include for u8. >> >> Signed-off-by: Jani Nikula > > Acked-by: Alex Deucher > > Do you want me to pick this up? Otherwise, feel free to take it via > wh

Re: [V2 1/2] drm/i915/drrs: Refactor CPU transcoder DRRS check

2024-03-07 Thread Jani Nikula
On Wed, 28 Feb 2024, Bhanuprakash Modem wrote: > Rename cpu_transcoder_has_drrs() to intel_cpu_transcoder_has_drrs() > and make it as non-static, therefore it can be re-used. > > V2: > - Move helpers to intel_drrs.[ch] (Jani) > - Fix commit message (Jani) > > Cc:

Re: [RFC v2 2/4] drm/i915/display: add generic to_intel_display() macro

2024-03-07 Thread Jani Nikula
On Wed, 06 Mar 2024, Rodrigo Vivi wrote: > On Wed, Mar 06, 2024 at 02:24:36PM +0200, Jani Nikula wrote: >> Convert various pointers to struct intel_display * using _Generic(). >> >> Add some macro magic to make adding new conversions easier, and somewhat >> abstract th

Re: [PATCH 00/22] drm: fix headers, add header test facility

2024-03-07 Thread Jani Nikula
On Thu, 07 Mar 2024, Thomas Zimmermann wrote: > Hi > > Am 06.03.24 um 19:31 schrieb Jani Nikula: >> First, fix a bunch of issues in drm headers, uncovered with the last >> patch. A few kernel-doc warnings are just brushed under the carpet for >> now, with a FIXME

Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc

2024-03-07 Thread Jani Nikula
t-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-crtc-make-drm_crtc_internal-h-self-contained/20240307-023603 > base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next > patch link: > https://lore.kernel.org/r/e22

[PATCH] drm: add missing header guards to drm_crtc_internal.h

2024-03-07 Thread Jani Nikula
Including the file twice can lead to errors. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_internal.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index c0c5d79ed4c9..0c693229a1c9 100644

[PATCH v2] drm/crtc: make drm_crtc_internal.h self-contained

2024-03-07 Thread Jani Nikula
Forward declare struct drm_printer and include . v2: Include (kernel test robot) Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index

[PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc

2024-03-06 Thread Jani Nikula
/Kbuild files. Suggested-by: Daniel Vetter Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Masahiro Yamada Signed-off-by: Jani Nikula --- Kbuild | 1 + drivers/gpu/drm/Kconfig | 11 +++ drivers/gpu/drm

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