From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Jyri Sarha <jsarha@ti.com>
Subject: Re: [PATCH xf86-video-intel] sna: Add XV_COLORSPACE attribute support for sprite Xv adaptors
Date: Wed, 14 Feb 2018 22:06:17 +0200 [thread overview]
Message-ID: <20180214200617.GS5453@intel.com> (raw)
In-Reply-To: <151863737900.31524.6238249839680988670@mail.alporthouse.com>
On Wed, Feb 14, 2018 at 07:42:59PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-02-14 19:21:08)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Use the new "COLOR_ENCODING" plane property to implement the
> > XV_COLORSPACE port attribute for sprite Xv adaptors.
> >
> > Cc: Jyri Sarha <jsarha@ti.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > +void sna_crtc_set_sprite_colorspace(xf86CrtcPtr crtc,
> > + unsigned idx, int colorspace)
> > +{
> > + struct plane *p;
> > +
> > + assert(to_sna_crtc(crtc));
>
> assert(colorspace < ARRAY_SIZE(p->color_encoding.values));
>
> > +
> > + p = lookup_sprite(to_sna_crtc(crtc), idx);
> > +
> > + if (!p->color_encoding.prop)
> > + return;
> > +
> > + drmModeObjectSetProperty(to_sna(crtc->scrn)->kgem.fd,
> > + p->id, DRM_MODE_OBJECT_PLANE,
> > + p->color_encoding.prop,
> > + p->color_encoding.values[colorspace]);
>
> Does changing the property trigger an immediate update, or is that
> deferred until the next SetPlane (or atomic update)?
Legacy setprop so it'll trigger an update. So if the plane is
already enabled I suppose we'll get an extra frame of lag here.
Same deal as for the colorkey ioctl actually.
I think generally one can assume the the attribute won't be changed
very often with the plane already enabled. Generally I'd expect the
client to set this up before the first putimage.
Converting this to atomic would avoid that extra lag. But we'd need
to convert the colorkey ioctl to properties as well. And the next step
after that would tearfree+atomic for making it actually nice :)
>
> It makes no difference to this patch, except we might redisplay the
> image immediately rather than wait for the client?
We call this from the putimage hook, so we need the client to
actually repaint before anything happens. And since we don't have
reputimage manipulating the window/clipping won't update the
sprite unless the client repaints (which eg. mplayer won't do
when paused unless it gets expose events).
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-14 20:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 19:21 [PATCH xf86-video-intel] sna: Add XV_COLORSPACE attribute support for sprite Xv adaptors Ville Syrjala
2018-02-14 19:42 ` Chris Wilson
2018-02-14 20:06 ` Ville Syrjälä [this message]
2018-02-14 20:16 ` Chris Wilson
2018-03-02 11:59 ` [PATCH xf86-video-intel v2] " Ville Syrjala
2018-03-02 12:01 ` Chris Wilson
2018-03-02 12:12 ` Ville Syrjälä
2018-03-02 12:14 ` Chris Wilson
2018-03-02 15:19 ` Chris Wilson
-- strict thread matches above, loose matches on Subject: below --
2017-06-08 20:33 [PATCH 0/5] drm/i915; Support for COLOR_ENCODING and COLOR_RANGE props ville.syrjala
2017-06-08 20:33 ` [PATCH xf86-video-intel] sna: Add XV_COLORSPACE attribute support for sprite Xv adaptors ville.syrjala
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=20180214200617.GS5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jsarha@ti.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.