hardware/intel/intel-driver
Revision | 10c4cdd103f730a9e07ffcf0f940e8f63ee5738d (tree) |
---|---|
Zeit | 2016-01-11 17:34:43 |
Autor | peng.chen <peng.c.chen@inte...> |
Commiter | Xiang, Haihao |
only re-caculate surface width&height for tiled surface
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@intel.com>
@@ -3819,22 +3819,22 @@ i965_check_alloc_surface_bo(VADriverContextP ctx, | ||
3819 | 3819 | |
3820 | 3820 | int bpp_1stplane = bpp_1stplane_by_fourcc(fourcc); |
3821 | 3821 | |
3822 | - if (obj_surface->user_h_stride_set) { | |
3823 | - ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER); | |
3824 | - } else | |
3825 | - obj_surface->width = ALIGN(obj_surface->orig_width * bpp_1stplane, 128); | |
3826 | - | |
3827 | - if (obj_surface->user_v_stride_set) { | |
3828 | - ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER); | |
3829 | - } else | |
3830 | - obj_surface->height = ALIGN(obj_surface->orig_height, 32); | |
3831 | - | |
3832 | 3822 | if ((tiled && !obj_surface->user_disable_tiling)) { |
3833 | 3823 | ASSERT_RET(fourcc != VA_FOURCC_I420 && |
3834 | 3824 | fourcc != VA_FOURCC_IYUV && |
3835 | 3825 | fourcc != VA_FOURCC_YV12, |
3836 | 3826 | VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT); |
3837 | 3827 | |
3828 | + if (obj_surface->user_h_stride_set) { | |
3829 | + ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER); | |
3830 | + } else | |
3831 | + obj_surface->width = ALIGN(obj_surface->orig_width * bpp_1stplane, 128); | |
3832 | + | |
3833 | + if (obj_surface->user_v_stride_set) { | |
3834 | + ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER); | |
3835 | + }else | |
3836 | + obj_surface->height = ALIGN(obj_surface->orig_height, 32); | |
3837 | + | |
3838 | 3838 | region_height = obj_surface->height; |
3839 | 3839 | |
3840 | 3840 | switch (fourcc) { |