]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_device.c
index 2969f3a4b68d43b50d5a07fb1003902ee53233f9..130a9adf09ef9cea548bb01d674afe2f7177dd9c 100644 (file)
@@ -84,6 +84,7 @@ MODULE_FIRMWARE("amdgpu/navi10_gpu_info.bin");
 MODULE_FIRMWARE("amdgpu/navi14_gpu_info.bin");
 MODULE_FIRMWARE("amdgpu/navi12_gpu_info.bin");
 MODULE_FIRMWARE("amdgpu/vangogh_gpu_info.bin");
+MODULE_FIRMWARE("amdgpu/yellow_carp_gpu_info.bin");
 
 #define AMDGPU_RESUME_MS               2000
 
@@ -1885,6 +1886,9 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
        case CHIP_VANGOGH:
                chip_name = "vangogh";
                break;
+       case CHIP_YELLOW_CARP:
+               chip_name = "yellow_carp";
+               break;
        }
 
        snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_gpu_info.bin", chip_name);
@@ -2063,8 +2067,11 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
        case  CHIP_DIMGREY_CAVEFISH:
        case  CHIP_BEIGE_GOBY:
        case CHIP_VANGOGH:
+       case CHIP_YELLOW_CARP:
                if (adev->asic_type == CHIP_VANGOGH)
                        adev->family = AMDGPU_FAMILY_VGH;
+               else if (adev->asic_type == CHIP_YELLOW_CARP)
+                       adev->family = AMDGPU_FAMILY_YC;
                else
                        adev->family = AMDGPU_FAMILY_NV;
 
@@ -3147,6 +3154,7 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
        case CHIP_DIMGREY_CAVEFISH:
        case CHIP_BEIGE_GOBY:
        case CHIP_VANGOGH:
+       case CHIP_YELLOW_CARP:
 #endif
                return amdgpu_dc != 0;
 #endif
@@ -4116,6 +4124,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
 {
        struct dma_fence *fence = NULL, *next = NULL;
        struct amdgpu_bo *shadow;
+       struct amdgpu_bo_vm *vmbo;
        long r = 1, tmo;
 
        if (amdgpu_sriov_runtime(adev))
@@ -4125,12 +4134,12 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
 
        dev_info(adev->dev, "recover vram bo from shadow start\n");
        mutex_lock(&adev->shadow_list_lock);
-       list_for_each_entry(shadow, &adev->shadow_list, shadow_list) {
-
+       list_for_each_entry(vmbo, &adev->shadow_list, shadow_list) {
+               shadow = &vmbo->bo;
                /* No need to recover an evicted BO */
-               if (shadow->tbo.mem.mem_type != TTM_PL_TT ||
-                   shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET ||
-                   shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM)
+               if (shadow->tbo.resource->mem_type != TTM_PL_TT ||
+                   shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET ||
+                   shadow->parent->tbo.resource->mem_type != TTM_PL_VRAM)
                        continue;
 
                r = amdgpu_bo_restore_shadow(shadow, &next);
This page took 0.03688 seconds and 4 git commands to generate.