On Wed, 15 Feb 2012 03:18:42 +0000
"Lan, Hai" <hai....@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....@lists.freedesktop.org
> > [mailto:intel-gfx-bounces+hai.lan=intel....@lists.freedesktop.org] On
> > Behalf Of Jesse Barnes
> > Sent: Wednesday, December 14, 2011 5:20 AM
> > To: intel-gfx@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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to