summaryrefslogtreecommitdiff
path: root/src/i965_gpe_utils.c
diff options
context:
space:
mode:
authorpeng.chen <peng.c.chen@intel.com>2016-08-23 13:25:01 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-08-24 12:40:03 +0800
commit1817beeb939bfbe57c33cf2d763e04128ba87933 (patch)
tree2fff4316956e448e013eb3708a99e1567d3c67f8 /src/i965_gpe_utils.c
parent5e6d1426f853df2631657ecbbb05972a86af31e4 (diff)
Add the write_enabled flag of GPE media surface state
Fix this issue: https://bugs.freedesktop.org/show_bug.cgi?id=94607 Signed-off-by: peng.chen <peng.c.chen@intel.com>
Diffstat (limited to 'src/i965_gpe_utils.c')
-rw-r--r--src/i965_gpe_utils.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/i965_gpe_utils.c b/src/i965_gpe_utils.c
index d911196..3ec164d 100644
--- a/src/i965_gpe_utils.c
+++ b/src/i965_gpe_utils.c
@@ -425,7 +425,8 @@ i965_gpe_media_rw_surface_setup(VADriverContextP ctx,
struct i965_gpe_context *gpe_context,
struct object_surface *obj_surface,
unsigned long binding_table_offset,
- unsigned long surface_state_offset)
+ unsigned long surface_state_offset,
+ int write_enabled)
{
struct i965_surface_state *ss;
dri_bo *bo;
@@ -437,7 +438,7 @@ i965_gpe_media_rw_surface_setup(VADriverContextP ctx,
ss = (struct i965_surface_state *)((char *)bo->virtual + surface_state_offset);
i965_gpe_set_media_rw_surface_state(ctx, obj_surface, ss);
dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_RENDER, 0,
+ I915_GEM_DOMAIN_RENDER, write_enabled ? I915_GEM_DOMAIN_RENDER : 0,
0,
surface_state_offset + offsetof(struct i965_surface_state, ss1),
obj_surface->bo);
@@ -616,7 +617,8 @@ gen7_gpe_media_rw_surface_setup(VADriverContextP ctx,
struct i965_gpe_context *gpe_context,
struct object_surface *obj_surface,
unsigned long binding_table_offset,
- unsigned long surface_state_offset)
+ unsigned long surface_state_offset,
+ int write_enabled)
{
struct gen7_surface_state *ss;
dri_bo *bo;
@@ -628,7 +630,7 @@ gen7_gpe_media_rw_surface_setup(VADriverContextP ctx,
ss = (struct gen7_surface_state *)((char *)bo->virtual + surface_state_offset);
gen7_gpe_set_media_rw_surface_state(ctx, obj_surface, ss);
dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_RENDER, 0,
+ I915_GEM_DOMAIN_RENDER, write_enabled ? I915_GEM_DOMAIN_RENDER : 0,
0,
surface_state_offset + offsetof(struct gen7_surface_state, ss1),
obj_surface->bo);
@@ -642,7 +644,8 @@ gen75_gpe_media_chroma_surface_setup(VADriverContextP ctx,
struct i965_gpe_context *gpe_context,
struct object_surface *obj_surface,
unsigned long binding_table_offset,
- unsigned long surface_state_offset)
+ unsigned long surface_state_offset,
+ int write_enabled)
{
struct gen7_surface_state *ss;
dri_bo *bo;
@@ -657,7 +660,7 @@ gen75_gpe_media_chroma_surface_setup(VADriverContextP ctx,
ss = (struct gen7_surface_state *)((char *)bo->virtual + surface_state_offset);
gen75_gpe_set_media_chroma_surface_state(ctx, obj_surface, ss);
dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_RENDER, 0,
+ I915_GEM_DOMAIN_RENDER, write_enabled ? I915_GEM_DOMAIN_RENDER : 0,
cbcr_offset,
surface_state_offset + offsetof(struct gen7_surface_state, ss1),
obj_surface->bo);
@@ -853,7 +856,8 @@ gen8_gpe_media_rw_surface_setup(VADriverContextP ctx,
struct i965_gpe_context *gpe_context,
struct object_surface *obj_surface,
unsigned long binding_table_offset,
- unsigned long surface_state_offset)
+ unsigned long surface_state_offset,
+ int write_enabled)
{
struct gen8_surface_state *ss;
dri_bo *bo;
@@ -865,7 +869,7 @@ gen8_gpe_media_rw_surface_setup(VADriverContextP ctx,
ss = (struct gen8_surface_state *)((char *)bo->virtual + surface_state_offset);
gen8_gpe_set_media_rw_surface_state(ctx, obj_surface, ss);
dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_RENDER, 0,
+ I915_GEM_DOMAIN_RENDER, write_enabled ? I915_GEM_DOMAIN_RENDER : 0,
0,
surface_state_offset + offsetof(struct gen8_surface_state, ss8),
obj_surface->bo);
@@ -879,7 +883,8 @@ gen8_gpe_media_chroma_surface_setup(VADriverContextP ctx,
struct i965_gpe_context *gpe_context,
struct object_surface *obj_surface,
unsigned long binding_table_offset,
- unsigned long surface_state_offset)
+ unsigned long surface_state_offset,
+ int write_enabled)
{
struct gen8_surface_state *ss;
dri_bo *bo;
@@ -894,7 +899,7 @@ gen8_gpe_media_chroma_surface_setup(VADriverContextP ctx,
ss = (struct gen8_surface_state *)((char *)bo->virtual + surface_state_offset);
gen8_gpe_set_media_chroma_surface_state(ctx, obj_surface, ss);
dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_RENDER, 0,
+ I915_GEM_DOMAIN_RENDER, write_enabled ? I915_GEM_DOMAIN_RENDER : 0,
cbcr_offset,
surface_state_offset + offsetof(struct gen8_surface_state, ss8),
obj_surface->bo);