All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Vandana Kannan <vandana.kannan@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC] drm/i915: Add gen check for fb size
Date: Mon, 13 Jul 2015 11:26:01 +0200	[thread overview]
Message-ID: <20150713092601.GZ3736@phenom.ffwll.local> (raw)
In-Reply-To: <1436526912-568-1-git-send-email-vandana.kannan@intel.com>

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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-07-13  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 11:15 [RFC] drm/i915: Add gen check for fb size Vandana Kannan
2015-07-13  9:26 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150713092601.GZ3736@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vandana.kannan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.