Dave Airlie
146adbd2f4
radv/video: drop incorrect defines for uapi ones.
...
I missed there's an off by one, and found the kernel defined
the correct bits, so just use that.
Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23757 >
2023-06-21 05:28:01 +00:00
Eric Engestrom
8b319c6db8
radv: reformat according to its .clang-format
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23253 >
2023-06-16 19:59:52 +00:00
Lynne
5ce784e5c9
radv/video: reject unsupported hevc profiles and bit depths
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23625 >
2023-06-14 03:59:40 +00:00
Lynne
d7d0ccdc51
radv/video: reject non-8bit H264
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23625 >
2023-06-14 03:59:40 +00:00
Lynne
758e6a8f2f
radv/video: reject general unsupported video formats
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23625 >
2023-06-14 03:59:40 +00:00
Dave Airlie
e816c10638
radv/video: program hevc max dec pic buffering correctly
...
This programs it like vaapi does.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23613 >
2023-06-14 00:37:05 +00:00
Dave Airlie
ff4e9fa2d5
radv/video: program frame number correctly.
...
doesn't appear to fix anything, but is more correct.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23613 >
2023-06-14 00:37:05 +00:00
Dave Airlie
085f6ec6eb
radv/video: fix hevc scaling list order.
...
pps takes priority.
Fixes: da54b57888 ("radv/video: fix hevc scaling lists.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23537 >
2023-06-09 03:22:43 +00:00
Dave Airlie
4cc86e4ea9
radv/video: report bad profile operation if h264 profile isn't supported.
...
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23537 >
2023-06-09 03:22:43 +00:00
Dave Airlie
da54b57888
radv/video: fix hevc scaling lists.
...
These need some zscan conversion, that I've taken from vaapi.
v2: move to common code for it_ptr updates, add defines
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
3f12103be9
radv/video: fix hevc st rps programming
...
These needs to be programmed to fix some video glitches.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
f0597a1514
radv/video: rework h265 reference frame bindings.
...
This reworks the ref frame bindings and allows dropping the tier_2 workaround.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
b8191cd603
radv/video: don't supply an 8-bit format for a 10-bit dpb.
...
The firmware can write an 8-bit output buffer, but still needs
a 10-bit dpb allocation.
This also puts the 8-bit format after the 10-bit format though
apps should be smart enough to pick the correct one.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
b2e1e17ff6
radv/video: convert session memory requirements to outarray.
...
These are just standard outarray so use the common code.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
28f2a6b281
radv/video: convert video format properties to an outarray
...
These are just standard outarray so use the common code.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476 >
2023-06-08 05:34:06 +00:00
Dave Airlie
b9d208bd1f
radv/video: fix physical device format property count.
...
This was returning bad values
Fixes: db62c38091 ("radv: add vcn h265 decode.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
1a2a330483
radv/video: add debug flag to enable dpb image array on newer GPUs.
...
This is useful to test the paths on newer GPUs that work on older GPUs.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
04c28c9fba
radv/video: fix some whitespace.
...
this just removes some TABs.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
e2fa6ec73b
radv/video: rework stream handle generation.
...
This shouldn't change anything, except move some calcs to an
earlier spot to avoid redoing them
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
cf1bd0f364
radv/video: add missing offset to the dpb binding.
...
This doesn't affect anything I've seen yet.
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
b5963fc1f0
radv/video: fix h264/265 dpb usage.
...
This seems to be the best compromise I can come up with so far.
I can't figure out to get the tier2 programming to match between
264 and 265, maybe they are just programmed different here, good
old firmware.
Fixes: 1693c03a39 ("radv/video: add initial h264 decoder for VCN")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
ea2eade57b
radv/video: use correct h264 levels
...
This should be set to the enum, ffmpeg has it wrong so far, but the sample decoder has it right.
convert radv to the proper answer.
Fixes: 1693c03a39 ("radv/video: add initial h264 decoder for VCN")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23225 >
2023-05-25 03:04:04 +00:00
Dave Airlie
f4aa99f0da
radv/video: add missing space checks for video.
...
Fixes: 7893040f80 ("radv: Add stricter space checks.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23158 >
2023-05-24 07:21:40 +00:00
Timur Kristóf
b6f623d387
radv: Use const keyword more.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23053 >
2023-05-18 14:30:45 +00:00
Dave Airlie
d8f3060bd9
radv/video: start adding gfx11 vcn decoder
...
On gfx11 the vcn decoder moved into the vcn encoder ring,
now known as the unified vcn ring.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
89df5976f8
radv/video: fix dpb surface programming
...
This just programs the dpb fields directly from the image surface.
Makes things happier on navi33
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
6b75c365a8
radv/video: add a video addr gfx mode
...
This will be different on gfx11+ so add a settable field for it
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
2fdf75dadf
radv: set a video decode ip block in physical device.
...
This makes it easier to add navi 3x
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
d8262e26a2
radv/video: add missing gfx family
...
This is compatible with rdna2 but was just missing.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Dave Airlie
17d19a3c07
radv/video: fix h265 decoding sizes.
...
Fixes the misrendering/hangs on hevc content.
Fixes: 6c3c242361 ("radv/video: add h265 decode UVD support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671 >
2023-03-15 05:08:49 +00:00
Dave Airlie
67a606c611
radv/video: fix used for reference flags.
...
These weren't getting programmed properly for interlaced videos
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671 >
2023-03-15 05:08:49 +00:00
Dave Airlie
30ccf31aae
radv/video: fix h264 frame heights when field images are in use
...
This was breaking MBAFF decoding.
Fixes: 8a29291dbe ("radv/video: add h264 support for uvd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671 >
2023-03-15 05:08:49 +00:00
Dave Airlie
3e2c768aa8
radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+
...
navi21 can do separate image support, using tier 2 DPB messages.
This enables support for doing that in the vulkan video driver.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:48:28 +10:00
Dave Airlie
6c3c242361
radv/video: add h265 decode UVD support
...
Add support for h265 decode on older UVD GPUs
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:48:26 +10:00
Dave Airlie
db62c38091
radv: add vcn h265 decode.
...
This adds support for HEVC decode in VCN
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:48:24 +10:00
Dave Airlie
8a29291dbe
radv/video: add h264 support for uvd
...
This adds support for the older UVD h264 decoder.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:48:22 +10:00
Dave Airlie
1693c03a39
radv/video: add initial h264 decoder for VCN
...
This adds support for H264 decode on VCN hardware.
It uses the full DPB method, and relies on the application
to allocate an arrayed texture for the DPB to be stored into.
RADV_PERFTEST=video_decode is required to enable this.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:53 +10:00
Dave Airlie
9477f117f4
radv/video: add initial frameworking.
...
This just adds the basic commands and objects, and hooks up some
of the queues and extensions.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:50 +10:00
Dave Airlie
3253340916
radv: add video decoder register setup.
...
This just assigns the correct registers depending on the gpu family.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:48 +10:00