For the broken shader workaround, we need to reset the pipeline state
before every blt as the state is changed by the magic CA pass. So we
need to check that we actually have sufficient space to emit the
pipelined pointers before doing so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to attach a scanout (and use swrast) on a wedged GPU, we need to
bypass the safety checks for normal pixmap creation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
SNA requires some pending bug fixes to the xserver so it makes little
sense to conditionalise the code and deliberately cause broken
behaviour.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3843
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This patch has been carried by the distributions every since they
started doing graphical boot splashes. Time to integrate it and give it
some TLC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We only use it for the id. Everything else stored on it, like the
buffer_id, is not permanent and we need to query the current status as
required.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
BOX_EMPTY(&box) surprisingly compiles and generates interesting code that
evaluates to if (0). Oops.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We only want to process retirements if we know we caused a stall waiting
for the GPU to release the bo before performing IO.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A pox on all those who write trivial patches, attempt to compile on a
system not having dri2proto and just assume that all is good.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
pixman complains if you attempt to use a region created with an invalid
box, so don't do that.
Reported-by: Reinhard Karcher <reinhard.karcher@gmx.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we have no global resource allocator for zaphod mode, that's what
RandR-1.4 solves, we have to further constrain zaphod mode to only use
one crtc per screen. This also means that you must match the output
restrictions within the Screen definitions, noting that the crtc pipe id
corresponds with the screen number.
Reportede-by: Phillp Haddad <phillip.haddad@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tinderbox complains when it is left running for days on end...
Reported-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
By not tracking the front buffer correctly, i.e. performing the exchange
on every swap, GL_FRONT was no longer pointing at the updated buffer and
neither was the root pixmap. So both X and GL would read the wrong
buffer was the flip was pending.
The other issue was that we would feed the old front buffer back to the
application as a future back buffer (due to buffer caching) and so the
kernel would duly insert a WAIT_EVENT for the pending flip to complete
before allowing rendering to affect it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the client exits before the async page-flip completes then we still
need to decrement the pending flip count in order to correctly flip the
scanout next time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Before the xserver is patched to send notification of release of the
scratch pixmaps, we cannot associated GPU resources with them. In
practice, the only advantage for doing so is for SHM pixmaps...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I went a step too far... I still need some define in order to switch
between uxa/sna at compile time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
DRI2 presumes that the pixmap->serialNumber can be used as unique id.
If it changes revokes *all* the buffers, it presumes a new pixmap has
been attached to the window, for example after a reconfiguration event
(resizing of a window, or a mode switch). However, as we updated the
root pixmap upon a pageflip, we were triggering revocations everytime,
causing further revocations and massive aperture thrashing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the introduction of the unrolled fill_boxes() was bypassing the
effective optimisation in fill_one().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>