On Sat, Sep 05, 2015 at 01:10:11AM +0000, Konduru, Chandra wrote:
> > > +
> > > +         if (fb->pixel_format == DRM_FORMAT_NV12) {
> > > +                 int height_in_mem = (fb->offsets[1]/fb->pitches[0]);
> > > +                 /*
> > > +                  * If UV starts from middle of a page, then UV start
> > should
> > > +                  * be programmed to beginning of that page. And offset
> > into that
> > > +                  * page to be programmed into y-offset
> > > +                  */
> > > +                 tile_row_adjustment = height_in_mem % tile_height;
> > > +                 aux_dist = fb->pitches[0] * (height_in_mem -
> > tile_row_adjustment);
> > > +                 aux_x_offset = DIV_ROUND_UP(x, 2);
> > > +                 aux_y_offset = DIV_ROUND_UP(y, 2) +
> > tile_row_adjustment;
> > > +                 /* For tile-Yf, uv-subplane tile width is 2x of 
> > > Y-subplane
> > */
> > > +                 aux_stride = fb->modifier[0] ==
> > I915_FORMAT_MOD_Yf_TILED ?
> > > +                         stride / 2 : stride;
> > 
> > The 2x part was rather well hidden in the spec. How do we deal with
> > cases when the Y stride is an odd number of tiles?
> 
> It should be a round up division to take care of that scenario. 

That would stil lresult in a corrupted picture I think. So I was
thinking that we should just refuse to create NCV12 framebuffers with a
poorly aligned stride.

> Fixing this and resolving your other comments. 
> Will be sending updated patches shortly.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to