[Mesa-dev] [Mesa-stable] [PATCH] xa: add xa_surface_from_handle2
robdclark at gmail.com
Sat Aug 1 12:35:27 PDT 2015
On Sat, Aug 1, 2015 at 1:16 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 22 July 2015 at 00:00, Rob Clark <robdclark at gmail.com> wrote:
>> From: Rob Clark <robclark at freedesktop.org>
>> Like xa_surface_from_handle(), but takes a handle type, rather than
>> hard-coding 'shared' handle. This is needed to fix bugs seen with
>> xf86-video-freedreno with xrandr rotation, for example. The root issue
>> is that doing a GEM_OPEN ioctl on a bo that already has a GEM handle
>> associated with the drm_file will result in two unique handles for the
>> same bo. Which causes all sorts of follow-on fail.
>> Cc: "10.5 10.6" <mesa-stable at lists.freedesktop.org>
>> Signed-off-by: Rob Clark <robclark at freedesktop.org>
>> Note: it would be good to get this in stable too, since I have a patch
>> for xf86-video-freedreno which will depend on this.
> Bth, I'm not too excited about having new APIs in the stable branch,
> despite them being trivial as this one.
> Regardless it would be nice to get a pair of eyes looking in this direction.
> The patch does exactly what it says on the tin, although I do wonder
> if we should bump XA_TRACKER_VERSION_MINOR ?
well, I guess we can punt on this one.. it seems kind of asymmetrical
to the get_handle API to not support the various different sorts of
handles.. But I still end up running into problems, since I end up
with two different 'fd_device' instances (so two sets of hashtables to
track already-imported-handles/etc) between the ddx code and xa
In the end just using -modesetting+glamor seems like an easier fix..
More information about the mesa-dev