[PATCH v4] drm/amdgpu/vg20:support new UVD FW version naming convention

Michel Dänzer michel at daenzer.net
Thu Jun 14 10:28:00 UTC 2018


Hi James,


On 2018-06-12 05:46 PM, James Zhu wrote:
> Vega20 UVD Firmware has a new version naming convention:
>   [31, 30] for encode interface major
>   [29, 24] for encode interface minor
>   [15, 8] for decode interface minor
>   [7, 0] for hardware family id
> 
> Signed-off-by: James Zhu <James.Zhu at amd.com>

This patch introduced the compiler warnings below.

Assuming adev->uvd.fw_version isn't used for anything with Vega20 and
newer, the best solution might be to move the version_{major,minor}
locals and all code using them into the (adev->asic_type < CHIP_VEGA20)
block created by this patch.


drivers/gpu/drm//amd/amdgpu/amdgpu_uvd.c: In function ‘amdgpu_uvd_sw_init’:
drivers/gpu/drm//amd/amdgpu/amdgpu_uvd.c:237:65: warning: ‘version_minor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  adev->uvd.fw_version = ((version_major << 24) | (version_minor << 16) |
                                                  ~~~~~~~~~~~~~~~^~~~~~
drivers/gpu/drm//amd/amdgpu/amdgpu_uvd.c:234:22: warning: ‘version_major’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      ((version_major == 0x01) && (version_minor >= 0x50)))
       ~~~~~~~~~~~~~~~^~~~~~~~



-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list