drm/i915/dpt: Only do the POT stride remap when using DPT
authorjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:53:46 +0000 (23:53 +0000)
committerjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:53:46 +0000 (23:53 +0000)
From Ville Syrjala
52c1a67dd3039ba254484cb7740d9079663a80bd in linux-6.1.y/6.1.70
ef5cb493a9acd7d97870d6e542020980ae3f3483 in mainline linux

sys/dev/pci/drm/i915/display/intel_fb.c

index 8605bbf..4f7502d 100644 (file)
@@ -1176,7 +1176,7 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
 {
        struct drm_i915_private *i915 = to_i915(fb->base.dev);
 
-       return IS_ALDERLAKE_P(i915) && fb->base.modifier != DRM_FORMAT_MOD_LINEAR;
+       return IS_ALDERLAKE_P(i915) && intel_fb_uses_dpt(&fb->base);
 }
 
 static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)