From: Sathishkumar S Date: Thu, 13 Apr 2023 06:48:54 +0000 (+0530) Subject: frontends/va: return matching drm format for yuyv pipe format X-Git-Tag: upstream/23.3.3~9610 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5307f6d03ff3d5b0cf96ef838a01d14d39215988;p=platform%2Fupstream%2Fmesa.git frontends/va: return matching drm format for yuyv pipe format return the matching drm format for YUYV pipe format in pipe_format_to_drm_format(), else vlVaExportSurfaceHandle() fails to export a surface handle for YUYV surface. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Part-of: --- diff --git a/src/gallium/frontends/va/surface.c b/src/gallium/frontends/va/surface.c index fe0a196..88e09a6 100644 --- a/src/gallium/frontends/va/surface.c +++ b/src/gallium/frontends/va/surface.c @@ -1473,6 +1473,9 @@ static uint32_t pipe_format_to_drm_format(enum pipe_format format) return DRM_FORMAT_NV12; case PIPE_FORMAT_P010: return DRM_FORMAT_P010; + case PIPE_FORMAT_YUYV: + case PIPE_FORMAT_R8G8_R8B8_UNORM: + return DRM_FORMAT_YUYV; default: return DRM_FORMAT_INVALID; }