aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-01-31 11:00:41 +0100
committerAlex Deucher <alexander.deucher@amd.com>2016-02-10 14:17:14 -0500
commit7270f8391df1a0b68fb6bef416dd6d7d0634ed71 (patch)
tree0014d059c85e16393fdd549ff11ffb708cd3f155 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentb6ea2f37a222c9d04725188a9751f21ee07eab2e (diff)
drm/amdgpu: add amdgpu_set_ib_value helper (v2)
And use it in UVD/VCE command patching. v2: squash in Christian's fix Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index f2f9b64d0141..4a6e87857875 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1250,11 +1250,19 @@ struct amdgpu_job {
#define to_amdgpu_job(sched_job) \
container_of((sched_job), struct amdgpu_job, base)
-static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p, uint32_t ib_idx, int idx)
+static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p,
+ uint32_t ib_idx, int idx)
{
return p->ibs[ib_idx].ptr[idx];
}
+static inline void amdgpu_set_ib_value(struct amdgpu_cs_parser *p,
+ uint32_t ib_idx, int idx,
+ uint32_t value)
+{
+ p->ibs[ib_idx].ptr[idx] = value;
+}
+
/*
* Writeback
*/