summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeng.chen <peng.c.chen@intel.com>2016-01-07 08:54:34 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-01-11 16:34:43 +0800
commit10c4cdd103f730a9e07ffcf0f940e8f63ee5738d (patch)
treeb5f362cc3f82d94204afb03bfc604eb8cef0779e /src
parente13af2d393f1a120e93c5134af393bd3a78399b0 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/i965_drv_video.c20
1 files 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) {