Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24300 .
Offscreen memory allocation can occur from various places, and apparently
doing defragmentation from at least some of them can confuse some driver
acceleration code.
There's still the regular background defragmentation in the WakeupHandler,
which should manage to keep fragmentation at a reasonable level.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 8754db77d8169e5ea506a963cebee1a651bcf094)
|
|
The problem occurs in the following situation:
1. Create Pixmap
2. Software fallback on pixmap: pExaPixmap->pDamage created
3. Accel to pixmap: driver pixmap created, exaPixmapIsOffscreen() now true
4. Software fallback on pixmap
4.1: PrepareAccess() from driver succeeds, so no DFS to system memory copy
4.2: Software rendering...
4.3: (pExaPixmap->pDamage && exaPixmapIsOffscreen()) is true, so we try
to (incorrectly) UTS the data back to the driver pixmap, when we
should just call the driver's FinishAccess() hook.
4.4: fail
The patch adds an additional check on pExaPixmap->offscreen, which should
(for the cases exaPixmapIsOffscreen() will return true) only be FALSE
when we haven't used PrepareAccess() on the pixmap.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Acked-By: Michel Dänzer <michel@daenzer.net>
[ Michel Dänzer: This is a 'backport' of commit
647b79f87a9891225678dc6fc2fbda3bdef8fa9d from master - actually this patch
was submitted first but didn't apply to master anymore, so technically the
other change is a 'forward port' of this one ]
|
|
It crash the server when the drawable is 32 bit and the framebuffer is 16.
This is pretty much a copy-past from commit 8e873185.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 964040764387d89ef64324cfbee31872ee6ce41c)
|
|
- This comment is still in exa_driver.c and there it makes sense.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 412c56ef3332d09efbd861e41c3e985f44729729)
|
|
Solid pictures have a NULL pFormat field, but their format is always
PICT_a8r8g8b8.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1088073b11ed488c0df45af3867b900ef93c6fe1)
|
|
Easily reproducible by running "rendercheck -t fill".
It should be safe to just test against rbits for all colour components
as we should always have values for r/g/bbits for PICT_FORMAT_COLOR
formats.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Michel Dänzer <daenzer@vmware
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 55305cf8db7787883bc80b7348eb626e609626f8)
|
|
The upload in finish access can cause an infinite loop if
UTS returns FALSE in here.
Fixes fd.o bug #24246.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b5fcc5553eb784c9f4826936e839079c0cdee55a)
|
|
For the recent mixed pixmaps changes, I failed to realize (or hit in my
testing) a problem which can occur if the driver doesn't provide an
UploadToScreen hook or provides one which can fail: There can be a crash
in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to
exaCopyDirty(), but that's normally NULL with driver allocated pixmaps.
The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr
but use pPixmap->devPrivate.ptr after PrepareAccess instead.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 .
(cherry picked from commit 73ae547d5e687ef10dea45801fc627e10ac4b659)
|
|
If the PrepareAccess hook fails, use the DownloadFromScreen hook to retrieve
driver pixmap contents to a system RAM copy, perform software rendering on that
and copy the results back using the UploadToScreen hook. Use the classic
migration logic to minimize transfers (which as a bonus allows slightly
cleaning up some of the existing mixed pixmap code).
This enables things that weren't possible before with driver-allocated pixmap
storage: If some (or all) GPU pixmap storage can't be mapped directly by the
CPU, this can be handled between the PrepareAccess and
DownloadFrom/UploadToScreen hooks, e.g.:
* Radeon KMS on big endian machines can fail PrepareAccess if the pixmap
requires byte-swapping and swap bytes in DownloadFrom/UploadToScreen.
* Environments where GPU and CPU don't have a shared address space at all.
Here the driver PrepareAccess hook will always fail and leave all transfers
between GPU / CPU storage to the Download/From/UploadToScreen hooks.
Drivers which can handle all pixmaps in the PrepareAccess hook should notice
little if any difference.
(cherry picked from commit 1818cbd70fc1f2e1487b4c678e67e28f1265c0ef)
|
|
Remove dead variables, fix use of uninitialized values, that kind of thing.
(cherry picked from commit 096f21bb7a1217443d8a03529b1a2938518eb24f)
|
|
It doesn't make sense for windows.
Also double-check that the data pointer is valid.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23461 (not sure that could
happen on master even without this, but just in case)
|
|
Add support for solid pictures in exaTryDriverSolidFill(), but otherwise just
pass solid and gradient pictures to the driver Composite hook.
While we're at it, clean up the logic to detect Composite operations which are
effectively solid fills or copies. This should also fix some false negatives
and positives.
|
|
Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess
calls.
|
|
|
|
This adds a pitch return so that the driver can align the pitch to any
value it wishes and not just the one it gave to EXA at startup.
|
|
|
|
|
|
- Replace it with something wfb friendly while i'm at it.
|
|
|
|
- Always free sys_ptr before setting the pixmap to pinned.
|
|
|
|
- This can be used to force creation of driver pixmap.
- Not for 1 or 4 bpp.
- Driver can still fail (driver) pixmap creation.
|
|
|
|
- Based on driver pixmaps with some changes (completely transparent to driver).
- It helps with the problem of known software fallbacks, such as trapezoids.
- exaDoMigration is now called for all cases that provide a do_migration hook.
- exa_migration.c is renamed to exa_migration_classic.c
|
|
- Create a few seperate functions and a few private function pointers.
- Replace a few if conditions with a check for pExaPix->pDamage instead.
- This is in preperation of a third scheme that lies somewhere in between.
- Code clarity would have suffered (i started working on it and didn't like the mess).
|
|
|
|
|
|
Use reference counting and do nothing unless the reference count transitions
to/from 0.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 .
As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than
once per pixmap and operation.
Also update the Doxygen documentation for the PrepareAccess driver hook to
better match current reality.
|
|
* Check all pixmaps involved for damage records, fixes visual corruption due to
the screen pixmap never having one.
* Fix an array size and remove a now superfluous assignment.
|
|
Also remove dead code associated with access_prepared local variable.
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Michel Dänzer <michel@daenzer.net>
|
|
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 .
|
|
|
|
This way we don't always need to scan over previously allocated areas when
looking for an available one, and there might be less fragmentation.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
|
At most once per second, under the following circumstances:
* We can't satisfy an offscreen memory allocation, but there seems to be enough
offscreen memory available in total.
or
* The server has been idle for at least 100ms, and there is more than one
available offscreen area.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
|
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
|
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 .
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
|
|
|
|
|
This adds a revised pixmap hook for driver pixmaps, which is
required to support tiling on various chips.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
- Some image viewers (eog, gqview) trigger the CopyArea path of Xext/shm.c
- I'm not aware of any code path that wouldn't like UTS and trigger this code.
- miDoCopy should handle src coordinate clipping.
- Overlapping blits are obviously not an issue (both would have to be offscreen or not).
|
|
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
|
|
|
|
|
|
|
- exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards.
- This is needed to support pixmaps that are not offscreen.
|
|
things)
- fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access.
- Also handle the destroyed pixmaps by finishing them first.
- Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to.
- Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid).
|
|
- And make some fatal for a debug build.
|