[RFC] drm/i915: Add gen check for fb size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From gen7, the platform can support fb of size < 3x3.
Adding this check for gen along with fb width & height.
Note: IVB is gen7 but its not clear if it can support width < 3 and
height < 3.

This patch has been tested in Android environment.

Signed-off-by: Vandana Kannan <vandana.kannan@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_sprite.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index cd21525..310d0a7 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -770,8 +770,13 @@ intel_check_sprite_plane(struct drm_plane *plane,
 		return -EINVAL;
 	}
 
+	if (INTEL_INFO(dev)->gen < 7 && (fb->width < 3 || fb->height < 3)) {
+		DRM_DEBUG_KMS("Unsuitable framebuffer for plane\n");
+		return -EINVAL;
+	}
+
 	/* FIXME check all gen limits */
-	if (fb->width < 3 || fb->height < 3 || fb->pitches[0] > 16384) {
+	if (fb->pitches[0] > 16384) {
 		DRM_DEBUG_KMS("Unsuitable framebuffer for plane\n");
 		return -EINVAL;
 	}
-- 
2.0.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux