diff options
author | Imre Deak <imre.deak@intel.com> | 2021-05-06 19:19:30 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-05-07 11:13:02 +0300 |
commit | 8a4053738c0584dd1bee45d1878c71265617cb17 (patch) | |
tree | 0931ba03852294238b9d4eeef57ae16c652b5148 /drivers/gpu/drm/i915/display/intel_fb.c | |
parent | f6b044e4d9fb3b2b00681c96a3fc438e9c281ef2 (diff) | |
download | linux-8a4053738c0584dd1bee45d1878c71265617cb17.tar.gz linux-8a4053738c0584dd1bee45d1878c71265617cb17.tar.bz2 linux-8a4053738c0584dd1bee45d1878c71265617cb17.zip |
drm/i915/adl_p: Enable remapping to pad DPT FB strides to POT
Enable padding of DPT FB strides to POT, using the FB remapping logic.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-11-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c index 29c558fbb397..a005c68889e7 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.c +++ b/drivers/gpu/drm/i915/display/intel_fb.c @@ -478,9 +478,12 @@ static bool intel_plane_can_remap(const struct intel_plane_state *plane_state) return true; } -static bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb) +bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb) { - return false; + struct drm_i915_private *i915 = to_i915(fb->base.dev); + + return IS_ALDERLAKE_P(i915) && fb->base.modifier != DRM_FORMAT_MOD_LINEAR && + !is_ccs_modifier(fb->base.modifier); } static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation) |