drm/amdgpu: add VCE support for Stoney (v2)
authorSamuel Li <samuel.li@amd.com>
Thu, 8 Oct 2015 20:27:55 +0000 (16:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Oct 2015 16:21:07 +0000 (12:21 -0400)
Stoney is VCE 3.x single.

v2: Stoney is single pipe like Fiji

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c

index 74f2038ac74783a3be14be55a7b0de7e768d61c7..03f0c3bae516899aa81ac9b5d4dc6a9c7c1d9660 100644 (file)
@@ -49,6 +49,7 @@
 #define FIRMWARE_TONGA         "amdgpu/tonga_vce.bin"
 #define FIRMWARE_CARRIZO       "amdgpu/carrizo_vce.bin"
 #define FIRMWARE_FIJI          "amdgpu/fiji_vce.bin"
+#define FIRMWARE_STONEY                "amdgpu/stoney_vce.bin"
 
 #ifdef CONFIG_DRM_AMDGPU_CIK
 MODULE_FIRMWARE(FIRMWARE_BONAIRE);
@@ -60,6 +61,7 @@ MODULE_FIRMWARE(FIRMWARE_MULLINS);
 MODULE_FIRMWARE(FIRMWARE_TONGA);
 MODULE_FIRMWARE(FIRMWARE_CARRIZO);
 MODULE_FIRMWARE(FIRMWARE_FIJI);
+MODULE_FIRMWARE(FIRMWARE_STONEY);
 
 static void amdgpu_vce_idle_work_handler(struct work_struct *work);
 
@@ -106,6 +108,9 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
        case CHIP_FIJI:
                fw_name = FIRMWARE_FIJI;
                break;
+       case CHIP_STONEY:
+               fw_name = FIRMWARE_STONEY;
+               break;
 
        default:
                return -EINVAL;
index b1bf27bb8f9e562532ec0cb1b26870181d4a9195..6a52db6ad8d779afe7a82f29a731a4e912183bcb 100644 (file)
@@ -205,8 +205,9 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
        u32 tmp;
        unsigned ret;
 
-       /* Fiji is single pipe */
-       if (adev->asic_type == CHIP_FIJI) {
+       /* Fiji, Stoney are single pipe */
+       if ((adev->asic_type == CHIP_FIJI) ||
+           (adev->asic_type == CHIP_STONEY)){
                ret = AMDGPU_VCE_HARVEST_VCE1;
                return ret;
        }