diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-09-23 17:22:42 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-04 11:16:00 -0400 |
commit | 5eeda8a4813459d6d9bb108ac42b1c8acda50cf9 (patch) | |
tree | 055c34c19153f15a584e0304827cd5958514d6a8 | |
parent | 806c60c2c1d387068dd2b47efdb52aac9a1f75ef (diff) |
drm/amdgpu/vce: add support for hw config packet (v2)
This is needed for proper VCE DPM on some APUs.
v2: fix the asic list
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index 3b03558ddb01..7fe8fd884f06 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -699,6 +699,20 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx) | |||
699 | case 0x05000009: /* clock table */ | 699 | case 0x05000009: /* clock table */ |
700 | break; | 700 | break; |
701 | 701 | ||
702 | case 0x0500000c: /* hw config */ | ||
703 | switch (p->adev->asic_type) { | ||
704 | #ifdef CONFIG_DRM_AMDGPU_CIK | ||
705 | case CHIP_KAVERI: | ||
706 | case CHIP_MULLINS: | ||
707 | #endif | ||
708 | case CHIP_CARRIZO: | ||
709 | break; | ||
710 | default: | ||
711 | r = -EINVAL; | ||
712 | goto out; | ||
713 | } | ||
714 | break; | ||
715 | |||
702 | case 0x03000001: /* encode */ | 716 | case 0x03000001: /* encode */ |
703 | r = amdgpu_vce_cs_reloc(p, ib_idx, idx + 10, idx + 9, | 717 | r = amdgpu_vce_cs_reloc(p, ib_idx, idx + 10, idx + 9, |
704 | *size, 0); | 718 | *size, 0); |