aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch')
-rw-r--r--meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch
new file mode 100644
index 00000000..be0d528d
--- /dev/null
+++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0378-drm-amdgpu-add-support-for-VCE-3.x-on-Fiji.patch
@@ -0,0 +1,84 @@
+From 188a9bcd6cbe55c6fea23309548741d8e34bb590 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 27 Jul 2015 14:24:14 -0400
+Subject: [PATCH 0378/1050] drm/amdgpu: add support for VCE 3.x on Fiji
+
+VCE on fiji is single pipe only.
+
+Reviewed-by: David Zhang <david1.zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 5 +++++
+ drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 7 +++++++
+ drivers/gpu/drm/amd/amdgpu/vi.c | 7 +++++++
+ 3 files changed, 19 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+index d3ca730..1725719 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+@@ -48,6 +48,7 @@
+ #endif
+ #define FIRMWARE_TONGA "amdgpu/tonga_vce.bin"
+ #define FIRMWARE_CARRIZO "amdgpu/carrizo_vce.bin"
++#define FIRMWARE_FIJI "amdgpu/fiji_vce.bin"
+
+ #ifdef CONFIG_DRM_AMDGPU_CIK
+ MODULE_FIRMWARE(FIRMWARE_BONAIRE);
+@@ -58,6 +59,7 @@ MODULE_FIRMWARE(FIRMWARE_MULLINS);
+ #endif
+ MODULE_FIRMWARE(FIRMWARE_TONGA);
+ MODULE_FIRMWARE(FIRMWARE_CARRIZO);
++MODULE_FIRMWARE(FIRMWARE_FIJI);
+
+ static void amdgpu_vce_idle_work_handler(struct work_struct *work);
+
+@@ -101,6 +103,9 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
+ case CHIP_CARRIZO:
+ fw_name = FIRMWARE_CARRIZO;
+ break;
++ case CHIP_FIJI:
++ fw_name = FIRMWARE_FIJI;
++ break;
+
+ default:
+ return -EINVAL;
+diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+index 5a5a40c..4349658 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+@@ -205,6 +205,13 @@ 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) {
++ ret = AMDGPU_VCE_HARVEST_VCE1;
++ return ret;
++ }
++
++ /* Tonga and CZ are dual or single pipe */
+ if (adev->flags & AMD_IS_APU)
+ tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
+ VCE_HARVEST_FUSE_MACRO__MASK) >>
+diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
+index 7815ac7..552d9e7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vi.c
++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
+@@ -1223,6 +1223,13 @@ static const struct amdgpu_ip_block_version fiji_ip_blocks[] =
+ .rev = 0,
+ .funcs = &uvd_v6_0_ip_funcs,
+ },
++ {
++ .type = AMD_IP_BLOCK_TYPE_VCE,
++ .major = 3,
++ .minor = 0,
++ .rev = 0,
++ .funcs = &vce_v3_0_ip_funcs,
++ },
+ };
+
+ static const struct amdgpu_ip_block_version cz_ip_blocks[] =
+--
+1.9.1
+