[Libva] [PATCH ] Fix inconsistent surface dimension during allocating surface buffer object

Gwenole Beauchesne gb.devel at gmail.com
Mon Sep 17 20:59:57 PDT 2012


Hi Yakui,

2012/9/18  <yakui.zhao at intel.com>:

> When one surface is created, the height/width is aligned to 16 pixels.
> But when trying to allocate the buffer object for it, the width is aligned
> to 128 and height is aligned to 32. If the surface is mapped and accessed
> before allocating the buffer object, the incorrect dimension is returned and
> and the incorrect content is written.

What branch are you using? I think that was the case since the
beginning, something was probably changed from then, because...

> @@ -506,8 +506,8 @@ i965_CreateSurfaces(VADriverContextP ctx,
>          obj_surface->orig_width = width;
>          obj_surface->orig_height = height;
>
> -        obj_surface->width = ALIGN(width, 16);
> -        obj_surface->height = ALIGN(height, 16);
> +        obj_surface->width = ALIGN(width, 128);
> +        obj_surface->height = ALIGN(height, 32);
>          obj_surface->flags = SURFACE_REFERENCED;
>          obj_surface->fourcc = 0;
>          obj_surface->bo = NULL;

... this actually is an SNB/IVB requirement IIRC. Oh, the change was
indeed brought by f7eedfab. Could you please create a patch that
re-instates f7eedfab hunks for obj_surface->{width,height}? i.e. with
the SNB/IVB check, and mentioning this is a regression fix?

Thanks,
Gwenole.


More information about the Libva mailing list