From: Ville Syrjälä
Disable TPS4 in favor of POST_LT_ADJ_REQ for testing purposes.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/intel_dp_link_training.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
b/drivers/
From: Ville Syrjälä
Implement the POST_LT_ADJ_REQ sequence, which should be used
to further fine tune the link if TPS4 is not supported.
The POST_LT_ADJ_REQ sequence will be performed after
the normal link training has succeeded.
Only the final hop between the last LTTPR and DPRX will
perform th
From: Ville Syrjälä
Add small helpers (drm_dp_post_lt_adj_req_supported() and
drm_dp_post_lt_adj_req_in_progress()) to help with implementing
the POST_LT_ADJ_REQ sequence.
Tested-by: Imre Deak
Reviewed-by: Imre Deak
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/display/drm_dp_helper.c | 8
From: Ville Syrjälä
Add the bit definitions needed for POST_LT_ADJ sequence.
v2: DP_POST_LT_ADJ_REQ_IN_PROGRESS is bit 1 not 5 (Jani)
Tested-by: Imre Deak
Reviewed-by: Imre Deak
Signed-off-by: Ville Syrjälä
---
include/drm/display/drm_dp.h | 3 +++
1 file changed, 3 insertions(+)
diff --gi
From: Ville Syrjälä
Implement the POST_LT_ADJ_REQ sequence, which is supposed
to be used to further tune the link vswing/pre-emphasis
when TPS4 is not supported.
Unfortunately I don't have any displays/dongles that support
this so I wasn't able to test anything. Imre has tested this
with a DP te
From: Ville Syrjälä
I noticed a bunch of redundant (and rather expensive) drm_format_info
lookups in some traces recently. This series is an attempt to eliminate
them.
v2: Rebase
Ville Syrjälä (19):
drm: Pass pixel_format+modifier to .get_format_info()
drm: Pass pixel_format+modifier direct
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
malidp_verify_afbc_framebuffer_size() to avoid the
redundant lookup.
Cc: Liviu Dudau
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/arm/malidp_drv.c | 10 --
1 file changed, 4
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Russell King
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
dri
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Liviu Dudau
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 2 +-
1 file ch
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Inki Dae
Cc: Seung-Woo Kim
Cc: Kyungmin Park
Reviewed-by: Thomas Zimmermann
Sign
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Zack Rusin
Cc: Broadcom internal kernel review list
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/vmwgfx/vmwgfx_km
From: Ville Syrjälä
Now that everyone passes along the format info to
drm_helper_mode_fill_fb_struct() we can make this behaviour
mandatory and drop the extra lookup.
Reviewed-by: Thomas Zimmermann
Reviewed-by: Laurent Pinchart
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_modeset_hel
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: David Airlie
Cc: Gerd Hoffmann
Cc: Dmitry Osipenko
Cc: Gurchetan Singh
Cc: Chia-I Wu
Cc: virtualizat...@lists.linux.dev
Reviewed-by: Thomas Zimmerma
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Thierry Reding
Cc: Mikko Perttunen
Cc: linux-te...@vger.kernel.org
Reviewed-by: Th
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookups.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Rob Clark
Cc: Abhinav Kumar
Cc: Dmitry Baryshkov
Cc: Sean Paul
Cc: Marijn Suijt
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Alex Deucher
Cc: amd-...@lists.freedesktop.org
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/amd/amdgpu/amdgpu_disp
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Patrik Jakobsson
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
From: Ville Syrjälä
Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the afbc code.
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_gem_framebuffer_h
From: Ville Syrjälä
Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the gem fb code.
v2: Fix kernel docs (Laurent)
Cc: Dave Airlie
Cc: Gerd Hoffmann
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Cc: Oleksandr Andrushchenko
Cc: vi
From: Ville Syrjälä
Soon all drivers should have the format info already available in the
places where they call drm_helper_mode_fill_fb_struct(). Allow it to
be passed along into drm_helper_mode_fill_fb_struct() instead of doing
yet another redundant lookup.
Start by always passing in NULL and
From: Ville Syrjälä
Pass along the format information from the top to .fb_create()
so that we can avoid redundant (and somewhat expensive) lookups
in the drivers.
Done with cocci (with some manual fixups):
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuf
From: Ville Syrjälä
Look up the format info already in drm_internal_framebuffer_create()
so that we can later pass it along to .fb_create(). Currently various
drivers are doing additional lookups in their .fb_create()
implementations, and these lookups are rather expensive now (given
how many dif
From: Ville Syrjälä
Decouple drm_get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use drm_get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just fo
From: Ville Syrjälä
Decouple .get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use .get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just for this
From: Ville Syrjälä
Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the gem fb code.
v2: Fix kernel docs (Laurent)
Cc: Dave Airlie
Cc: Gerd Hoffmann
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Cc: Oleksandr Andrushchenko
Cc: vi
From: Ville Syrjälä
Pass along the format information from the top to .fb_create()
so that we can avoid redundant (and somewhat expensive) lookups
in the drivers.
Done with cocci (with some manual fixups):
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuf
From: Ville Syrjälä
Look up the format info already in drm_internal_framebuffer_create()
so that we can later pass it along to .fb_create(). Currently various
drivers are doing additional lookups in their .fb_create()
implementations, and these lookups are rather expensive now (given
how many dif
From: Ville Syrjälä
Decouple drm_get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use drm_get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just fo
From: Ville Syrjälä
Decouple .get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use .get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just for this
From: Ville Syrjälä
Allow tilcdc to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Acked-by: Jyri Sarha
Reviewed-by: Tomi Valkeinen
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/tilcdc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
d
From: Ville Syrjälä
Another repost of some COMPILE_TEST=y stragglers.
Cc: Tomi Valkeinen
Cc: Jyri Sarha
Cc: Russell King
Cc: Stefan Agner
Cc: Alison Wang
Ville Syrjälä (6):
drm/tilcdc: Allow build without __iowmb()
drm/tilcdc: Allow build with COMPILE_TEST=y
drm/armada: Fix printk ar
From: Ville Syrjälä
Now that everyone passes along the format info to
drm_helper_mode_fill_fb_struct() we can make this behaviour
mandatory and drop the extra lookup.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_modeset_helper.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Thierry Reding
Cc: Mikko Perttunen
Cc: linux-te...@vger.kernel.org
Signed-off-by:
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Zack Rusin
Cc: Broadcom internal kernel review list
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 14 +-
drivers
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: David Airlie
Cc: Gerd Hoffmann
Cc: Dmitry Osipenko
Cc: Gurchetan Singh
Cc: Chia-I Wu
Cc: virtualizat...@lists.linux.dev
Signed-off-by: Ville Syrjälä
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Russell King
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/armada/armada_fb.c
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookups.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Rob Clark
Cc: Abhinav Kumar
Cc: Dmitry Baryshkov
Cc: Sean Paul
Cc: Marijn Suijt
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Liviu Dudau
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/intel_fb.c|
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Patrik Jakobsson
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/gma500/fbdev.c
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
Cc: Inki Dae
Cc: Seung-Woo Kim
Cc: Kyungmin Park
Signed-off-by: Ville Syrjälä
---
d
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Alex Deucher
Cc: amd-...@lists.freedesktop.org
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++--
1 file changed,
From: Ville Syrjälä
Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the afbc code.
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 18 ++
From: Ville Syrjälä
Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the gem fb code.
Cc: Dave Airlie
Cc: Gerd Hoffmann
Cc: Sandy Huang
Cc: "Heiko Stübner"
Cc: Andy Yan
Cc: Oleksandr Andrushchenko
Cc: virtualizat...@lists.linux.dev
Cc
From: Ville Syrjälä
Plumb the format info from .fb_create() all the way to
malidp_verify_afbc_framebuffer_size() to avoid the
redundant lookup.
Cc: Liviu Dudau
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/arm/malidp_drv.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
d
From: Ville Syrjälä
Soon all drivers should have the format info already available in the
places where they call drm_helper_mode_fill_fb_struct(). Allow it to
be passed along into drm_helper_mode_fill_fb_struct() instead of doing
yet another redundant lookup.
Start by always passing in NULL and
From: Ville Syrjälä
Pass long the format information from the top to .fb_create()
so that we can avoid redundant (and somewhat expensive) lookups
in the drivers.
Done with cocci (with some manual fixups):
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuff
From: Ville Syrjälä
Looks up the format info in already drm_internal_framebuffer_create()
so that we can later pass it along to .fb_create(). Currently various
drivers are doing additional lookups in their .fb_create()
implementations, and these lookups are rather expensive now (given
how many di
From: Ville Syrjälä
Decouple drm_get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use drm_get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just fo
From: Ville Syrjälä
Decouple .get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.
We may want to use .get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just for this
From: Ville Syrjälä
I noticed a bunch of redundant (and rather expensive) drm_format_info
lookups in some traces recently. This series is an attempt to eliminate
them.
Ville Syrjälä (19):
drm: Pass pixel_format+modifier to .get_format_info()
drm: Pass pixel_format+modifier directly to drm_ge
From: Ville Syrjälä
Change the armada_debugfs_crtc_reg_write() return type to
the correct ssize_t. This makes the code actually build on
certain architectures.
Cc: Russell King
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/armada/armada_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 d
From: Ville Syrjälä
__iowmb() isn't available on most architectures. Make
its use optional so that the driver can be built on
other architectures with COMPILE_TEST=y.
v2: Add a comment stating this is for COMPILE_TEST (Tomi)
Cc: Tomi Valkeinen
Acked-by: Jyri Sarha
Signed-off-by: Ville Syrjälä
From: Ville Syrjälä
Allow fsl-dcu to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Stefan Agner
Cc: Alison Wang
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/fsl-dcu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
From: Ville Syrjälä
Allow armada to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Russell King
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/armada/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/armad
From: Ville Syrjälä
../drivers/gpu/drm/armada/armada_gem.c: In function ‘armada_gem_pwrite_ioctl’:
../drivers/gpu/drm/armada/armada_gem.c:367:27: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ {aka ‘long
unsigned int’} [-Wformat=]
367 |
From: Ville Syrjälä
Use IS_ENABLED() to check for CONFIG_DRM_KUNIT_TEST so
that it picks up the modular case as well.
Cc: Maxime Ripard
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm
From: Ville Syrjälä
The modes used by the client code live on the connectors' mode
lists, which are not owned by the client code, and thus it has
no business modifying the modes. Mark the modes const to make
that fact abundantly clear.
v2: Fix up the kunit test
Reviewed-by: Jani Nikula
Reviewe
From: Ville Syrjälä
crtc->mode is legacy junk and shouldn't really be used with
atomic drivers.
Most (all?) atomic drivers do end up still calling
drm_atomic_helper_update_legacy_modeset_state() at some
point, so crtc->mode does still get populated, and this
does work for now. But now that the m
From: Ville Syrjälä
Get rid of all the redundant debugs and just wait until the end
to print which mode (and of which type) we picked.
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 70 +---
1 file changed, 33 ins
From: Ville Syrjälä
Use the array notation rather that the pointer notation for
function arguments. This makes it clear to the reader that
we are in fact dealing with an array rather than a single
pointer. Functionally the two are equivalent.
Reviewed-by: Jani Nikula
Reviewed-by: Thomas Zimmerm
From: Ville Syrjälä
Bunch of variables are only needed inside loops and whatnot.
Move them to a tighter scope to make the code less confusing.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 33 +++-
1 file changed, 18 insertions(+), 15 deletions
From: Ville Syrjälä
The modes used by the client code live on the connectors' mode
lists, which are not owned by the client code, and thus it has
no business modifying the modes. Mark the modes const to make
that fact abundantly clear.
Reviewed-by: Jani Nikula
Reviewed-by: Thomas Zimmermann
Si
From: Ville Syrjälä
Replace the 'unsigned int i' footguns with plain old signed
int. Avoids accidents if/when someone decides they need
to iterate backwards.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
From: Ville Syrjälä
Rename the 'new_crtc' variable to just 'crtc' in
drm_client_firmware_config(). We don't call any of the other
stuff in here new or old so this feels out of place.
v2: Rebase
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 12 ++--
1 file cha
From: Ville Syrjälä
drm_client_firmware_config() is currently picking up the current
mode of the crtc via the legacy crtc->mode, which is not supposed
to be used by atomic drivers at all. We can't simply switch over
to the proper crtc->state->mode because we drop the crtc->mutex
(which protects c
From: Ville Syrjälä
The most interesting part is the change to modes[] to solve
the lifetime issue so that we can stop using the legacy
crtc->mode for atomic drivers.
Additionally I included a bunch of cleanups, some of which were
inherited from https://patchwork.freedesktop.org/series/132051/
From: Ville Syrjälä
Add the bit definitions needed for POST_LT_ADJ sequence.
v2: DP_POST_LT_ADJ_REQ_IN_PROGRESS is bit 1 not 5 (Jani)
Signed-off-by: Ville Syrjälä
---
include/drm/display/drm_dp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/display/drm_dp.h b/include/drm
From: Ville Syrjälä
We are supposed to switch off the training pattern in DPCD before
we start transmitting the idle pattern. For LTTPRs we do that
correctly, but for the sink DPRX we only do this correctly
for some platforms.
On pre-HSW (where we don't implement the .set_idle_link_train()
hook)
From: Ville Syrjälä
Disable TPS4 in favor of POST_LT_ADJ_REQ for testing purposes.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/intel_dp_link_training.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
b/drivers/
From: Ville Syrjälä
In order to implement the POST_LT_ADJ_REQ sequence we need to
know whether the sink actually requested a changed to the
vswing/pre-emph values.
Signed-off-by: Ville Syrjälä
---
.../drm/i915/display/intel_dp_link_training.c | 18 +-
.../drm/i915/display/inte
From: Ville Syrjälä
All platforms are capable of explicitly transmitting the idle
pattern. Implement it for everyone (so far it as implemented
only for HSW+).
The immediate benefit is that we gain support for the
POST_LT_ADJ_REQ sequence for all platforms.
Another potential future use would be
From: Ville Syrjälä
Everyone implements the .set_idle_link_train() hook now.
Just make it mandatory.
Signed-off-by: Ville Syrjälä
---
.../gpu/drm/i915/display/intel_dp_link_training.c| 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/displ
From: Ville Syrjälä
Move intel_dp_training_pattern() upwards to avoid the forward
declaration for the POST_LT_ADJ_REQ stuff.
Signed-off-by: Ville Syrjälä
---
.../drm/i915/display/intel_dp_link_training.c | 112 +-
1 file changed, 54 insertions(+), 58 deletions(-)
diff --git a/
From: Ville Syrjälä
Implement the POST_LT_ADJ_REQ sequence, which should be used
to further fine tune the link if TPS4 is not supported.
The POST_LT_ADJ_REQ sequence will be performed after
the normal link training has succeeded.
Only the final hop between the last LTTPR and DPRX will
perform th
From: Ville Syrjälä
Add small helpers (drm_dp_post_lt_adj_req_supported() and
drm_dp_post_lt_adj_req_in_progress()) to help with implementing
the POST_LT_ADJ_REQ sequence.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/display/drm_dp_helper.c | 8
include/drm/display/drm_dp_helper.h
From: Ville Syrjälä
Add the bit definitions needed for POST_LT_ADJ sequence.
Signed-off-by: Ville Syrjälä
---
include/drm/display/drm_dp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index c413ef68f9a3..260948a8f550 100644
From: Ville Syrjälä
Implement the POST_LT_ADJ_REQ sequence, which is supposed
to be used to further tune the link vswing/pre-emphasis
when TPS4 is not supported.
Unfortunately I don't have any displays/dongles that support
this so I wasn't able to test anything. Hopefully CI has
something...
Vi
From: Ville Syrjälä
Video players (eg. mpv) do periodic XResetScreenSaver() calls to
keep the screen on while the video playing. The modesetting ddx
plumbs these straight through into the kernel as DPMS setproperty
ioctls, without any filtering whatsoever. When implemented via
atomic these end up
From: Ville Syrjälä
We no longer store a cache vrefresh value in the mode.
Remove the stale information from drm_vrefresh() docs.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_modes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/dri
From: Ville Syrjälä
drm_mode_vrefresh() is trying to avoid divide by zero
by checking whether htotal or vtotal are zero. But we may
still end up with a div-by-zero of vtotal*htotal*...
Cc: sta...@vger.kernel.org
Reported-by: syzbot+622bba18029bcde67...@syzkaller.appspotmail.com
Closes: https://s
From: Ville Syrjälä
Fix a potential div-by-zero in drm_mode_vrefresh()
TODO: should probably make drm_mode_setcrtc() not even print the
(potentially partially) converted mode, and instead print
the original umode..
Test-with: 20241128190927.26033-1-ville.syrj...@linux.intel.com
Vil
From: Ville Syrjälä
Include the encoder itself in its possible_clones bitmask.
In the past nothing validated that drivers were populating
possible_clones correctly, but that changed in commit
74d2aacbe840 ("drm: Validate encoder->possible_clones").
Looks like radeon never got the memo and is stil
From: Ville Syrjälä
Rename the 'new_crtc' variable to just 'crtc' in
drm_client_firmware_config(). We don't call any of the other
stuff in here new or old so this feels out of place.
v2: Rebase
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 12 ++--
1 file cha
From: Ville Syrjälä
crtc->mode is legacy junk and shouldn't really be used with
atomic drivers.
Most (all?) atomic drivers do end up still calling
drm_atomic_helper_update_legacy_modeset_state() at some
point, so crtc->mode does still get populated, and this
does work for now. But now that the m
From: Ville Syrjälä
drm_client_firmware_config() is currently picking up the current
mode of the crtc via the legacy crtc->mode, which is not supposed
to be used by atomic drivers at all. We can't simply switch over
to the proper crtc->state->mode because we drop the crtc->mutex
(which protects c
From: Ville Syrjälä
Replace the 'unsigned int i' footguns with plain old signed
int. Avoids accidents if/when someone decides they need
to iterate backwards.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
From: Ville Syrjälä
Get rid of all the redundant debugs and just wait until the end
to print which mode (and of which type) we picked.
Reviewed-by: Thomas Zimmermann
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 70 +---
1 file changed, 33 ins
From: Ville Syrjälä
Bunch of variables are only needed inside loops and whatnot.
Move them to a tighter scope to make the code less confusing.
Also replace the 'unsigned int i' footguns with plain signed
ints.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 33
From: Ville Syrjälä
crtc->mode is legacy junk and shouldn't really be used with
atomic drivers.
Most (all?) atomic drivers do end up still calling
drm_atomic_helper_update_legacy_modeset_state() at some
point, so crtc->mode does still get populated, and this
does work for now. But now that the m
From: Ville Syrjälä
Rename the 'new_crtc' variable to just 'crtc' in
drm_client_firmware_config(). We don't call any of the other
stuff in here new or old so this feels out of place.
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_client_modeset.c | 12 ++--
1 file changed, 6 inse
From: Ville Syrjälä
drm_client_firmware_config() is currently picking up the current
mode of the crtc via the legacy crtc->mode, which is not supposed
to be used by atomic drivers at all. We can't simply switch over
to the proper crtc->state->mode because we drop the crtc->mutex
(which protects c
From: Ville Syrjälä
Use the array notation rather that the pointer notation for
function arguments. This makes it clear to the reader that
we are in fact dealing with an array rather than a single
pointer. Functionally the two are equivalent.
Reviewed-by: Jani Nikula
Reviewed-by: Thomas Zimmerm
From: Ville Syrjälä
The modes used by the client code live on the connectors' mode
lists, which are not owned by the client code, and thus it has
no business modifying the modes. Mark the modes const to make
that fact abundantly clear.
Reviewed-by: Jani Nikula
Reviewed-by: Thomas Zimmermann
Si
From: Ville Syrjälä
The most interesting part is the change to modes[] to solve
the lifetime issue so that we can stop using the legacy
crtc->mode for atomic drivers.
Additionally I included a bunch of cleanups, some of which were
inherited from https://patchwork.freedesktop.org/series/132051/
From: Ville Syrjälä
Allow meson to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Neil Armstrong
Cc: linux-amlo...@lists.infradead.org
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/meson/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(
From: Ville Syrjälä
Allow mediatek to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Chun-Kuang Hu
Cc: Philipp Zabel
Cc: linux-media...@lists.infradead.org
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/mediatek/Kconfig | 4 ++--
1 file changed,
From: Ville Syrjälä
Allow fsl-dcu to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Stefan Agner
Cc: Alison Wang
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/fsl-dcu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
From: Ville Syrjälä
Allow imx/dcss to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.
Cc: Laurentiu Palcu
Cc: Lucas Stach
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/imx/dcss/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
1 - 100 of 1135 matches
Mail list logo