Hi,

hope here is the right place for this - my first post.

What happened: I build all images cross with Openembedded/Yocto. To
prepare next release there I updated my builds and that moved mesa
17.1.7 -> 17.3.7. Since then all applications using GL/GLES (e.g
glmark2-es - tried others - same) complain with

| Modifier 0x0 vs. tiling (0x700000000000001) mismatch

and drawable region remains black.
There was some discussion on meta-raspberrypi mailing list and it
seems to happen to others too [1].

I've attached a patch. That fixes glmark2-es and many others but e.g
on KDE desktop mouse pointer is just pixel dust so I think that my
(naive) approach only works around an issue caused somewhere else. To
ne honest my background understanding is poor but it seems that
modifier gets not properly for all cases.

[1] https://lists.yoctoproject.org/pipermail/yocto/2018-March/040587.html

If further information is required, please let me know.

Regards

Andreas
From 5012db89d3704d383e455376922bd45f45b5683f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzelt...@gmail.com>
Date: Thu, 29 Mar 2018 22:18:25 +0200
Subject: [PATCH] VC4: Do not error out when linear modifier is requested but
 kernel supports tiling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes:
| Modifier 0x0 vs. tiling (0x700000000000001) mismatch

and black screen for glmark2

Tested withj mesa 17.3.7

Signed-off-by: Andreas Müller <schnitzelt...@gmail.com>
---
 src/gallium/drivers/vc4/vc4_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index cdcbcc917e..472e6dd618 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -742,6 +742,9 @@ vc4_resource_from_handle(struct pipe_screen *pscreen,
                 whandle->modifier = DRM_FORMAT_MOD_LINEAR;
         } else if (whandle->modifier == DRM_FORMAT_MOD_INVALID) {
                 whandle->modifier = get_tiling.modifier;
+        } else if (whandle->modifier == DRM_FORMAT_MOD_LINEAR && 
+                   get_tiling.modifier == DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED) {
+                whandle->modifier = get_tiling.modifier;
         } else if (whandle->modifier != get_tiling.modifier) {
                 fprintf(stderr,
                         "Modifier 0x%llx vs. tiling (0x%llx) mismatch\n",
-- 
2.14.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to