summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-07-18 20:30:51 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-07-19 13:56:44 -0500
commit5c675bf2c67c4efb36a78bebf44dc435db2daf16 (patch)
tree4260f5a7ac89adbeba4fa876da0a1dd080b451eb /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
parent58c24b7c893cb1739918c875ae3cf4bb5f86ebb7 (diff)
downloadlinux-5c675bf2c67c4efb36a78bebf44dc435db2daf16.tar.gz
linux-5c675bf2c67c4efb36a78bebf44dc435db2daf16.tar.bz2
linux-5c675bf2c67c4efb36a78bebf44dc435db2daf16.zip
drm/amdgpu: clean up UVD instance handling v2
The whole handle, filp and entity handling is superfluous here. We should have reviewed that more thoughtfully. It looks like somebody just made the code instance aware without knowing the background. v2: fix one more missed case in amdgpu_uvd_suspend Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
index cae3f526216b..66872286ab12 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
@@ -42,12 +42,9 @@ struct amdgpu_uvd_inst {
void *cpu_addr;
uint64_t gpu_addr;
void *saved_bo;
- atomic_t handles[AMDGPU_MAX_UVD_HANDLES];
- struct drm_file *filp[AMDGPU_MAX_UVD_HANDLES];
struct amdgpu_ring ring;
struct amdgpu_ring ring_enc[AMDGPU_MAX_UVD_ENC_RINGS];
struct amdgpu_irq_src irq;
- struct drm_sched_entity entity;
uint32_t srbm_soft_reset;
};
@@ -56,10 +53,13 @@ struct amdgpu_uvd {
unsigned fw_version;
unsigned max_handles;
unsigned num_enc_rings;
- uint8_t num_uvd_inst;
+ uint8_t num_uvd_inst;
bool address_64_bit;
bool use_ctx_buf;
- struct amdgpu_uvd_inst inst[AMDGPU_MAX_UVD_INSTANCES];
+ struct amdgpu_uvd_inst inst[AMDGPU_MAX_UVD_INSTANCES];
+ struct drm_file *filp[AMDGPU_MAX_UVD_HANDLES];
+ atomic_t handles[AMDGPU_MAX_UVD_HANDLES];
+ struct drm_sched_entity entity;
struct delayed_work idle_work;
};