[Libva] [PATCH] Fix the issue in i965_UnlockSurface to lock it next time

ykzhao yakui.zhao at intel.com
Thu Oct 18 22:10:23 PDT 2012


On Thu, 2012-10-18 at 23:00 -0600, Gwenole Beauchesne wrote:
> Hi,
> 
> 2012/10/19 ykzhao <yakui.zhao at intel.com>:
> > On Thu, 2012-10-18 at 22:07 -0600, Gwenole Beauchesne wrote:
> >>
> >> 2012/10/19 ykzhao <yakui.zhao at intel.com>:
> >> > On Tue, 2012-10-09 at 07:19 -0600, Zhao, Yakui wrote:
> >> >> From: Zhao Yakui <yakui.zhao at intel.com>
> >> >>
> >> >> It uses the variable of locked_image_id to check whether one surface is locked
> >> >> or not. But as the locked_image_id is not assigned correctly, it causes that
> >> >> it can't lock one surface next time although it calls the vaUnlockSurfaces.
> >> >
> >> > Any comment about this patch?
> >>
> >> I think you should move the assignment down after the "error:" clause
> >> and s/error/end/ because otherwise, you wouldn't be able to lock a
> >> surface again if an error occurred. Then, it should be fine.
> >
> > thanks for your review.
> > OK. I will update it.
> 
> Probably something like that? Not even tested for compile.
> 
> The alternative is also to move it up just after "locked_img =
> IMAGE(obj_surface->locked_image_id);" and before the "if" since only
> locked_img would be used thereafter. That'd be a shorter patch.

Hi,
   Thanks for looking at this patch again. In fact the issue is caused
by that the obj_surface->locked_image_id is not assigned correctly in
vaUnlockSurface. There is no error/exception in course of calling
vaUnlockSurface.
   So we should set the obj_surface->locked_image_id to VA_INVALID_ID.

Thanks.
   Yakui


   
   






More information about the Libva mailing list