Commit bc8ba5f2 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: return an error if query_video_caps is not set

Should only be an issue for bring up when the function
pointer is not set, but check it anyway to be safe.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 95de7f26
......@@ -1102,6 +1102,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
struct drm_amdgpu_info_video_caps *caps;
int r;
if (!adev->asic_funcs->query_video_codecs)
return -EINVAL;
switch (info->video_cap.type) {
case AMDGPU_INFO_VIDEO_CAPS_DECODE:
r = amdgpu_asic_query_video_codecs(adev, false, &codecs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment