radeonsi: get enc/dec caps from kernel only on amdgpu

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Leo Liu <leo.liu@amd.com>

Change-Id: I6f8c6799bb331c42aa1526b8f1eeb0473e5d756e
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27283>
This commit is contained in:
Andres Calderon Jaramillo
2024-01-24 19:07:50 +00:00
committed by Marge Bot
parent 7c2ff46a4f
commit e44e57b4e7

View File

@@ -19,7 +19,8 @@
/* The capabilities reported by the kernel has priority
over the existing logic in si_get_video_param */
#define QUERYABLE_KERNEL (!!(sscreen->info.drm_minor >= 41))
#define QUERYABLE_KERNEL (sscreen->info.is_amdgpu && \
!!(sscreen->info.drm_minor >= 41))
#define KERNEL_DEC_CAP(codec, attrib) \
(codec > PIPE_VIDEO_FORMAT_UNKNOWN && codec <= PIPE_VIDEO_FORMAT_AV1) ? \
(sscreen->info.dec_caps.codec_info[codec - 1].valid ? \