[Intel-gfx] [PATCH 1/3] drm/i915: add SNB and IVB video sprite support v6
Jesse Barnes
jbarnes at virtuousgeek.org
Thu Feb 23 18:01:36 CET 2012
On Wed, 15 Feb 2012 03:18:42 +0000
"Lan, Hai" <hai.lan at intel.com> wrote:
> Hi Jesse,
> I have tested the video sprite with intel-gpu-tools on SNB and found a bug.
> When setting overlay position with x<0, it will divide 0 and make drm driver crash.
> I have fixed it. Please see my patch. Thanks.
>
> Hai Lan
>
> > -----Original Message-----
> > From: intel-gfx-bounces+hai.lan=intel.com at lists.freedesktop.org
> > [mailto:intel-gfx-bounces+hai.lan=intel.com at lists.freedesktop.org] On
> > Behalf Of Jesse Barnes
> > Sent: Wednesday, December 14, 2011 5:20 AM
> > To: intel-gfx at lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH 1/3] drm/i915: add SNB and IVB video sprite
> > support v6
> >
> > The video sprites support various video surface formats natively and can
> > handle scaling as well. So add support for them using the new DRM core
> > sprite support functions.
>
>
> > +static bool
> > +sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane,
> > + uint32_t sprite_width, int pixel_size,
> > + const struct intel_watermark_params *display,
> > + int latency_ns, int *sprite_wm)
> > +{
> > + struct drm_crtc *crtc;
> > + unsigned long line_time_us;
> > + int clock;
> > + int line_count, line_size;
> > + int small, large;
> > + int entries;
> > +
> > + if (!latency_ns) {
> > + *sprite_wm = 0;
> > + return false;
> > + }
> > +
> > + crtc = intel_get_crtc_for_plane(dev, plane);
> > + clock = crtc->mode.clock;
> > +
> > + line_time_us = (sprite_width * 1000) / clock;
> > + line_count = (latency_ns / line_time_us + 1000) / 1000;
> > + line_size = sprite_width * pixel_size;
> > +
>
Applied, thanks Hai.
--
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120223/4a444095/attachment.sig>
More information about the Intel-gfx
mailing list