Message ID | 1436526912-568-1-git-send-email-vandana.kannan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 10, 2015 at 04:45:12PM +0530, Vandana Kannan wrote: > 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@intel.com> What exactly are you usinga 3x3 framebuffer for? Imo this needs userspace plus igt testcases and all that, but really not sure why this would be worth it ever. -Daniel > --- > 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@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
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; }
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@intel.com> --- drivers/gpu/drm/i915/intel_sprite.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)