On 2018-06-07 03:10 AM, Christian König wrote: > Am 06.06.2018 um 20:59 schrieb James Zhu: >> Vega20 UVD Firmware has a new version naming convention: >>   [31, 30] for encode interface major >>   [29, 24] for encode interface minor >>   [15, 8] for firmware revision >>   [7, 0] for hardware family id >> Inside kernel log UVD firmware Version: 1.1.2 (denote >> major.minor.revision) >> >> Signed-off-by: James Zhu <James.Zhu at amd.com> >> --- >>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 19 +++++++++++++++---- >>  1 file changed, 15 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> index bcf68f8..575aff1b 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> @@ -208,10 +208,21 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev) >>       hdr = (const struct common_firmware_header *)adev->uvd.fw->data; >>      family_id = le32_to_cpu(hdr->ucode_version) & 0xff; >> -   version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff; >> -   version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff; >> -   DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n", >> -       version_major, version_minor, family_id); >> + >> +   if (adev->asic_type != CHIP_VEGA20) { > > I think it would be better to use "< CHIP_VEGA20" here. > > Apart from that looks good to me, but Leo should have the last word. > > Thanks, > Christian. Sure. James >> +       version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff; >> +       version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff; >> +       DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: >> %hu\n", >> +           version_major, version_minor, family_id); >> +   } else { >> +       unsigned int fw_rev; >> + >> +       fw_rev = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff; >> +       version_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f; >> +       version_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3; >> +       DRM_INFO("Found UVD firmware Version: %hu.%hu.%hu Family ID: >> %hu\n", >> +           version_major, version_minor, fw_rev, family_id); >> +   } >>       /* >>       * Limit the number of UVD handles depending on microcode major > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx