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
From: Ville Syrjälä
Use the appropriate 64bit division helpers to make the code
build on 32bit architectures.
Cc: Laurentiu Palcu
Cc: Lucas Stach
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/imx/dcss/dcss-scaler.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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ä
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ä
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ä
__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ä
Repost of the stragglers from
https://patchwork.freedesktop.org/series/132164/
Cc: Alison Wang
Cc: Chun-Kuang Hu
Cc: Laurentiu Palcu
Cc: linux-amlo...@lists.infradead.org
Cc: linux-media...@lists.infradead.org
Cc: Lucas Stach
Cc: Neil Armstrong
Cc: Philipp Zabel
Cc: Rus
From: Ville Syrjälä
Atomic drivers shouldn't be using the legacy state stored
directly under drm_crtc. Move that junk into a 'legacy' sub
structure to highlight the offenders, of which there are
quite a few unfortunately.
I'm hoping we could get all these fixed and then declare
the legacy state
From: Ville Syrjälä
Hide the plane->fb/etc. footguns better by stashing them inside
a "legacy" sub struct.
Eventually maybe we could turn 'legacy' into a pointer
that only exists on legacy drivers to completely prevent
any abuse by atomic drivers...
Side note: _dpu_plane_set_danger_state() look
From: Ville Syrjälä
An attempt to hide the drm_plane/crtc legacy state better.
This also highlights the fact that a lot of supposedly
atomic drivers are poking around in the legacy crtc state,
which is rather questionable. For planes we did force the
legacy state to NULL already to force drivers
From: Ville Syrjälä
Use 'bool' type where it makes more sense than 'int'.
v2: Rebase due to corrected 'fbcon_cursor_blink' initial value
Acked-by: Helge Deller
Signed-off-by: Ville Syrjälä
---
drivers/video/fbdev/core/fbcon.c | 23 ---
1 file changed, 12 insertions(+), 11
From: Ville Syrjälä
Invert fbcon_cursor_noblink into fbcon_cursor_blink so that:
- it matches the sysfs attribute exactly
- avoids having to do these NOT operations all over the place
v2: Set the initial value to 1 to keep the same default
behaviour (Helge)
Cc: Helge Deller
Signed-off-by:
From: Ville Syrjälä
Use 'bool' type where it makes more sense than 'int'.
Signed-off-by: Ville Syrjälä
---
drivers/video/fbdev/core/fbcon.c | 23 ---
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/
From: Ville Syrjälä
Invert fbcon_is_inactive() into fbcon_is_active(). Much easier
on the poor brain when you don't have to do dobule negations
all over the place.
Signed-off-by: Ville Syrjälä
---
drivers/video/fbdev/core/fbcon.c | 30 +++---
1 file changed, 15 insertio
From: Ville Syrjälä
Make the code more legible by adding get_{fg,bg}_color()
which hide the obscure 'is_fg' parameter of get_color()
from the caller.
Signed-off-by: Ville Syrjälä
---
drivers/video/fbdev/core/fbcon.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-
From: Ville Syrjälä
Invert fbcon_cursor_noblink into fbcon_cursor_blink so that:
- it matches the sysfs attribute exactly
- avoids having to do these NOT operations all over the place
Signed-off-by: Ville Syrjälä
---
drivers/video/fbdev/core/fbcon.c | 8
1 file changed, 4 insertions(+
From: Ville Syrjälä
Currently fbcon adds the attributes after registering the device,
which means the attributes may not be there by the time udev
gets the ADD uevent. Fix the race by switching over to
device_create_with_groups().
With this one can reliably turn off the power wasting cursor
blin
From: Ville Syrjälä
Currently setting cursor_blink attribute to 0 before any fb
devices are around does absolutely nothing. When fb devices appear
and fbcon becomes active the cursor starts blinking. Fix the problem
by recoding the desired state of the attribute even if no fb devices
are present
From: Ville Syrjälä
Make the 'cursor_blink' sysfs attribute actually usable from
udev rules. I also took the opportinity to some cleanups t
the code after getting annoyed by it.
Ville Syrjälä (6):
fbcon: Make cursor_blink=0 work when configured before fb devices
appear
fbcon: Add sysfs a
From: Ville Syrjälä
Export drm_plane_has_format() so that drivers can use it.
v2: add kerneldoc
Reviewed-by: Jani Nikula
Reviewed-by: Daniel Vetter
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/drm_crtc_internal.h | 2 --
drivers/gpu/drm/drm_plane.c | 10 ++
include/drm/
From: Ville Syrjälä
I don't think the display hardware really has such chroma
plane tile row alignment requirements as outlined in
commit d156135e6a54 ("drm/i915/tgl: Make sure a semiplanar
UV plane is tile row size aligned")
Bspec had the same exact thing to say about earlier hardware
as well,
From: Ville Syrjälä
Currently we still use the SKL+ PLANE_SURF alignment even
for TGL+ even though the hardware no longer needs it.
Introduce a separate tgl_plane_min_alignment() and update
it to more accurately reflect the hardware requirements.
v2: Don't screw up DPT+semiplanar 2MiB alignment
From: Ville Syrjälä
Now that all pre-skl platforms have their own .min_alignment()
functions the remainder of intel_surf_alignment() can be hoisted
into skl_univerals_plane.c (and renamed appropriately).
Reviewed-by: Imre Deak
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/inte
From: Ville Syrjälä
Extract the necessary chunks from intel_surf_alignment()
into per-platform variants for all pre-skl primary/sprite
planes.
Reviewed-by: Imre Deak
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/i9xx_plane.c | 69 -
drivers/gpu/drm/i915/d
From: Ville Syrjälä
Split intel_cursor_alignment() into per-platform variants.
Reviewed-by: Imre Deak
Signed-off-by: Ville Syrjälä
---
drivers/gpu/drm/i915/display/intel_cursor.c | 40 +++--
drivers/gpu/drm/i915/display/intel_fb.c | 16 -
drivers/gpu/drm/i915/displ
1 - 100 of 1110 matches
Mail list logo