]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/wm: Use fb->modfier to check for tiled vs. untiled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 Oct 2025 14:57:34 +0000 (17:57 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 9 Oct 2025 18:03:03 +0000 (21:03 +0300)
There is no point in checking the bo fence tiling mode when
we can just check the fb modifier instead.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251003145734.7634-6-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/i9xx_wm.c

index fd3b7b35f351a42273820f3b5305dab656d8b51f..b262319bc83d6be68499cbe4f6d67db1c305747d 100644 (file)
@@ -2295,12 +2295,11 @@ static void i9xx_update_wm(struct intel_display *display)
 
        crtc = single_enabled_crtc(display);
        if (display->platform.i915gm && crtc) {
-               struct drm_gem_object *obj;
-
-               obj = intel_fb_bo(crtc->base.primary->state->fb);
+               const struct drm_framebuffer *fb =
+                       crtc->base.primary->state->fb;
 
                /* self-refresh seems busted with untiled */
-               if (!intel_bo_is_tiled(obj))
+               if (fb->modifier == DRM_FORMAT_MOD_LINEAR)
                        crtc = NULL;
        }