Announcement

Collapse
No announcement yet.

AMD Releases UVD Video Decode Support For R600 GPUs

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by chrisr View Post
    Sorry, that advice is too vague: I have no idea what uses VDPAU/GL interop and what doesn't. Isn't there a simple test case that you could suggest, please?
    "mpv --hwdec=vdpau --vo=opengl" uses interop, "mpv --hwdec=vdpau --vo=vdpau" doesn't.

    Comment


    • XBMC is "simple"?

      Originally posted by agd5f View Post
      xbmc requires it. I'm not sure off hand what other apps use it.
      I'm sure that somewhere there are 5 lines of (kernel?) code that could return "1" if frame-based output is available, and "0" if it isn't.

      Comment


      • Originally posted by chrisr View Post
        I'm sure that somewhere there are 5 lines of (kernel?) code that could return "1" if frame-based output is available, and "0" if it isn't.
        I'm not sure what you are asking. Whether the driver supports field decode or not is determined by the radeon vdpau driver in mesa. This is the relevant mesa patch:
        http://cgit.freedesktop.org/mesa/mes...1d4e227a9eb3d8
        it returns 1 if field based decode is supported or 0 if not. As you can see from the patch it returns 1 if the asic is newer than RV770. And before someone asks, RV790 is just a faster clocked RV770 so it's treated the same as RV770 from a code perspective.

        Comment


        • Originally posted by Mat2 View Post
          Has anybody here (except for the Devs) got it working?
          Working here with HD 2600 XT and HD 4850 using the modified kernel, the UVD firmwares and the latest update from Oibaf. Tested with (s)mplayer and Flash. XBMC made the 2600 crash when I started a movie, the 4850 worked just fine.

          Comment


          • Mixed success with patched 3.16.1 and HD 4890

            I've grabbed the 6 patches from the dri-devel mailing list, and applied them to my 3.16.1 kernel. (They apply without any real difficulty). I've also grabbed the RV770_uvd.bin firmware file and included it in my initramfs.img. The end results are definitely encouraging, but aren't quite there yet:

            Code:
            [    1.903849] [drm] Initialized drm 1.1.0 20060810
            [    2.008012] [drm] radeon kernel modesetting enabled.
            [    2.008341] [drm] initializing kernel modesetting (RV770 0x1002:0x9460 0x1787:0x2281).
            [    2.008347] [drm] register mmio base: 0xFBCE0000
            [    2.008348] [drm] register mmio size: 65536
            [    2.008603] ATOM BIOS: RV790
            [    2.008642] radeon 0000:02:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
            [    2.008643] radeon 0000:02:00.0: GTT: 1024M 0x0000000040000000 - 0x000000007FFFFFFF
            [    2.008644] [drm] Detected VRAM RAM=1024M, BAR=256M
            [    2.008645] [drm] RAM width 256bits DDR
            [    2.008737] [TTM] Zone  kernel: Available graphics memory: 3053474 kiB
            [    2.008738] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
            [    2.008739] [TTM] Initializing pool allocator
            [    2.008764] [TTM] Initializing DMA pool allocator
            [    2.008806] [drm] radeon: 1024M of VRAM memory ready
            [    2.008807] [drm] radeon: 1024M of GTT memory ready.
            [    2.008823] [drm] Loading RV770 Microcode
            [    2.008890] [drm] Internal thermal controller with fan control
            [    2.008961] == power state 0 ==
            [    2.008962] 	ui class: none
            [    2.008963] 	internal class: boot 
            [    2.008964] 	caps: video 
            [    2.008965] 	uvd    vclk: 0 dclk: 0
            [    2.008966] 		power level 0    sclk: 85000 mclk: 97500 vddc: 1313
            [    2.008966] 		power level 1    sclk: 85000 mclk: 97500 vddc: 1313
            [    2.008967] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    2.008968] 	status: c r b 
            [    2.008968] == power state 1 ==
            [    2.008969] 	ui class: performance
            [    2.008970] 	internal class: none
            [    2.008971] 	caps: single_disp video 
            [    2.008971] 	uvd    vclk: 0 dclk: 0
            [    2.008972] 		power level 0    sclk: 50000 mclk: 97500 vddc: 923
            [    2.008973] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    2.008973] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    2.008974] 	status: 
            [    2.008974] == power state 2 ==
            [    2.008975] 	ui class: none
            [    2.008976] 	internal class: uvd 
            [    2.008976] 	caps: video 
            [    2.008977] 	uvd    vclk: 53300 dclk: 40000
            [    2.008977] 		power level 0    sclk: 80000 mclk: 97500 vddc: 1313
            [    2.008978] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    2.008979] 		power level 2    sclk: 80000 mclk: 97500 vddc: 1313
            [    2.008979] 	status: 
            [    2.008980] == power state 3 ==
            [    2.008980] 	ui class: performance
            [    2.008981] 	internal class: none
            [    2.008982] 	caps: video 
            [    2.008982] 	uvd    vclk: 0 dclk: 0
            [    2.008983] 		power level 0    sclk: 60000 mclk: 97500 vddc: 1313
            [    2.008985] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    2.008986] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    2.008986] 	status: 
            [    2.008986] == power state 4 ==
            [    2.008987] 	ui class: none
            [    2.008988] 	internal class: acpi 
            [    2.008988] 	caps: video 
            [    2.008989] 	uvd    vclk: 0 dclk: 0
            [    2.008990] 		power level 0    sclk: 24000 mclk: 97500 vddc: 923
            [    2.008990] 		power level 1    sclk: 24000 mclk: 97500 vddc: 923
            [    2.008991] 		power level 2    sclk: 24000 mclk: 97500 vddc: 923
            [    2.008991] 	status: 
            [    2.012848] [drm] radeon: dpm initialized
            [    2.012893] [drm] GART: num cpu pages 262144, num gpu pages 262144
            [    2.013602] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
            [    2.027946] [drm] PCIE GART of 1024M enabled (table at 0x0000000000257000).
            [    2.027989] radeon 0000:02:00.0: WB enabled
            [    2.027991] radeon 0000:02:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff880035ff0c00
            [    2.027992] radeon 0000:02:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff880035ff0c0c
            [    2.028546] radeon 0000:02:00.0: fence driver on ring 5 use gpu addr 0x0000000000056230 and cpu addr 0xffffc90010416230
            [    2.028547] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
            [    2.028548] [drm] Driver supports precise vblank timestamp query.
            [    2.028561] radeon 0000:02:00.0: irq 54 for MSI/MSI-X
            [    2.028567] radeon 0000:02:00.0: radeon: using MSI.
            [    2.028585] [drm] radeon: irq initialized.
            [    2.075244] [drm] ring test on 0 succeeded in 1 usecs
            [    2.075299] [drm] ring test on 3 succeeded in 1 usecs
            [    3.250836] [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
            [    3.302965] [drm] ring test on 5 succeeded in 1 usecs
            [    3.302968] [drm] UVD initialized successfully.
            [    3.303150] [drm] ib test on ring 0 succeeded in 0 usecs
            [    3.303164] [drm] ib test on ring 3 succeeded in 0 usecs
            [    3.453375] [drm] ib test on ring 5 succeeded
            [    3.456481] [drm] hw_i2c forced on, you may experience display detection problems!
            [    3.463099] [drm] Radeon Display Connectors
            [    3.466021] [drm] Connector 0:
            [    3.467811] [drm]   DVI-I-1
            [    3.469336] [drm]   HPD2
            [    3.470601] [drm]   DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
            [    3.476723] [drm]   Encoders:
            [    3.478422] [drm]     DFP1: INTERNAL_UNIPHY
            [    3.481341] [drm]     CRT2: INTERNAL_KLDSCP_DAC2
            [    3.484692] [drm] Connector 1:
            [    3.486475] [drm]   DIN-1
            [    3.487827] [drm]   Encoders:
            [    3.489525] [drm]     TV1: INTERNAL_KLDSCP_DAC2
            [    3.492791] [drm] Connector 2:
            [    3.494575] [drm]   DVI-I-2
            [    3.496099] [drm]   HPD1
            [    3.497364] [drm]   DDC: 0x7e20 0x7e20 0x7e24 0x7e24 0x7e28 0x7e28 0x7e2c 0x7e2c
            [    3.508823] [drm]   Encoders:
            [    3.510559] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
            [    3.513908] [drm]     DFP2: INTERNAL_KLDSCP_LVTMA
            [    3.517386] switching from power state:
            [    3.519955] 	ui class: none
            [    3.521521] 	internal class: boot 
            [    3.523771] 	caps: video 
            [    3.525209] 	uvd    vclk: 0 dclk: 0
            [    3.527430] 		power level 0    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.532253] 		power level 1    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.537077] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.541901] 	status: c b 
            [    3.543379] switching to power state:
            [    3.545774] 	ui class: performance
            [    3.547946] 	internal class: none
            [    3.550076] 	caps: single_disp video 
            [    3.552599] 	uvd    vclk: 0 dclk: 0
            [    3.554815] 		power level 0    sclk: 50000 mclk: 97500 vddc: 923
            [    3.559555] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    3.564377] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.569202] 	status: r 
            [    3.613841] [drm] fb mappable at 0xD0458000
            [    3.616757] [drm] vram apper at 0xD0000000
            [    3.619588] [drm] size 7299072
            [    3.621372] [drm] fb depth is 24
            [    3.623329] [drm]    pitch is 6912
            [    3.625612] fbcon: radeondrmfb (fb0) is primary device
            [    3.631667] switching from power state:
            [    3.631667] 	ui class: performance
            [    3.631668] 	internal class: none
            [    3.631669] 	caps: single_disp video 
            [    3.631669] 	uvd    vclk: 0 dclk: 0
            [    3.631670] 		power level 0    sclk: 50000 mclk: 97500 vddc: 923
            [    3.631671] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    3.631671] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.631672] 	status: c 
            [    3.631672] switching to power state:
            [    3.631672] 	ui class: performance
            [    3.631673] 	internal class: none
            [    3.631673] 	caps: video 
            [    3.631674] 	uvd    vclk: 0 dclk: 0
            [    3.631674] 		power level 0    sclk: 60000 mclk: 97500 vddc: 1313
            [    3.631675] 		power level 1    sclk: 80000 mclk: 97500 vddc: 1313
            [    3.631675] 		power level 2    sclk: 85000 mclk: 97500 vddc: 1313
            [    3.631676] 	status: r 
            [    3.686987] Console: switching to colour frame buffer device 210x65
            [    3.756883] radeon 0000:02:00.0: fb0: radeondrmfb frame buffer device
            [    3.756884] radeon 0000:02:00.0: registered panic notifier
            [    3.766450] [drm] Initialized radeon 2.39.0 20080528 for 0000:02:00.0 on minor 0
            The output from vdpauinfo is similarly encouraging:
            Code:
            display: :0   screen: 0
            API version: 1
            Information string: G3DVL VDPAU Driver Shared Library version 1.0
            
            Video surface:
            
            name   width height types
            -------------------------------------------
            420     8192  8192  NV12 YV12 
            422     8192  8192  UYVY YUYV 
            444     8192  8192  Y8U8V8A8 V8U8Y8A8 
            
            Decoder capabilities:
            
            name               level macbs width height
            -------------------------------------------
            MPEG1                 0  9216  2048  1152
            MPEG2_SIMPLE          3  9216  2048  1152
            MPEG2_MAIN            3  9216  2048  1152
            H264_BASELINE        41  9216  2048  1152
            H264_MAIN            41  9216  2048  1152
            H264_HIGH            41  9216  2048  1152
            VC1_SIMPLE            1  9216  2048  1152
            VC1_MAIN              2  9216  2048  1152
            VC1_ADVANCED          4  9216  2048  1152
            
            Output surface:
            
            name              width height nat types
            ----------------------------------------------------
            B8G8R8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
            R8G8B8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
            R10G10B10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
            B10G10R10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
            
            Bitmap surface:
            
            name              width height
            ------------------------------
            B8G8R8A8          8192  8192
            R8G8B8A8          8192  8192
            R10G10B10A2       8192  8192
            B10G10R10A2       8192  8192
            A8                8192  8192
            
            Video mixer:
            
            feature name                    sup
            ------------------------------------
            DEINTERLACE_TEMPORAL             -
            DEINTERLACE_TEMPORAL_SPATIAL     -
            INVERSE_TELECINE                 -
            NOISE_REDUCTION                  y
            SHARPNESS                        y
            LUMA_KEY                         -
            HIGH QUALITY SCALING - L1        -
            HIGH QUALITY SCALING - L2        -
            HIGH QUALITY SCALING - L3        -
            HIGH QUALITY SCALING - L4        -
            HIGH QUALITY SCALING - L5        -
            HIGH QUALITY SCALING - L6        -
            HIGH QUALITY SCALING - L7        -
            HIGH QUALITY SCALING - L8        -
            HIGH QUALITY SCALING - L9        -
            
            parameter name                  sup      min      max
            -----------------------------------------------------
            VIDEO_SURFACE_WIDTH              y        48     2048
            VIDEO_SURFACE_HEIGHT             y        48     1152
            CHROMA_TYPE                      y  
            LAYERS                           y         0        4
            
            attribute name                  sup      min      max
            -----------------------------------------------------
            BACKGROUND_COLOR                 y  
            CSC_MATRIX                       y  
            NOISE_REDUCTION_LEVEL            y      0.00     1.00
            SHARPNESS_LEVEL                  y     -1.00     1.00
            LUMA_KEY_MIN_LUMA                y  
            LUMA_KEY_MAX_LUMA                y
            And then there's the playback test...

            The Good News is that both "mpv --hwdec=vdpau --vo=vdpau <file>" and "mpv --hwdec=vdpau --vo=opengl <file>" behave identically ! (I am using Fedora 20's standard Mesa 10.1.5 RPMs here, which work fine with my HD4670 AGP in this same test). In other words:

            Code:
            Trying to use hardware decoding.
            Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
            Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
            AO: [pulse] 48000Hz stereo 2ch float
            VO: [opengl] 1280x544 => 1280x544 vdpau
            AV: 00:00:03 / 00:02:27 (2%) A-V:  0.000
            This suggests to me that the UVD 2.1 block does indeed support field-based output . Unfortunately, the decoding is not quite right. In both cases, (i.e. --vo=vdpau and --vo=opengl) it is as if not all of the horizontal lines that make up the picture are being displayed in the correct order - although the correct image is still discernible through the fuzz.

            But this is still a valiant first attempt!

            Comment


            • @chrisr

              [ 3.250836] [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
              Not sure if that is normal... But why don't you try some agd5f kernel tree, one of them have all patches there. You can better help testing that i think

              Comment


              • Originally posted by dungeon View Post
                @chrisr



                Not sure if that is normal... But why don't you try some agd5f kernel tree, one of them have all patches there. You can better help testing that i think
                Yeah, I think that's ok. I noticed that when Christian first got it working; extending or adding a delay in that function fixed it. I'll see if I can dig up a patch.

                Comment


                • Originally posted by chrisr View Post
                  This suggests to me that the UVD 2.1 block does indeed support field-based output . Unfortunately, the decoding is not quite right. In both cases, (i.e. --vo=vdpau and --vo=opengl) it is as if not all of the horizontal lines that make up the picture are being displayed in the correct order - although the correct image is still discernible through the fuzz.
                  Sorry, to disappoint you, but it appears UVD 2.1 does not support field based decode. I just tested it on my rv770 and it works fine, but only if you apply this mesa patch:
                  http://cgit.freedesktop.org/mesa/mes...1d4e227a9eb3d8
                  The corruption you are seeing is due to the lack of field based decode.

                  Comment


                  • Thanks

                    Thank you to the team at AMD for continuing to support my laptop.

                    Comment


                    • Confused - because the &quot;no interop&quot; case is affected by this.

                      Originally posted by agd5f View Post
                      Sorry, to disappoint you, but it appears UVD 2.1 does not support field based decode. I just tested it on my rv770 and it works fine, but only if you apply this mesa patch:
                      http://cgit.freedesktop.org/mesa/mes...1d4e227a9eb3d8
                      The corruption you are seeing is due to the lack of field based decode.
                      My assumption was based on the fact that I saw identical corruption, regardless of whether I was using VDPAU/OpenGL interop or not...

                      Comment

                      Working...
                      X