mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
amdgpu/uvd: add uvd fw version for amdgpu
commit 562e2689ba upstream.
Was previously always hardcoded to 0.
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
25d1be8d9f
commit
fe98d45db9
@@ -1673,6 +1673,7 @@ struct amdgpu_uvd {
|
|||||||
struct amdgpu_bo *vcpu_bo;
|
struct amdgpu_bo *vcpu_bo;
|
||||||
void *cpu_addr;
|
void *cpu_addr;
|
||||||
uint64_t gpu_addr;
|
uint64_t gpu_addr;
|
||||||
|
unsigned fw_version;
|
||||||
atomic_t handles[AMDGPU_MAX_UVD_HANDLES];
|
atomic_t handles[AMDGPU_MAX_UVD_HANDLES];
|
||||||
struct drm_file *filp[AMDGPU_MAX_UVD_HANDLES];
|
struct drm_file *filp[AMDGPU_MAX_UVD_HANDLES];
|
||||||
struct delayed_work idle_work;
|
struct delayed_work idle_work;
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
|
|||||||
fw_info.feature = adev->vce.fb_version;
|
fw_info.feature = adev->vce.fb_version;
|
||||||
break;
|
break;
|
||||||
case AMDGPU_INFO_FW_UVD:
|
case AMDGPU_INFO_FW_UVD:
|
||||||
fw_info.ver = 0;
|
fw_info.ver = adev->uvd.fw_version;
|
||||||
fw_info.feature = 0;
|
fw_info.feature = 0;
|
||||||
break;
|
break;
|
||||||
case AMDGPU_INFO_FW_GMC:
|
case AMDGPU_INFO_FW_GMC:
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
|
|||||||
DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
|
DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
|
||||||
version_major, version_minor, family_id);
|
version_major, version_minor, family_id);
|
||||||
|
|
||||||
|
adev->uvd.fw_version = ((version_major << 24) | (version_minor << 16) |
|
||||||
|
(family_id << 8));
|
||||||
|
|
||||||
bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8)
|
bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8)
|
||||||
+ AMDGPU_UVD_STACK_SIZE + AMDGPU_UVD_HEAP_SIZE;
|
+ AMDGPU_UVD_STACK_SIZE + AMDGPU_UVD_HEAP_SIZE;
|
||||||
r = amdgpu_bo_create(adev, bo_size, PAGE_SIZE, true,
|
r = amdgpu_bo_create(adev, bo_size, PAGE_SIZE, true,
|
||||||
|
|||||||
Reference in New Issue
Block a user