From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Error out when trying to set a y-tiled as a sprite
Date: Mon, 29 Oct 2012 18:24:09 +0200 [thread overview]
Message-ID: <20121029162409.GC3791@intel.com> (raw)
In-Reply-To: <6c3329$6ur22h@orsmga002.jf.intel.com>
On Sun, Oct 28, 2012 at 10:04:54AM +0000, Chris Wilson wrote:
> On Fri, 26 Oct 2012 10:42:54 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Fri, 26 Oct 2012 18:30:50 +0100
> > Damien Lespiau <damien.lespiau@gmail.com> wrote:
> >
> > > From: Damien Lespiau <damien.lespiau@intel.com>
> > >
> > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/intel_sprite.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > > index 3434b6e..aa8d09b 100644
> > > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > > @@ -465,6 +465,11 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> > > if (intel_plane->pipe != intel_crtc->pipe)
> > > return -EINVAL;
> > >
> > > + /* Sprite planes can be linear or x-tiled surfaces */
> > > + if (!(obj->tiling_mode == I915_TILING_NONE ||
> > > + obj->tiling_mode == I915_TILING_X))
> > > + return -EINVAL;
> > > +
> > > /*
> > > * Clamp the width & height into the visible area. Note we don't
> > > * try to scale the source if part of the visible region is offscreen.
> >
> > Do we not catch this when we make the fb? If not we may want to do
> > this there...
>
> We do. However, we don't catch userspace changing the tiling on an
> existing fb (unless actually pinned)...
Why not simply count how many fbs reference a given bo, and reject
tiling changes when the count > 0?
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2012-10-29 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 17:30 [PATCH] drm/i915: Error out when trying to set a y-tiled as a sprite Damien Lespiau
2012-10-26 17:42 ` Jesse Barnes
2012-10-28 10:04 ` Chris Wilson
2012-10-29 15:20 ` Lespiau, Damien
2012-10-29 16:32 ` Jesse Barnes
2012-10-29 16:24 ` Ville Syrjälä [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=20121029162409.GC3791@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox