Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-31 Thread Michel Dänzer
On Sam, 2010-10-30 at 12:36 -0700, Keith Packard wrote: 
> On Sat, 30 Oct 2010 18:07:19 +0200, Michel Dänzer  wrote:
> 
> > Right, but as long as there's at least one rendering operation in
> > between, at that point EXA will synchronize the pixmap copies according
> > to the accumulated pending damage. That's the assumption broken by your
> > change.
> 
> Eric's patch just catches a few non-rendering paths where post-op damage
> would not generate Damage events, as DamageRegionProcessPending would
> never have been invoked. For all rendering paths, it changes nothing [...]

I know, as I said, the problem is when there's *no* rendering operation
between DamageRegionAppend and DamageRegionProcessPending. (IIRC the
problem I mentioned with starting compiz from a naked xterm was due to
ProcDamageCreate called by compiz)


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-30 Thread Keith Packard
On Sat, 30 Oct 2010 18:07:19 +0200, Michel Dänzer  wrote:

> Right, but as long as there's at least one rendering operation in
> between, at that point EXA will synchronize the pixmap copies according
> to the accumulated pending damage. That's the assumption broken by your
> change.

Eric's patch just catches a few non-rendering paths where post-op damage
would not generate Damage events, as DamageRegionProcessPending would
never have been invoked. For all rendering paths, it changes nothing
(the change in EXA simply calls DamageDamageRegion instead of the
equivalent in-line sequence of DamageRegionAppend followed by
DamageRegionProcessPending).

-- 
keith.pack...@intel.com


pgprXdQCuUzc3.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-30 Thread Michel Dänzer
On Fre, 2010-10-29 at 12:21 -0700, Eric Anholt wrote: 
> On Fri, 29 Oct 2010 10:46:00 +0200, Michel Dänzer  wrote:
> > On Don, 2010-10-28 at 20:46 -0700, Eric Anholt wrote: 
> > > In all these cases, any rendering implied by this damage has already
> > > occurred, and we want to get the damage out to the client.  Some of
> > > the DamageRegionAppend calls were explicitly telling damage to flush
> > > the reportAfter damage out, but not all.
> > 
> > I haven't been able to confirm it on some quick tests, but I suspect
> > this will break EXA in some cases, as it assumes that between a
> > DamageRegionAppend/DamageRegionProcessPending call pair the
> > corresponding region will be modified by a rendering operation and will
> > thus be valid in the current copy of the pixmap contents and invalid in
> > the other copy.
> > 
> > Maybe what's needed here is some other mechanism for specifying a region
> > that is not related to actual rendering but only to be reported to
> > clients via the DAMAGE extension for informational purposes.
> > 
> > FWIW, the test that prompted me to split up damage processing into two
> > steps was starting compiz in an xterm on an otherwise 'naked' X server.
> > The xterm window borders (the parts between the decoration and the
> > actual terminal contents) would previously be corrupted. I suspect this
> > change will reintroduce that problem with the EXA 'classic' scheme at
> > least.

[...]

> Without this change, you'll still get the "pending" damage reported at
> some later date when other damage occurs to the pixmap that triggers a
> processing of pending damage, completely disconnected from when the
> rendering occurred, if any was involved.

Right, but as long as there's at least one rendering operation in
between, at that point EXA will synchronize the pixmap copies according
to the accumulated pending damage. That's the assumption broken by your
change.

