<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - gbm creates BO with wrong pitch when dri3_get_modifiers returns modifiers, causing drmModeAddFB2WithModifiers to fail"
href="https://bugs.freedesktop.org/show_bug.cgi?id=111306#c17">Comment # 17</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - gbm creates BO with wrong pitch when dri3_get_modifiers returns modifiers, causing drmModeAddFB2WithModifiers to fail"
href="https://bugs.freedesktop.org/show_bug.cgi?id=111306">bug 111306</a>
from <span class="vcard"><a class="email" href="mailto:jwrdegoede@fedoraproject.org" title="Hans de Goede <jwrdegoede@fedoraproject.org>"> <span class="fn">Hans de Goede</span></a>
</span></b>
<pre>That function builds a mapping from formats to supported-modifiers for each
format.
I've added the following debug:
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index e0d7cfb5c..249661985 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2004,6 +2004,9 @@ populate_format_modifiers(xf86CrtcPtr crtc, const
drmModePlane *kplane,
for (j = 0; j < fmt_mod_blob->count_modifiers; j++) {
struct drm_format_modifier *mod = &blob_modifiers[j];
+ if (mod->modifier == I915_FORMAT_MOD_Y_TILED_CCS)
+ ErrorF("populate_format_modifiers i %d format %x formats
%llx\n", i, blob_formats[i], mod->formats);
+
if ((i < mod->offset) || (i > mod->offset + 63))
continue;
if (!(mod->formats & (1 << (i - mod->offset))))
Which for me generates:
[ 3860.889] populate_format_modifiers i 0 format 20203843 formats 3c
[ 3860.889] populate_format_modifiers i 1 format 36314752 formats 3c
[ 3860.889] populate_format_modifiers i 2 format 34325258 formats 3c
[ 3860.889] populate_format_modifiers i 3 format 34324258 formats 3c
[ 3860.889] populate_format_modifiers i 4 format 34325241 formats 3c
[ 3860.889] populate_format_modifiers i 5 format 34324241 formats 3c
[ 3860.889] populate_format_modifiers i 6 format 30335258 formats 3c
[ 3860.889] populate_format_modifiers i 7 format 30334258 formats 3c
[ 3860.889] populate_format_modifiers i 8 format 56595559 formats 3c
[ 3860.889] populate_format_modifiers i 9 format 55595659 formats 3c
[ 3860.889] populate_format_modifiers i 10 format 59565955 formats 3c
[ 3860.889] populate_format_modifiers i 11 format 59555956 formats 3c
Note mod->offset always is 0 for me, I had that in the debug before but I
dropped it.
IOW for formats 2-5 in the format list part of the retreived blob, the
I915_FORMAT_MOD_Y_TILED_CCS modifier is supported.
Notice that those 4 formats are:
DRM_FORMAT_XRGB8888 (XR24)
DRM_FORMAT_XBGR8888 (XB24)
DRM_FORMAT_ARGB8888 (AR24)
DRM_FORMAT_ABGR8888 (AB24)
So the fb ending up in one of these seems reasonable.
I guess that for some reason the blob property describing the possible
modifiers on the CRTC uses in your case is different.
Are you using a skylake GPU? Perhaps things are different for you because you
are using a (e)DP monitor/panel instead of the HDMI monitors I'm using?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>