summaryrefslogtreecommitdiff
path: root/src/gen75_mfd.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-03-13 13:59:18 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-03-15 15:45:28 +0800
commit4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f (patch)
tree31822949f14e0034457fb715a550e0376e28113f /src/gen75_mfd.c
parent9fbbc9b03a52c45571d0407b889461619a8dce52 (diff)
downloadlibva-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.tar.gz
libva-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.tar.bz2
libva-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.zip
Decoder: use surface object for the workaround
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src/gen75_mfd.c')
-rw-r--r--src/gen75_mfd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gen75_mfd.c b/src/gen75_mfd.c
index c01796c..4f08f38 100644
--- a/src/gen75_mfd.c
+++ b/src/gen75_mfd.c
@@ -2530,6 +2530,7 @@ gen75_jpeg_wa_init(VADriverContextP ctx,
obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
assert(obj_surface);
i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
+ gen7_mfd_context->jpeg_wa_surface_object = obj_surface;
if (!gen7_mfd_context->jpeg_wa_slice_data_bo) {
gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr,
@@ -2575,8 +2576,7 @@ static void
gen75_jpeg_wa_surface_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
- struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
BEGIN_BCS_BATCH(batch, 6);
@@ -2607,7 +2607,7 @@ gen75_jpeg_wa_pipe_buf_addr_state_bplus(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
@@ -2680,7 +2680,7 @@ gen75_jpeg_wa_pipe_buf_addr_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
@@ -3283,6 +3283,7 @@ gen75_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config
}
gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE;
+ gen7_mfd_context->jpeg_wa_surface_object = NULL;
switch (obj_config->profile) {
case VAProfileMPEG2Simple: