I've made some progress in debugging the mpv error...
I introduced some additional debug display instructions into the mpv source code, so I could see what was actually happening. And here is the new log:
[vd] Codec list:
[vd] hevc - HEVC (High Efficiency Video Coding)
[vd] hevc_rkmpp (hevc) - Rockchip MPP (Media Process Platform) HEVC decoder
[vd] hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc_rkmpp-rkmpp...
ctx->hwdec_devs = 0xffff64347e20
[vo/gpu] Loading hwdec drivers for format: 'drm_prime'
[vo/gpu] Loading hwdec driver 'drmprime'
[vo/gpu/drmprime] Using EGL dmabuf interop via GL_EXT_EGL_image_storage
[vo/gpu/drmprime] Using DRM device: /dev/dri/renderD128
[vo/gpu/drmprime] ADDING DRMPRIME DEVICE
[vo/gpu/drmprime] hw->devs=0xffff64347e20
[vo/gpu/drmprime] av_device_ref=0xffff64348860
ADD: ctx=0xffff6434af60 hw_imgfmt=1057 type=8 av_device_ref=0xffff64348860
num_hwctxs=1
[vo/gpu/drmprime] DEVICE ADDED
[vo/gpu] Loading hwdec driver 'drmprime-overlay'
[vo/gpu/drmprime-overlay] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
Searching: hw_imgfmt=1057 device_type=12 (rkmpp) num_hwctxs=1
ENTRY 0: ctx=0xffff6434af60 av_device_ref=0xffff64348860 hw_imgfmt=1057 type=8 (drm)
hw_ctx = (nil)
[vd] Could not create device.
[vd] Using software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Selected decoder: hevc - HEVC (High Efficiency Video Coding)
[vd] DR parameter change to 1920x1088 yuv420p align=64
[vd] Allocating new (host-cached) DR image...
[vo/gpu] DR path suspected slow/uncached, disabling.
[vd] ...failed..
[vd] DR failed - disabling.
[vd] Using software decoding.
[vd] Decoder format: 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 crop=1920x1080+0+0 A=none
[vd] Using container aspect ratio.
[vo/gpu] reconfig to 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1920x1080+0+0 A=none
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] max content size: 1024x600
[vo/gpu] monitor size: 1024x600
The result says exactly this:
VO (drmprime): add a DRM type device
Decoder (rkmpp): look for an RKMPP type device
=> can't find it
=> hw_ctx = NULL
=> Could not create device
=> decoding software
More precisely: ADD: hw_imgfmt = 1057 type = DRM
and immediately after: Searching: hw_imgfmt = 1057 device_type = RKMPP
So the problem is not: The MPP, FFmpeg, mpv does not create hwdec_devs, drmprime driver
The problem is that the two components are not talking about the same type of device.
Actually, that tells me something else very important:
hwdec_drmprime.c from mpv was written for decoders using: Vape, V4L2, other DRM backends
It creates AVHWDeviceType = DRM, instead, FFmpeg's hevc_rkmpp is a new decoder, which expects AVHWDeviceType = RKMPP. These two pieces of code were not made for each other.
That also explains why the decoder exists... I have hevc_rkmpp, but mpv knows absolutely nothing about RKMPP. mpv only knows: drmprime and drmprime creates a DRM device.
My logical conclusion is that the official MPV is not suitable for the rkmpp hardware (it doesn't know about its existence). So what to do ? Where do I get a suitable MPV ?