Commit Graph

5893 Commits

Author SHA1 Message Date
Chris Wilson e28f5a2537 sna: Add some DBG as to why kgem_check_bo() flushes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 15:21:27 +01:00
Chris Wilson 1af1dae1fe sna: Ensure tiling upload buffers are trimmed to fit in the cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 15:20:49 +01:00
Chris Wilson e5f137807c sna: Avoid fallbacks to shadow pixels if FORCE_GPU is in effect
References: https://bugs.freedesktop.org/show_bug.cgi?id=54808
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:59:05 +01:00
Chris Wilson 0d17208a66 sna: Avoid readback inplace if the target is unmappable
We have to use the tiling indirect path, or else fail.

References: https://bugs.freedesktop.org/show_bug.cgi?id=54808
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:58:51 +01:00
Chris Wilson 4b4abdaae9 sna: Flush after operating on large buffers
As we know that such operations are likely to be slow and consume
precious GTT space, mark them as candidates for flushing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:58:51 +01:00
Chris Wilson 15911f533d prime: Reorder probe messages so that the driver prefix is correct
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-11 14:59:53 +01:00
Chris Wilson bc73acbd4d uxa: Error out after failing to become DRM master during PreInit
As we set the card fd to -1 upon failure, the error here is
non-recoverable, so make sure it gets propagated and we abort loading
the intel ddx.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/962892
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 18:55:04 +01:00
Chris Wilson b0d14071f7 sna: Workaround issue with global glyph privates and shared ZaphodHeads
Under ZaphodHeads we end up with multple screens accessing the common
sna_glyph_key and so cause conflicting updates and erroneous references
into the screen-local texture atlases.

Two approaches can be tried here. Transition to a screen-specific
private key introduced with xorg-1.13, or to move the glyph cache (and
the rest of the gpu state tracker) down into the device private rather
than screen private. This is neither of those, but a workaround to avoid
reusing the incorrect entries from shared screens.

Reported-by: Stephen Liang <inteldriver@angrywalls.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54707
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 13:57:12 +01:00
Chris Wilson cfa0c6162b sna: Fixup possible_crtcs for ZaphodHeads
As the possible_crtcs is a bitmask of the available crtcs exposed to the
Xserver, we need to adjust it for the limited view given by Zaphod mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 10:52:12 +01:00
Chris Wilson 95c71d1626 NEWS: Fix version reference 'bugs since 2.20.6'!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-08 20:12:32 +01:00
Chris Wilson 0659711dfa 2.20.7 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-08 20:02:32 +01:00
Chris Wilson 2c8e48f814 sna: Remember that LineDoubleDash involves updating the GC between segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 23:24:22 +01:00
Chris Wilson ed7b8db249 sna: Pass the hints down to the PolyPoint fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 22:15:56 +01:00
Chris Wilson 6c9df48fa8 sna: Fix PolyPoint fallback through a complex clip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 22:05:01 +01:00
Chris Wilson 7d76eb155e sna: First scan for a backlight associated with the device
The goal is to find the right interface in a multi-GPU system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 18:08:07 +01:00
Chris Wilson 2de7d2d815 sna/prime: Fixup attaching the randr14 scanout pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 16:58:18 +01:00
Chris Wilson 448808d8a4 prime: Allocate a GPU_SCREEN when not primary to fulfil the output sink role
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 14:37:38 +01:00
Chris Wilson 3dce661ef3 sna: And remember to update the ScreenPixmap after resize
Fixes the regression from the previous commit

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 13:55:46 +01:00
Chris Wilson 0c39c363d7 sna: Protect sna_crtc_resize() against early invocation with no RootWindow
If the outputs are resized very early on, in CreateScreenResources, then
we will not yet have created a RootWindow and so trying to change its
pixmap is a futile effort.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 13:09:17 +01:00
Chris Wilson d7879a5939 sna/dri: Fix the double-buffer pageflipping path
Notably, we need to remember to exchange the front/back buffers after
flipping!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 12:18:08 +01:00
Chris Wilson 2630c81937 sna/dri: Make sure we set the SCANOUT flag when creating bo for pageflips
In case we should be creating an untiled framebuffer, we need to make
sure we honour the scanout alignment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 11:23:02 +01:00
Chris Wilson aeef03520f sna/prime: Correct the pinning flag when importing the prime bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 11:46:53 +01:00
Chris Wilson 9bdf46d6c1 sna/prime: Distinguish forms of pinned pixmap
So that we can allow prime to replace the backing bo of currently
exported pixmaps through DRI2.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 11:43:48 +01:00
Chris Wilson 39c4be2b0b uxa: Distinguish forms of pinning
This allows us to replace the prime bo to meet sharing requirements, but
still maintain the integrity with other users.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 11:28:49 +01:00
Chris Wilson 031fa1c1c1 uxa/prime: Mark the pixmap as pinned once exported (similar to flink)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 11:08:23 +01:00
Chris Wilson e5d3f38186 sna: Add is-pinned checks to changing the pitch on an existing bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 10:57:48 +01:00
Chris Wilson f2affe403b sna: Apply the minimum 256 pitch to CREATE_USAGE_SHARED pixmaps as well
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 10:35:28 +01:00
Chris Wilson fbe4080816 prime: Align pitch of shared untiled buffers to 256 bytes
In order for nvidia to handle the buffers we are currently generating,
they need to have a pitch alignment of 256 bytes. Make it so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 09:03:02 +01:00
Chris Wilson c5fb025267 sna: Correct assertions for adding damage that bypasses the region
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 08:55:46 +01:00
Chris Wilson 1f5d5a37e5 Add PlatformProbe to handle sharing of device entities
Reported-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54561
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 17:17:58 +01:00
Chris Wilson ddde40afc0 sna: Harden against initialisation failures
References: https://bugs.freedesktop.org/show_bug.cgi?id=54561
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 16:48:44 +01:00
Chris Wilson 4627dc36fa Revert "sna: Flush the batch before a render operation if the GPU is idle"
This reverts commit ad57ac07a2.

