From: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
To: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 10/12] Add glamor back into the driver
Date: Wed, 30 Jul 2014 23:23:05 -0700 [thread overview]
Message-ID: <861tt2dp2u.fsf@hiro.keithp.com> (raw)
In-Reply-To: <8761iedzxh.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2845 bytes --]
Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org> writes:
> Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org> writes:
>
>> This adds glamor support back into the driver, but instad of going
>> through UXA, this uses it directly instead.
>
> This is hard to read with the conditionalizing all of the UXA code in
> the same commit as adding the glamor code. Then there are a bunch of
> unrelated whitespace changes, or flattening of a bunch of nested
> conditionals.
I'm not sure how to make the patch easier to review; I guess I could
make UXA conditional first? That would be 'crazy' in that the driver
would fail to ever work if you didn't ask for UXA, but might make the
patch easier to read?
> The only substantive problem I see is intel_glamor_set_pixmap_bo().
> The extra enum and temporary variable introduced here seems pretty
> pointless (even if that pattern had happened before).
Agreed. The problem is that 'DEFAULT_ACCEL_METHOD' is defined as
'GLAMOR', 'UXA' or 'NONE' by configure.ac. This seemed like the cleanest
solution in some ways. I also liked having the accel_type enum *not*
define acceleration types which weren't compiled into the driver; that
caught a few missing #ifdefs
> I don't think this will work -- glamor_egl uses a different fd from
> intel->bufmgr, so you're attaching some unrelated BO, if you're even
> that lucky.
This API uses the same FD as the intel bufmgr.
From intel_glamor.c:
if (!glamor_egl_init(scrn, intel->drmSubFD)) {
From glamor_egl.c:
Bool
glamor_egl_init(ScrnInfoPtr scrn, int fd)
...
glamor_egl->fd = fd;
...
glamor_egl->has_gem = glamor_egl_check_has_gem(fd);
...
Bool
glamor_egl_create_textured_pixmap(PixmapPtr pixmap, int handle, int stride)
...
if (glamor_egl->has_gem) {
if (!glamor_get_flink_name(glamor_egl->fd, handle, &name)) {
So, you pass in a GEM handle for the intel driver bufmgr and glamor
does the flink to get a global name.
We should be using an FD passing mechanism here instead, to avoid
creating more global names...
> No need to check for initiailization -- double-calling it is safe (as
> long as the size is consistent).
Thanks. Will fix.
>> void
>> @@ -258,18 +240,52 @@ intel_glamor_flush(intel_screen_private * intel)
>> ScreenPtr screen;
>>
>> screen = xf86ScrnToScreen(intel->scrn);
>> - if (intel->uxa_flags & UXA_USE_GLAMOR)
>> - glamor_block_handler(screen);
>> + glamor_block_handler(screen);
>> }
>
> glamor_block_handler() is pretty awfully named. We should do something
> about that.
Suggestions welcome :-)
Thanks for the careful review.
--
keith.packard-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
[-- Attachment #1.2: Type: application/pgp-signature, Size: 810 bytes --]
[-- Attachment #2: Type: text/plain, Size: 219 bytes --]
_______________________________________________
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
next prev parent reply other threads:[~2014-07-31 6:23 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 23:18 [PATCH 00/12] Rework intel 2D driver glamor support Keith Packard
2014-07-24 23:18 ` [PATCH 01/12] Stop trying to out-guess mesa for BO allocation Keith Packard
[not found] ` <1406243908-1123-2-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:28 ` Eric Anholt
2014-07-31 5:45 ` Keith Packard
2014-08-04 16:58 ` Eric Anholt
2014-08-05 5:01 ` Keith Packard
2014-07-24 23:18 ` [PATCH 03/12] Don't use GetScratchPixmapHeader for shadow pixmaps Keith Packard
[not found] ` <1406243908-1123-4-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:33 ` Eric Anholt
2014-07-31 5:49 ` Keith Packard
2014-08-04 16:58 ` Eric Anholt
2014-07-24 23:18 ` [PATCH 04/12] Move intel_alloc_framebuffer to intel_memory.c Keith Packard
2014-07-24 23:18 ` [PATCH 05/12] Rename uxa-specific functions and structs Keith Packard
2014-07-24 23:18 ` [PATCH 06/12] Remove glamor support from UXA acceleration Keith Packard
[not found] ` <1406243908-1123-7-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:42 ` Eric Anholt
2014-07-31 5:52 ` Keith Packard
2014-07-24 23:18 ` [PATCH 09/12] Do more checks for proposed flip pixmaps Keith Packard
[not found] ` <1406243908-1123-10-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:54 ` Eric Anholt
2014-07-31 6:01 ` Keith Packard
2014-07-31 14:43 ` Ville Syrjälä
2014-07-31 15:20 ` Keith Packard
[not found] ` <86a97pd07f.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2014-07-31 16:06 ` [Intel-gfx] " Ville Syrjälä
[not found] ` <1406243908-1123-1-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-24 23:18 ` [PATCH 02/12] Fix present debug output Keith Packard
2014-07-24 23:18 ` [PATCH 07/12] Add intel_flush to abstract flushing pending acceleration operations Keith Packard
[not found] ` <1406243908-1123-8-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:44 ` Eric Anholt
2014-07-24 23:18 ` [PATCH 08/12] Get rid of glamor stubs in intel_glamor.h Keith Packard
[not found] ` <1406243908-1123-9-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 1:47 ` Eric Anholt
2014-07-31 5:53 ` Keith Packard
2014-07-24 23:18 ` [PATCH 10/12] Add glamor back into the driver Keith Packard
[not found] ` <1406243908-1123-11-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-07-31 2:28 ` Eric Anholt
[not found] ` <8761iedzxh.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2014-07-31 6:23 ` Keith Packard [this message]
2014-07-24 23:18 ` [PATCH 11/12] Add "none" acceleration option Keith Packard
2014-07-24 23:18 ` [PATCH 12/12] Delay initial modeset until root window contents are prepared Keith Packard
2014-07-31 2:29 ` [PATCH 00/12] Rework intel 2D driver glamor support Eric Anholt
2014-07-31 6:25 ` Keith Packard
2014-07-31 6:56 ` Keith Packard
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=861tt2dp2u.fsf@hiro.keithp.com \
--to=keithp-an4hjg94kolqt0dzr+alfa@public.gmane.org \
--cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
--cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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