drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCES
authorJammy Zhou <Jammy.Zhou@amd.com>
Tue, 1 Sep 2015 04:54:27 +0000 (12:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Sep 2015 16:23:12 +0000 (12:23 -0400)
Remove the hardcoded usage

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h

index 34812eccd7d0fcedb6e9c2b421aefeae0d8b70f5..0be51f998ff99689f451e2757613af234b316471 100644 (file)
@@ -98,6 +98,9 @@ extern int amdgpu_sched_hw_submission;
 #define AMDGPU_MAX_COMPUTE_RINGS               8
 #define AMDGPU_MAX_VCE_RINGS                   2
 
+/* max number of IP instances */
+#define AMDGPU_MAX_SDMA_INSTANCES              2
+
 /* number of hw syncs before falling back on blocking */
 #define AMDGPU_NUM_SYNCS                       4
 
@@ -2057,7 +2060,7 @@ struct amdgpu_device {
        struct amdgpu_gfx               gfx;
 
        /* sdma */
-       struct amdgpu_sdma              sdma[2];
+       struct amdgpu_sdma              sdma[AMDGPU_MAX_SDMA_INSTANCES];
        struct amdgpu_irq_src           sdma_trap_irq;
        struct amdgpu_irq_src           sdma_illegal_inst_irq;