[PATCH] radeon: proper DRI2 pending events handling when client gone. (v3)
Oldřich Jedlička
oldium.pro at seznam.cz
Sat Sep 18 11:01:16 PDT 2010
On Saturday 18 September 2010 17:29:56 Christopher James Halse Rogers wrote:
> On Sat, 2010-09-18 at 17:10 +0200, Michel Dänzer wrote:
> > On Sam, 2010-09-18 at 12:03 +0200, Christopher James Halse Rogers
> >
> > wrote:
> > > On Tue, 2010-09-14 at 22:55 +0200, Oldřich Jedlička wrote:
> > > > Properly handle asynchronous DRI2 events for disconnected clients.
> > > > Track client's pending requests and mark them as invalid when the
> > > > client disconnects.
> > > >
> > > > This is based on the version from Alban Browaeys in bug #29065.
> > > >
> > > > v1 (Alban Browaeys): Based upon a detailed explanation from Oldřich
> > > > Jedlička and comments from Christopher James Halse Rogers.
> > > > on
> > > > http://lists.x.org/archives/xorg-driver-ati/2010-August/016780.html
> > > > .
> > > >
> > > > v2: Updated version to apply on master. Removed unnecessary
> > > > client_index field from _DRI2FrameEvent. Added freeing/removing from
> > > > list to failed paths of radeon_dri2_schedule_wait_msc and
> > > > radeon_dri2_schedule_swap.
> > > >
> > > > v3: Adopt to older xorg-server that doesn't have
> > > > dixRegisterPrivateKey. ---
> > > >
> > > > src/radeon_dri2.c | 149
> > > > +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files
> > > > changed, 128 insertions(+), 21 deletions(-)
> > > >
> > > > diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
> > > > index ed7fdd6..054b405 100644
> > > > --- a/src/radeon_dri2.c
> > > > +++ b/src/radeon_dri2.c
> > > > @@ -37,6 +37,7 @@
> > > >
> > > > #include "radeon.h"
> > > > #include "radeon_dri2.h"
> > > > #include "radeon_version.h"
> > > >
> > > > +#include "list.h"
> > >
> > > This header was only introduced in xserver 1.8. I presume that it's
> > > expected that radeon can build against older X servers, so you might
> > > need to conditionally copy this into the DDX.
> >
> > That shouldn't be necessary (for this), as the whole DRI2 swap
> > scheduling support was also only added in 1.8.
>
> Ah, yeah. So the include needs to be conditional on DRI2INFOREC_VERSION
> >= 4 or just xserver version > 1.8, but other than that is ok.
I've looked at versions and the list.h was released with xserver 1.7.99.902,
but the DRI2INFOREC_VERSION=4 is since 1.7.99.901. So I will use the xorg
version, but it will not compile with 1.8 RC1. Is that acceptable?
That would mean
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,99,902, 0)
#include "list.h"
#endif
Oldřich.
More information about the xorg-driver-ati
mailing list