Mesa (staging/21.1): v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 30 17:26:23 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: f5ce440e1b7145e92ba468d731e7176d3a75e036
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5ce440e1b7145e92ba468d731e7176d3a75e036
Author: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
Date: Thu Apr 29 18:47:53 2021 +0200
v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format.
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 <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524>
(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;
More information about the mesa-commit
mailing list