mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
@@ -6115,7 +6115,7 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
|
||||
if (!plane->async_flip)
|
||||
continue;
|
||||
|
||||
if (!intel_plane_can_async_flip(plane, new_plane_state->hw.fb->format->format,
|
||||
if (!intel_plane_can_async_flip(plane, new_plane_state->hw.fb->format,
|
||||
new_plane_state->hw.fb->modifier)) {
|
||||
drm_dbg_kms(display->drm,
|
||||
"[PLANE:%d:%s] pixel format %p4cc / modifier 0x%llx does not support async flip\n",
|
||||
|
||||
Reference in New Issue
Block a user