aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-01-31 05:00:41 -0500
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 {
1250#define to_amdgpu_job(sched_job) \ 1250#define to_amdgpu_job(sched_job) \
1251 container_of((sched_job), struct amdgpu_job, base) 1251 container_of((sched_job), struct amdgpu_job, base)
1252 1252
1253static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p, uint32_t ib_idx, int idx) 1253static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p,
1254 uint32_t ib_idx, int idx)
1254{ 1255{
1255 return p->ibs[ib_idx].ptr[idx]; 1256 return p->ibs[ib_idx].ptr[idx];
1256} 1257}
1257 1258
1259static inline void amdgpu_set_ib_value(struct amdgpu_cs_parser *p,
1260 uint32_t ib_idx, int idx,
1261 uint32_t value)
1262{
1263 p->ibs[ib_idx].ptr[idx] = value;
1264}
1265
1258/* 1266/*
1259 * Writeback 1267 * Writeback
1260 */ 1268 */