Merge tag 'ktest-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / gfx_v7_0.c
index 0cc011f..04eaf3a 100644 (file)
@@ -1850,8 +1850,6 @@ static void gfx_v7_0_setup_rb(struct amdgpu_device *adev)
  *
  */
 #define DEFAULT_SH_MEM_BASES   (0x6000)
-#define FIRST_COMPUTE_VMID     (8)
-#define LAST_COMPUTE_VMID      (16)
 static void gfx_v7_0_init_compute_vmid(struct amdgpu_device *adev)
 {
        int i;
@@ -1869,7 +1867,7 @@ static void gfx_v7_0_init_compute_vmid(struct amdgpu_device *adev)
                        SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT;
        sh_mem_config |= MTYPE_NONCACHED << SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT;
        mutex_lock(&adev->srbm_mutex);
-       for (i = FIRST_COMPUTE_VMID; i < LAST_COMPUTE_VMID; i++) {
+       for (i = adev->vm_manager.first_kfd_vmid; i < AMDGPU_NUM_VMID; i++) {
                cik_srbm_select(adev, 0, 0, 0, i);
                /* CP and shaders */
                WREG32(mmSH_MEM_CONFIG, sh_mem_config);
@@ -1882,7 +1880,7 @@ static void gfx_v7_0_init_compute_vmid(struct amdgpu_device *adev)
 
        /* Initialize all compute VMIDs to have no GDS, GWS, or OA
           acccess. These should be enabled by FW for target VMIDs. */
-       for (i = FIRST_COMPUTE_VMID; i < LAST_COMPUTE_VMID; i++) {
+       for (i = adev->vm_manager.first_kfd_vmid; i < AMDGPU_NUM_VMID; i++) {
                WREG32(amdgpu_gds_reg_offset[i].mem_base, 0);
                WREG32(amdgpu_gds_reg_offset[i].mem_size, 0);
                WREG32(amdgpu_gds_reg_offset[i].gws, 0);
@@ -3039,7 +3037,7 @@ static void gfx_v7_0_mqd_init(struct amdgpu_device *adev,
        mqd->cp_hqd_active = 1;
 }
 
-int gfx_v7_0_mqd_commit(struct amdgpu_device *adev, struct cik_mqd *mqd)
+static int gfx_v7_0_mqd_commit(struct amdgpu_device *adev, struct cik_mqd *mqd)
 {
        uint32_t tmp;
        uint32_t mqd_reg;
@@ -5209,7 +5207,7 @@ static void gfx_v7_0_get_cu_info(struct amdgpu_device *adev)
        cu_info->lds_size = 64;
 }
 
-const struct amdgpu_ip_block_version gfx_v7_0_ip_block =
+static const struct amdgpu_ip_block_version gfx_v7_0_ip_block =
 {
        .type = AMD_IP_BLOCK_TYPE_GFX,
        .major = 7,