From f5ce440e1b7145e92ba468d731e7176d3a75e036 Mon Sep 17 00:00:00 2001 From: Jose Maria Casanova Crespo Date: Thu, 29 Apr 2021 18:47:53 +0200 Subject: [PATCH] v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were exposing as available DRM_FORMAT_MOD_BROADCOM_SAND128 for any format. Fixes: 95c4f0f91098 "v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support" Reviewed-by: Alejandro PiƱeiro Part-of: (cherry picked from commit 5a503727f24e3ccde49eab97b9bfbfb9cff79d1f) --- .pick_status.json | 2 +- src/gallium/drivers/v3d/v3d_screen.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 48f235ee6ca..a32e9aa36a8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -229,7 +229,7 @@ "description": "v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "95c4f0f91098a0da5a8e8ec76cb38f2c95bafe1c" }, diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index a8742962b82..3227817cf63 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -651,6 +651,10 @@ v3d_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen, int i; int num_modifiers = ARRAY_SIZE(v3d_available_modifiers); + /* Expose DRM_FORMAT_MOD_BROADCOM_SAND128 only for PIPE_FORMAT_NV12 */ + if (format != PIPE_FORMAT_NV12) + num_modifiers--; + if (!modifiers) { *count = num_modifiers; return;