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
Chris Wilson
8cf7ac776b
sna: Fix a typo in an error message
...
s/achieve/retrieve/ otherwise it is nonsense.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 14:11:26 +01:00
Chris Wilson
be83b98d29
sna: Add some DBG to the prime paths
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 11:28:40 +01:00
Chris Wilson
d0684d55e3
sna: Fixup CREATE_USAGE_SHARED
...
The DRI2 code tries to create pixmaps with non-zero width/height,
whoops.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 11:07:26 +01:00
Chris Wilson
b6ced7a226
sna: Fix typo for detecting prime ioctls
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 10:05:46 +01:00
Chris Wilson
df68723baa
sna: Port prime interfacing
...
Preliminary prime support.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04 08:49:59 +01:00
Chris Wilson
e3ad18036b
sna: Enable platform probing
...
Completing commit 0768ac4d19
Author: Dave Airlie <airlied@redhat.com>
Date: Wed Jul 25 16:11:23 2012 +1000
intel: add platform probing support.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-03 23:09:08 +01:00
Сковорода Никита Андреевич
3dc644b2a9
uxa: Fix Backlight option support.
...
Signed-off-by: Сковорода Никита Андреевич <chalkerx@gmail.com>
2012-09-03 23:09:08 +01:00
Chris Wilson
a972affe0c
sna/gen6+: Redirect fills if the destination is too large for 3D
...
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54134
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-03 23:09:07 +01:00
Dave Airlie
18d26076c7
intel: fix return value for no pEnt
...
Probably never gets hit but shuold return FALSE,
pointed out on irc by Lekensteyn
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 07:19:12 +10:00
Dave Airlie
d14ff42f2a
intel: query kernel for caps to setup scrn capabilities.
...
This queries the kernel for prime support before advertising
the capabilities.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-03 12:28:29 +10:00
Dave Airlie
6705d8237a
intel: add pixmap tracking and scanout support. (v2)
...
This adds support for pixmap tracking and scanout of
alternate pixmaps.
v2: do dirty updates after uxa block handler, check if kernel
can flush vmap for us so we don't have to.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-03 12:28:29 +10:00
Dave Airlie
69827126ab
intel/uxa: add pixmap sharing support.
...
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-03 12:25:07 +10:00
Dave Airlie
0768ac4d19
intel: add platform probing support.
...
This allows the driver to be loaded by the platform loading code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-03 12:25:07 +10:00
Chris Wilson
164ae7a4f9
man: Malformed "Backlight" section
...
Reported-by: Matthew Monaco <dgbaley27@0x01b.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54397
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-02 17:20:19 +01:00
Chris Wilson
67b4410416
sna: Cache the temporary upload buffer when copying boxes
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-02 12:47:36 +01:00
Chris Wilson
4b558281e0
sna: Don't retire when searching for a snoopable buffer without hw support
...
If the hw/kernel doesn't support snoopable buffers, then it makes little
sense to search for one, and force a retire in the certainty of not
finding any.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-02 12:23:59 +01:00