Though I agree some of the cases you're changing may not have been 100%
correct before, and introducing another mechanism for handling damage
not directly related to rendering should fix that (and as a bonus avoid
superfluous synchronization between EXA's pixmap copies). So I still
think that would be the proper solution.


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-29 Thread Eric Anholt
On Fri, 29 Oct 2010 10:46:00 +0200, Michel Dänzer  wrote:
> On Don, 2010-10-28 at 20:46 -0700, Eric Anholt wrote: 
> > In all these cases, any rendering implied by this damage has already
> > occurred, and we want to get the damage out to the client.  Some of
> > the DamageRegionAppend calls were explicitly telling damage to flush
> > the reportAfter damage out, but not all.
> 
> I haven't been able to confirm it on some quick tests, but I suspect
> this will break EXA in some cases, as it assumes that between a
> DamageRegionAppend/DamageRegionProcessPending call pair the
> corresponding region will be modified by a rendering operation and will
> thus be valid in the current copy of the pixmap contents and invalid in
> the other copy.
> 
> Maybe what's needed here is some other mechanism for specifying a region
> that is not related to actual rendering but only to be reported to
> clients via the DAMAGE extension for informational purposes.
> 
> FWIW, the test that prompted me to split up damage processing into two
> steps was starting compiz in an xterm on an otherwise 'naked' X server.
> The xterm window borders (the parts between the decoration and the
> actual terminal contents) would previously be corrupted. I suspect this
> change will reintroduce that problem with the EXA 'classic' scheme at
> least.

Breakdown of the actual changed locations here:

compalloc.c:
notification to trigger recomposite on transition to
automatic compositing.

compwindow.c:
1) client notification of damage after optimized-out noop
internal rendering (introduced with original import of
composite, I'm not clear on why it's needed)
2) client notification of damage to trigger a redraw.

damageext.c:
1) client notification of full damage in new damage struct on a
window to trigger a redraw
2) adding damage to a drawable *for direct rendering that has
already occurred*

exa.c:
Noop, replacing two function calls with the right one.

glxdri:
Noop, replacing two function calls with the right one.

xf86Rotate.c:
full damage on new shadow to trigger full shadow redraw later.

Without this change, you'll still get the "pending" damage reported at
some later date when other damage occurs to the pixmap that triggers a
processing of pending damage, completely disconnected from when the
rendering occurred, if any was involved.

This just brings the reporting in to when it's supposed to happen,
because either the rendering has already happened or it's a
communication mechanism between the server internals and compositing
(either automatic or manual) to trigger a redraw so that EXA has some
actual rendering (which will, itself, produce damage for actual
rendering).  I can't see how this would make EXA any more broken.


pgpCFVX8sdJKW.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-29 Thread Michel Dänzer
On Don, 2010-10-28 at 20:46 -0700, Eric Anholt wrote: 
> In all these cases, any rendering implied by this damage has already
> occurred, and we want to get the damage out to the client.  Some of
> the DamageRegionAppend calls were explicitly telling damage to flush
> the reportAfter damage out, but not all.

I haven't been able to confirm it on some quick tests, but I suspect
this will break EXA in some cases, as it assumes that between a
DamageRegionAppend/DamageRegionProcessPending call pair the
corresponding region will be modified by a rendering operation and will
thus be valid in the current copy of the pixmap contents and invalid in
the other copy.

Maybe what's needed here is some other mechanism for specifying a region
that is not related to actual rendering but only to be reported to
clients via the DAMAGE extension for informational purposes.

FWIW, the test that prompted me to split up damage processing into two
steps was starting compiz in an xterm on an otherwise 'naked' X server.
The xterm window borders (the parts between the decoration and the
actual terminal contents) would previously be corrupted. I suspect this
change will reintroduce that problem with the EXA 'classic' scheme at
least.


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 1/2] Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.

2010-10-28 Thread Keith Packard
On Thu, 28 Oct 2010 20:46:22 -0700, Eric Anholt  wrote:
> In all these cases, any rendering implied by this damage has already
> occurred, and we want to get the damage out to the client.  Some of
> the DamageRegionAppend calls were explicitly telling damage to flush
> the reportAfter damage out, but not all.
> 
> Bug #30260. Fixes the compiz wallpaper plugin with client damage
> changed to reportAfter.
> 
> Signed-off-by: Eric Anholt 

Reviewed-by: Keith Packard 

(testers on other graphics chips are encouraged to give this a try so we
don't have to revert the revert of the revert)

-- 
keith.pack...@intel.com


pgptop09zq9Xp.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel