]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915: Eliminate one more frequent drm_format_info()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 12 Nov 2025 23:30:30 +0000 (01:30 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 27 Nov 2025 22:37:36 +0000 (00:37 +0200)
commit0646d0dd6665afa1e2c4fa7ba296a7ff880ab232
tree230dbd1553afac3f3f8f55a7a820270b71bd8c6b
parent8afc0198a4bd6988bd3f575be00dfdb628f0be5f
drm/i915: Eliminate one more frequent drm_format_info()

Another (somewhat expensive) drm_format_info() call has
appeared in intel_plane_can_async_flip(). That one may get
called several times per commit so we need to get rid of
it.

Fortunately most callers already have the framebuffer at
hand, so we can just grab the format info from there.
The one exception is intel_plane_format_mod_supported_async()
where we have to do the lookup. But that only gets called
(a bunch of times) during driver init to build the
IN_FORMATS_ASYNC blob, and afterwards there is no runtime
cost.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251112233030.24117-4-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
drivers/gpu/drm/i915/display/i9xx_plane.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_plane.c
drivers/gpu/drm/i915/display/intel_plane.h
drivers/gpu/drm/i915/display/skl_universal_plane.c