[Bug 111306] gbm creates BO with wrong pitch when dri3_get_modifiers returns modifiers, causing drmModeAddFB2WithModifiers to fail
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Aug 8 13:28:43 UTC 2019
https://bugs.freedesktop.org/show_bug.cgi?id=111306
--- Comment #17 from Hans de Goede <jwrdegoede at fedoraproject.org> ---
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?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20190808/2841a4c6/attachment.html>
More information about the intel-3d-bugs
mailing list