drm/amdgpu: Add kicker device detection
commit 0bbf5fd86c585d437b75003f11365b324360a5d6 upstream. 1. add kicker device list 2. add kicker device checking helper function Signed-off-by: Frank Min <Frank.Min@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 09aa2b408f4ab689c3541d22b0968de0392ee406) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f640d01108
commit
a5d7cc1647
@@ -28,6 +28,10 @@
|
|||||||
#include "amdgpu.h"
|
#include "amdgpu.h"
|
||||||
#include "amdgpu_ucode.h"
|
#include "amdgpu_ucode.h"
|
||||||
|
|
||||||
|
static const struct kicker_device kicker_device_list[] = {
|
||||||
|
{0x744B, 0x00},
|
||||||
|
};
|
||||||
|
|
||||||
static void amdgpu_ucode_print_common_hdr(const struct common_firmware_header *hdr)
|
static void amdgpu_ucode_print_common_hdr(const struct common_firmware_header *hdr)
|
||||||
{
|
{
|
||||||
DRM_DEBUG("size_bytes: %u\n", le32_to_cpu(hdr->size_bytes));
|
DRM_DEBUG("size_bytes: %u\n", le32_to_cpu(hdr->size_bytes));
|
||||||
@@ -1268,6 +1272,19 @@ static const char *amdgpu_ucode_legacy_naming(struct amdgpu_device *adev, int bl
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool amdgpu_is_kicker_fw(struct amdgpu_device *adev)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(kicker_device_list); i++) {
|
||||||
|
if (adev->pdev->device == kicker_device_list[i].device &&
|
||||||
|
adev->pdev->revision == kicker_device_list[i].revision)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type, char *ucode_prefix, int len)
|
void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type, char *ucode_prefix, int len)
|
||||||
{
|
{
|
||||||
int maj, min, rev;
|
int maj, min, rev;
|
||||||
|
@@ -536,6 +536,11 @@ struct amdgpu_firmware {
|
|||||||
uint64_t fw_buf_mc;
|
uint64_t fw_buf_mc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct kicker_device{
|
||||||
|
unsigned short device;
|
||||||
|
u8 revision;
|
||||||
|
};
|
||||||
|
|
||||||
void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_imu_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_imu_hdr(const struct common_firmware_header *hdr);
|
||||||
@@ -562,5 +567,6 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type);
|
|||||||
const char *amdgpu_ucode_name(enum AMDGPU_UCODE_ID ucode_id);
|
const char *amdgpu_ucode_name(enum AMDGPU_UCODE_ID ucode_id);
|
||||||
|
|
||||||
void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type, char *ucode_prefix, int len);
|
void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type, char *ucode_prefix, int len);
|
||||||
|
bool amdgpu_is_kicker_fw(struct amdgpu_device *adev);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user