[PATCH 0/1] [rfc] Port UVD from radeon for SI

Trevor Davenport trevor.davenport at gmail.com
Fri Sep 1 15:30:07 UTC 2017


Here is my attempt at porting UVD from radeon to amdgpu for SI devices.

First, this in no way works. I started with UVD for CIK and have worked
backwards to arrive at this place.  I've gone back over most things from
radeon and most of it looks correct as far as I can see. It currently loads
the UVD firmware but fails the first initial ring test.  It was a bit
unclear to me how/when CIK calls uvd_4_2_start and I don't have the
hardware to test myself on CIK.  Radeon was calling uvd_v1_0_start before 
the ring test but calling uvd_v3_1_start before the ring test results in
it failing to start after trying to reset.  Any ideas on what could be
wrong would be greatly appreciated.

This does require a new firmware file.  Since amdgpu expects only
firmware files with the header I have added one to the existing
TAHITI_uvd.bin.  I verified that my header was correct by adding the new
firmware to radeon and verified UVD initializes correctly with it.  I
have uploaded a copy to my google drive if anyone wants it.  See link
below.

I'm testing on pitcairn device (R9 270X).  Any feedback welcome.  I
don't know if I will be able to do much more since there isn't open
any documentation for this besides the radeon but I'll likely keep
poking at it a bit longer.

You can find it on my github brance amdgpu-si-uvd.
https://github.com/tdaven/linux-amdgpu

tahiti_uvd.bin (should be places in /lib/firmware/radeon).
https://drive.google.com/file/d/0B9a9RNUDRbKFZU5Hd0VseUhKaGc/view?usp=sharing


Trevor Davenport (1):
  drm/amdgpu/uvd3: Initial port of UVD from radeon for SI.

 drivers/gpu/drm/amd/amdgpu/Makefile                |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c            |  14 +
 drivers/gpu/drm/amd/amdgpu/si.c                    | 256 ++++++-
 drivers/gpu/drm/amd/amdgpu/si_ih.c                 |   6 +
 drivers/gpu/drm/amd/amdgpu/sid.h                   |  45 +-
 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c              | 832 +++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.h              |  29 +
 .../gpu/drm/amd/include/asic_reg/uvd/uvd_3_1_d.h   |  91 +++
 .../drm/amd/include/asic_reg/uvd/uvd_3_1_sh_mask.h |  65 ++
 9 files changed, 1290 insertions(+), 51 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_3_1_d.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_3_1_sh_mask.h

-- 
2.13.5



More information about the amd-gfx mailing list