From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 108487] Wayland compositors are unable to use hardware acceleration on i915
Date: Sat, 27 Apr 2019 23:33:53 +0000 [thread overview]
Message-ID: <bug-108487-502-oIa1gBY8Or@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-108487-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 2616 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=108487
--- Comment #17 from Alex Villacís Lasso <alexvillacislasso@hotmail.com> ---
I see the exact same issue on my machine when trying weston. This bug is very
similar to one I had a hand in working around in mutter:
https://gitlab.gnome.org/GNOME/mutter/issues/127 . The mutter workaround
essentially tries calling gbm_bo_get_handle_for_plane() on plane 0 of the bo,
sees if the call succeeded, and if not, falls back on calling
gbm_bo_get_handle() while storing DRM_FORMAT_MOD_INVALID, which in turn causes
the subsequent code to call drmModeAddFB[2]() instead of the unsupported
drmModeAddFB2WithModifiers().
This should really be fixed in mesa. Quoting myself from the mutter bug report:
----- BEGIN QUOTE -----
@daniels I think I found the cause why mesa code fails the
gbm_bo_get_handle_for_plane call with the i915 driver. However, it is not clear
to me whether it is an actual bug, or just the code "working" as designed.
The gbm_bo_get_handle_for_plane implementation was introduced by commit
f9567ab435217a72cbae628336ead84dc0b2a803 (gbm: Export a getter for per plane
handles). This implementation contains the following check, which remains to
this day:
if (!dri->image || dri->image->base.version < 13 || !dri->image->fromPlanar)
{
errno = ENOSYS;
return ret;
}
One of the conditions for the call is that the base.version member is 13 or
above. This member (dri->image) is a __DRIimageExtension *, according to
src/gbm/backends/dri/gbm_driint.h in the Mesa code.
There are several DRI drivers that define a static __DRIimageExtension with
type __DRI_IMAGE, along with an API version. In the case of i965
(src/mesa/drivers/dri/i965/intel_screen.c), the api is at version 16. However,
in the case of i915 (src/mesa/drivers/dri/i915/intel_screen.c) the api is at
version 7.
At first sight, it looks as though the version check in the initial commit is
too restrictive. According to include/GL/internal/dri_interface.h in the Mesa
code, the fromPlanar member of __DRIimage should be available since __DRI_IMAGE
API version 5. However, the commit does not include comments on why version 13
is the minimum required for fetching the plane handle. Again, according to
include/GL/internal/dri_interface.h, the one property that requires 13 as a
minimum is __DRI_IMAGE_ATTRIB_OFFSET. So maybe the code assumes that whoever
calls gbm_bo_get_handle_for_plane will also fetch the offset.
----- END QUOTE -----
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3552 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-04-27 23:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 17:51 [Bug 108487] Wayland compositors are unable to use hardware acceleration on i915 bugzilla-daemon
2018-10-19 13:18 ` [Bug 108487] Wayland compositors are unable to use hardware acceleration on i915: missing EGL_ANDROID_native_fence_sync extension bugzilla-daemon
2018-10-19 13:56 ` bugzilla-daemon
2018-10-19 14:02 ` bugzilla-daemon
2018-10-19 14:10 ` bugzilla-daemon
2018-10-19 17:00 ` bugzilla-daemon
2018-10-19 17:12 ` bugzilla-daemon
2018-10-29 10:56 ` [Bug 108487] Wayland compositors are unable to use hardware acceleration on i915 bugzilla-daemon
2018-10-29 10:57 ` bugzilla-daemon
2018-12-04 6:46 ` bugzilla-daemon
2018-12-04 6:59 ` bugzilla-daemon
2018-12-04 11:13 ` bugzilla-daemon
2018-12-04 13:23 ` bugzilla-daemon
2018-12-05 19:47 ` bugzilla-daemon
2018-12-10 8:36 ` bugzilla-daemon
2019-01-31 3:02 ` bugzilla-daemon
2019-01-31 18:25 ` bugzilla-daemon
2019-03-09 14:18 ` bugzilla-daemon
2019-03-09 14:21 ` bugzilla-daemon
2019-04-27 23:33 ` bugzilla-daemon [this message]
2019-05-13 2:23 ` bugzilla-daemon
2019-05-16 14:14 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-108487-502-oIa1gBY8Or@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).