These checks end up being too frequent and not allowing us to batch
sufficient commands to offset the overhead of batch submission. Hmm.
2012-09-05 16:29:45 +01:00
Chris Wilson 886f3cef41 uxa: Fix cut'n'paste error in Option "Backlight"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 15:27:21 +01:00
Chris Wilson 6211d0914e uxa: Flush batch immediately after queuing a WAIT_FOR_EVENT
We still encounter hangs with kernel-3.5 with the culprit being a wait
on a disabled pipe. As we thoroughly check before that the pipe is still
disabled and flush before a modeset, the only possibility that remains
is that DPMS is disabling the pipe before we submit. Close that race by
always submitting the batch immediately after a WAIT_FOR_EVENT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 12:33:08 +01:00
Chris Wilson 6a14235477 sna: Initialise the empty boxes field of the region before subtracting it
Fixes regression from commit 38fb77af75
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Sep 5 08:23:34 2012 +0100

    sna: Don't upload ignored cpu damage

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 12:15:52 +01:00
Chris Wilson dff25e5ec4 sna: Drop master after discarding framebuffers
As Imre Deak pointed out in the previous patch, drmModeRmFB only works
when we hold the DRM master, therefore to prevent a leak of the
framebuffer across server reset we need to defer dropping master until
after we release our scanouts and modes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 11:11:08 +01:00
Imre Deak 46981d0170 uxa: fix leakage of FB when closing the screen
Calling drmModeRmFB is only allowed in DRM master mode. Since leaving
the VT also drops master mode we need to remove the FB before calling
I830LeaveVT.

This is only a real leak in case of a server reset, otherwise the server
process will exit anyway and the kernel will clean up the FB.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 11:11:06 +01:00
Chris Wilson 55cef974a5 sna: Review validity of damage when discarding CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 10:57:48 +01:00
Chris Wilson 587499bbf5 sna/video: Use the scanout flag and FB id for sprite framebuffers
So that we can use the same teardown path as normal scanouts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 10:56:18 +01:00
Chris Wilson 913adacc54 sna/gen7: Always emit a stall when flushing the texture cache
Reported-by: Reinhard Karcher <reinhard.karcher@gmx.net>
References: https://bugs.freedesktop.org/show_bug.cgi?id=54488
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 09:20:55 +01:00
Chris Wilson bdfedb46bd sna: Use async upload only if the last render was not CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 09:15:12 +01:00
Chris Wilson 67b75ae6f6 sna: Tweak upload path to remove redundant code
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 08:46:39 +01:00
Chris Wilson 38fb77af75 sna: Don't upload ignored cpu damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 08:23:34 +01:00
Chris Wilson 2eb32f711d sna: Add DBG control to disable CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 00:22:04 +01:00
Chris Wilson 19e170aa6f sna: Fix comparison of memcpy overlap to include x-offsets
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05 00:05:33 +01:00
Chris Wilson 7895416eab sna: Rearrange use_cpu() tests for composite ops to avoid syncing CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 22:20:03 +01:00
Chris Wilson ad57ac07a2 sna: Flush the batch before a render operation if the GPU is idle
Experiment with pushing those first commands earlier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 22:19:43 +01:00
Chris Wilson 6325d7e29a NEWS: fixup missing links to bugs referenced in 2.20.6 release notes
Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 14:51:54 +01:00
Chris Wilson bc309bad39 sna: And remember to flush the damage to the output slaves...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 14:22:15 +01:00
Chris Wilson 68d207588a sna: Improve handling of output offloading
In particular, don't forget to flush when we only have offload slaves
and no native pixmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 14:12:38 +01:00