Bug 6929 - Track damage per pixmap
Summary: Track damage per pixmap
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/EXA (show other bugs)
Version: git
Hardware: All All
: high enhancement
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 01:19 UTC by Michel Dänzer
Modified: 2006-12-28 13:05 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Track damage per pixmap (26.50 KB, patch)
2006-05-16 01:41 UTC, Michel Dänzer
no flags Details | Splinter Review
Updated patch, applies to 1.2.99.0 (24.22 KB, patch)
2006-11-05 07:15 UTC, Bernhard Rosenkraenzer
no flags Details | Splinter Review

Description Michel Dänzer 2006-05-16 01:19:29 UTC
I took http://people.freedesktop.org/~anholt/exa-damagetrack-3.diff and fixed
the major bugs with it. I'm going to attach the result.
Comment 1 Michel Dänzer 2006-05-16 01:41:11 UTC
Created attachment 5635 [details] [review]
Track damage per pixmap

Note that this patch also requires
http://people.freedesktop.org/~anholt/damage-reportafter-2.diff .

The major issue with the original patch was that it didn't track damage
correctly for intermediate results, which caused inefficient migration and/or
incorrect rendering. This patch improves overall performance significantly for
me. There were also a couple of other minor issues with the patch, e.g. it
didn't pass correct pointers to UploadTo/DownloadFromScreen for boxes that
don't start at (0,0).

In addition to the new functionality, this fixes a couple of existing bugs:

* exaAssertNotDirty() only compared the first line (although very thoroughly
;). It now attempts to compare only the valid bits and returns a boolean
instead of abort()ing. I have yet to hit a failure with this patch and the
radeon driver though.
* ExaOffscreenMarkUsed() didn't reset iter to 0 after decreasing the offscreen
area scores, so apparently they kept growing indefinitely.

Note that I'm not 100% sure this makes the damage tracking correct and minimal;
e.g., it may be possible to re-use the damage wrappers instead of
exaDrawableDirty() at least in some cases. Eric, what do you think?
Comment 2 Marcin Kurek 2006-06-05 06:50:15 UTC
I give a try to both patches onmy system (Pegasos II G4 1GHz machine) and
generaly I still can encounter the desktop corruption in KDE when smart
migration is used. Set it to greedy fixes corruptions.

Another problem is Xorg lockups inside KDE. When EXA enabled the Xorg lockups
frequently (I can still move the mouse pointer, but system is completly stopped)

For more informations take a look at #6811
(https://bugs.freedesktop.org/show_bug.cgi?id=6811)
Comment 3 Marcin Kurek 2006-06-10 02:40:36 UTC
Corruptions fixed with patch from #6811. But the lockups are propably still
there. I doesn't check because with patch #6811 I can't apply it cleanly.

Can you reupload the recent version of both patches ?
Comment 4 Michel Dänzer 2006-06-12 11:30:04 UTC
Updated version available in the branch 'exa-damagetrack' in the xserver git
repository.
Comment 5 Marcin Kurek 2006-06-13 02:43:16 UTC
Now I need to learn how to use GIT and I will try to post a report here.
Comment 6 Marcin Kurek 2006-06-14 10:32:57 UTC
OK, applied both patches from git and it seems there is no lockups anymore. I
can use both KDE and Gnome without any bigger problems with EXA.

Unfortunatly EXA cause still quite huge CPU consumption here (But now it's a
much better than previously) and this makes it dificult to use normaly. I need
to look at oprofile to locate the source of this problem someday.
Comment 7 Marcin Kurek 2006-06-14 10:34:47 UTC
OK, applied both patches from git and it seems there is no lockups anymore. I
can use both KDE and Gnome without any bigger problems with EXA.

Unfortunatly EXA cause still quite huge CPU consumption here (But now it's a
much better than previously) and this makes it dificult to use normaly. I need
to look at oprofile to locate the source of this problem someday.
Comment 8 Marcin Kurek 2006-06-15 00:49:55 UTC
OK, I make a small exa profile on my system and put results in
https://bugs.freedesktop.org/show_bug.cgi?id=6260. Maybe you can take a look.
Comment 9 Marcin Kurek 2006-06-21 13:59:16 UTC
Hmmm, I am afraid I have some bad news for you. When I tested EXA today I was
able to reproduce the ealrier lockup with my KDE.

The mouse pointer still works and I was able to hear BMP player too, but the
display was froozen. I wonder how to debug this kind of problem ?
Comment 10 Marcin Kurek 2006-07-11 01:19:37 UTC
Last time my system goes down because but in JFS, anyway now I have Gentoo again
and it seems one of the patches from
http://gitweb.freedesktop.org/?p=xorg-xserver;a=log;h=exa-damagetrack
(exa-damagetrack) failed to apply with recent GIT snap.

patching file exa/exa.c
patching file exa/exa_accel.c
patching file exa/exa_migration.c
Hunk #8 FAILED at 454.
Hunk #9 succeeded at 530 (offset 2 lines).
1 out of 9 hunks FAILED -- saving rejects to file exa/exa_migration.c.rej
patching file exa/exa_offscreen.c
patching file exa/exa_priv.h
Hunk #2 succeeded at 161 (offset -8 lines).
Hunk #3 succeeded at 316 (offset -8 lines).
Hunk #4 succeeded at 340 (offset -8 lines).
patching file exa/exa_render.c
Hunk #1 succeeded at 302 (offset 4 lines).
Hunk #2 succeeded at 442 (offset 4 lines).
Hunk #3 succeeded at 657 (offset 7 lines).
Hunk #4 succeeded at 680 (offset 7 lines).
Hunk #5 succeeded at 971 (offset 7 lines).
patching file exa/exa_unaccel.c
Comment 11 Michel Dänzer 2006-07-16 04:22:10 UTC
Yeah, just pick the bits from exa-damagetrack for the conflicting hunk. Dave, if
you read this, would be nice if you could push your merge(s) to the
exa-damagetrack branch.
Comment 12 Marcin Kurek 2006-08-10 13:08:11 UTC
Ping ?
Comment 13 Michel Dänzer 2006-08-11 01:58:59 UTC
Pong ?
Comment 14 Marcin Kurek 2006-08-26 13:29:51 UTC
I just wondering is damagetrace branch dead because there was no activity here
since almos 2 months.
Comment 15 Bernhard Rosenkraenzer 2006-11-05 07:15:00 UTC
Created attachment 7658 [details] [review]
Updated patch, applies to 1.2.99.0

Patch updated to apply to current versions
Comment 16 Alan Swanson 2006-12-19 12:40:36 UTC
Just as an FYI for anybody, to generate a patch for 7.2 use the following
command whilst in your local GIT xorg/xserver respository (doesn't matter which
branch is currently checked out) as currently only the exa and miext/damage
directories have any changes for EXA damage tracking.

$ git diff server-1.2-branch..exa-damagetrack exa miext/damage
Comment 17 Eric Anholt 2006-12-28 13:05:49 UTC
Merged to master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.