[Libva] [PATCH] only re-caculate surface width&height for tiled surface
Xiang, Haihao
haihao.xiang at intel.com
Mon Jan 11 17:15:14 PST 2016
Applied.
Thanks
Haihao
> fix Bug 93499 - daf8f6c762874 introduced display corruption on i3
> 330M
> https://bugs.freedesktop.org/show_bug.cgi?id=93499
>
> Signed-off-by: peng.chen <peng.c.chen at intel.com>
> ---
> src/i965_drv_video.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 7b7bdf6..db82b27 100644
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -3819,22 +3819,22 @@ i965_check_alloc_surface_bo(VADriverContextP
> ctx,
>
> int bpp_1stplane = bpp_1stplane_by_fourcc(fourcc);
>
> - if (obj_surface->user_h_stride_set) {
> - ASSERT_RET(IS_ALIGNED(obj_surface->width, 128),
> VA_STATUS_ERROR_INVALID_PARAMETER);
> - } else
> - obj_surface->width = ALIGN(obj_surface->orig_width *
> bpp_1stplane, 128);
> -
> - if (obj_surface->user_v_stride_set) {
> - ASSERT_RET(IS_ALIGNED(obj_surface->height, 32),
> VA_STATUS_ERROR_INVALID_PARAMETER);
> - } else
> - obj_surface->height = ALIGN(obj_surface->orig_height, 32);
> -
> if ((tiled && !obj_surface->user_disable_tiling)) {
> ASSERT_RET(fourcc != VA_FOURCC_I420 &&
> fourcc != VA_FOURCC_IYUV &&
> fourcc != VA_FOURCC_YV12,
> VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT);
>
> + if (obj_surface->user_h_stride_set) {
> + ASSERT_RET(IS_ALIGNED(obj_surface->width, 128),
> VA_STATUS_ERROR_INVALID_PARAMETER);
> + } else
> + obj_surface->width = ALIGN(obj_surface->orig_width *
> bpp_1stplane, 128);
> +
> + if (obj_surface->user_v_stride_set) {
> + ASSERT_RET(IS_ALIGNED(obj_surface->height, 32),
> VA_STATUS_ERROR_INVALID_PARAMETER);
> + }else
> + obj_surface->height = ALIGN(obj_surface->orig_height, 32);
> +
> region_height = obj_surface->height;
>
> switch (fourcc) {
More information about the Libva
mailing list