android: Fix num_planes assignment in u_gralloc_fallback

That seems to be an uncaught porting issue from EGL code to a common.

Fixes: ee42e2166d ("android: Introduce the Android buffer info abstraction")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24953>
This commit is contained in:
Roman Stratiienko 2023-08-30 16:53:06 +03:00 committed by Marge Bot
parent c8687a4b09
commit 17f7ffcb36

View file

@ -166,7 +166,6 @@ fallback_gralloc_get_yuv_info(struct u_gralloc *gralloc,
enum chroma_order chroma_order; enum chroma_order chroma_order;
struct android_ycbcr ycbcr; struct android_ycbcr ycbcr;
int drm_fourcc = 0; int drm_fourcc = 0;
int num_planes = 0;
int num_fds = 0; int num_fds = 0;
int fds[3]; int fds[3];
int ret; int ret;
@ -209,7 +208,7 @@ fallback_gralloc_get_yuv_info(struct u_gralloc *gralloc,
out->drm_fourcc = drm_fourcc; out->drm_fourcc = drm_fourcc;
out->modifier = DRM_FORMAT_MOD_INVALID; out->modifier = DRM_FORMAT_MOD_INVALID;
num_planes = ycbcr.chroma_step == 2 ? 2 : 3; out->num_planes = ycbcr.chroma_step == 2 ? 2 : 3;
/* When lock_ycbcr's usage argument contains no SW_READ/WRITE flags /* When lock_ycbcr's usage argument contains no SW_READ/WRITE flags
* it will return the .y/.cb/.cr pointers based on a NULL pointer, * it will return the .y/.cb/.cr pointers based on a NULL pointer,
* so they can be interpreted as offsets. */ * so they can be interpreted as offsets. */