[PATCH 22/22] drm/i915: for-CI: force remapping the FB with a POT aligned stride
Imre Deak
imre.deak at intel.com
Wed Mar 10 10:07:47 UTC 2021
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
drivers/gpu/drm/i915/display/intel_fb.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index a72c269702b9..1d4f251fa3cc 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -446,17 +446,25 @@ static int intel_fb_check_ccs_xy(const struct drm_framebuffer *fb, int ccs_plane
return 0;
}
+static bool intel_fb_can_remap(const struct drm_framebuffer *fb);
+
static bool intel_plane_can_remap(const struct intel_plane_state *plane_state)
{
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
- struct drm_i915_private *i915 = to_i915(plane->base.dev);
const struct drm_framebuffer *fb = plane_state->hw.fb;
- int i;
/* We don't want to deal with remapping with cursors */
if (plane->id == PLANE_CURSOR)
return false;
+ return intel_fb_can_remap(fb);
+}
+
+static bool intel_fb_can_remap(const struct drm_framebuffer *fb)
+{
+ struct drm_i915_private *i915 = to_i915(fb->dev);
+ int i;
+
/*
* The display engine limits already match/exceed the
* render engine limits, so not much point in remapping.
@@ -488,7 +496,7 @@ static bool intel_plane_can_remap(const struct intel_plane_state *plane_state)
static bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
{
- return false;
+ return intel_fb_can_remap(&fb->base);
}
int intel_fb_pitch(const struct drm_framebuffer *drm_fb, int color_plane, unsigned int rotation)
--
2.25.1
More information about the Intel-gfx-trybot
mailing list