Commit Graph

8426 Commits

Author SHA1 Message Date
Chris Wilson 5c7965f00f intel: If need be, try mounting debugfs
If we require debugging information from debugfs and we cannot find it,
silently mount it and dump the information we need.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-09 07:37:58 +01:00
Chris Wilson dea65e8be7 intel: Log open clients on master takeover fail
If we fail to claim the DRM device as master, dump /debugfs/.../clients
so that we can check to see who failed to drop master for us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-09 07:15:56 +01:00
Chris Wilson 8d135867c8 sna: Update check for static driver data on loading error
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1354424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-08 14:04:14 +01:00
Chris Wilson 59f0374188 sna: Restore the clear before pwriting the cursor
Along the legacy phys cursor path, we use a common scratch buffer. As
this is global, we need to be careful not to trust the cursor local
dirty tracking and be sure to clear the image before uploading.

Reported-by: Dirk Griesbach
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82337
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-08 10:26:13 +01:00
Chris Wilson afea9ba079 Prepare for spurious Xv ABI changes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-08 08:26:08 +01:00
Chris Wilson 6f69188cb2 sna: Clear old cursors when resizing
When changing the stride on a cursor, we have to clear the whole area
and not just the rectangle outside of our overwritten area.

Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82273
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-08 07:26:54 +01:00
Chris Wilson fab976cef8 uxa: Compile fix for Ubuntu 11.04
../../../src/uxa/intel_uxa.c: In function 'intel_uxa_init':
../../../src/uxa/intel_uxa.c:1557:27: error: 'true' undeclared (first use in this function)
../../../src/uxa/intel_uxa.c:1557:27: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-07 14:35:22 +01:00
Chris Wilson 52c1e64692 sna: Flush cursor width changes
The kernel only sees changes in the cursor width when the cursor handle
is updated. In the cases where we reuse larger bo for smaller cursors,
make sure we then reset the cursor handle (even though it has not
changed) so tht the kernel updates its width.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-07 11:34:26 +01:00
Chris Wilson 7763a3da89 test: Exercise different cursor sizes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-07 11:32:51 +01:00
Chris Wilson 105d478cdd sna: Enable kernel rotation support by default
The kernel API is now upstream and so we can rely on it not changing.
Time to use it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-06 09:10:30 +01:00
Chris Wilson f36b7a4aac intel: Use NOACCEL to avoid a symbol clash on old Xorg
Old Xorg xf86str.h defines NONE preventing us from using it within an
enum. Use NOACCEL instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-05 16:38:42 +01:00
Chris Wilson c5e654cf2a sna: Set the RandR primary output from the option
If the user specifies the Option "Primary" for a monitor, we need to set
it as the RandR primary output.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82193
2014-08-05 16:22:53 +01:00
Chris Wilson 999c8dc700 sna: Add intermediate modes to any output with a scaler
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-05 15:38:44 +01:00
Chris Wilson cea47f8cfc sna: Add DSI to the list of recognised panel connectors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-05 15:38:44 +01:00
Chris Wilson 941ae4c868 sna: Add some extra logging for hotplugging of outputs
References: https://bugs.freedesktop.org/show_bug.cgi?id=82153
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-05 10:19:05 +01:00
Chris Wilson 5926da0ab3 sna: Mark the current mode as preferred if no other mode is
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-05 06:26:06 +01:00
Chris Wilson ab3f1526f1 sna: Add the current CRTC mode last
We only want to add the current mode to the modelist if it is not
already present in the EDID. At the moment, we always add the current
mode first which causes the list to be reordered. If we add it after
checking the EDID, then we will not perturb the list.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82068
2014-08-05 06:25:57 +01:00
Edward Sheldrake ebd1907304 backlight: Fix regression
The backlight xrandr property is missing unless the backlight level
was 0 on starting X, regression introduced in

commit f9e7ac7db7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 23 21:53:31 2014 +0100

    backlight: Set structure to safe values when not initialised

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82146
2014-08-04 20:20:41 +01:00
Chris Wilson 926631ee41 sna: Restore single CRTC flips
CRTC flips depend upon having a proxy front buffer, so

commit 33a0dd8f0b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jul 29 09:11:01 2014 +0100

    sna/dri2: Also check for stale buffers before exchanges

was false and disabling every other CRTC flip. However,

commit 70868c7aa8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 23 08:37:46 2014 +0100

    sna/dri2: Recreate buffer in reuse rather than force recreate

was not the entire story and to prevent unnecessary confusion when
multiple clients share the same front buffer, we have to force the
recreation of the back. Do this inside the xchg routine to avoid the
confusion first fixed by 70868c7aa8.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-03 20:36:13 +01:00
Chris Wilson 623fa61090 sna: Rearrange showing cursors
Just tidying and explaining why cursor show on a particular pipe may be
skipped.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-03 20:32:28 +01:00
Chris Wilson 0b93857335 sna: Add some paranoid asserts around get_window_pixmap()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-03 20:31:51 +01:00
Chris Wilson 4de3f9bd79 sna: Relax restriction on fenced aperture check
This is done upfront based on the fenced size within the batch, so we do
not need to assume everything is fenced later on.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-03 07:33:35 +01:00
Chris Wilson af60a104ac sna: Restrict fencing to only use the low 256MiB
Somce early machines have 512MiB apertures, but we can still only use
the low 256MiB for fencing. Separate out the mappable restriction checks
from the fencing in order to further constrain those devices.

Reported-by: Matti Hämäläinen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-02 19:19:57 +01:00
Chris Wilson d11512406d sna: Remove dead assertion
sna_display.c: In function 'sna_crtc_redisplay':
sna_display.c:6393:9: error: 'sna_crtc' undeclared (first use in this function)
  assert(sna_crtc);

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-02 19:08:06 +01:00
Chris Wilson a1a0b9c2e4 sna/glyphs: Eliminate an extra conditional from glyphs-to-dst
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-01 12:02:58 +01:00
Chris Wilson fc2de62496 sna/glyphs: Fallback to masked glyphs if rendering to a too wide dst
Fixes regression from

commit 79399ff926
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Mar 24 10:46:57 2014 +0000

    sna: Eliminate a few conditionals in glyph fast path

for large pixmaps (such as extended desktops on gen2/gen3).

Bugzilla: https://bugs.archlinux.org/task/40949
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-01 12:02:29 +01:00
Chris Wilson ce80487591 i810: Fix startup after marking GPU screens in the module
Fixes regression from

commit d6830190bc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 23 10:53:40 2014 +0100

    sna: Disable all outputs when initializing as a slaved output provider

Reported-by: Tobias Powalowski
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-31 16:18:50 +01:00
Chris Wilson a6a60ec606 sna: Silence a compiler warning
sna_display.c: In function 'sna_crtc_redisplay':
sna_display.c:6390:19: warning: unused variable 'sna_crtc' [-Wunused-variable]
  struct sna_crtc *sna_crtc = to_sna_crtc(crtc);

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 07:42:04 +01:00
Chris Wilson 33a0dd8f0b sna/dri2: Also check for stale buffers before exchanges
Not impossible after all - usually after a client error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 07:40:51 +01:00
Chris Wilson 376272be36 sna: Skip grabbing the main framebuffer id
If we aren't using it, we can forgo obtaining the id.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 07:40:51 +01:00
Chris Wilson 4c66ee5e97 sna: Always clear CRTC overrides when adjusting the mode
It is not necessary to resize before adjusting the CRTC, but if it
moves the window may no longer be obscuring the CRTC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 07:40:51 +01:00
Chris Wilson 7ceb4028f4 sna: Select the panel native size of the unattached fb size
When creating a framebuffer for an headless system, if there is a panel,
use its native size rather than 1024x768.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 07:40:51 +01:00
Chris Wilson a88795c641 sna: Clear cursor image after rotation
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81886
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 06:57:06 +01:00
Chris Wilson 02bb0c5bc5 sna: Fix clear shortcut for transformations
The region needs to be transformed along the clear shortcut when
redisplaying the CRTC.

Reported-by: Dirk Griesbach
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81820
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-30 06:57:05 +01:00
Chris Wilson 997a5d2802 configure: Expose no acceleration by default (--with-default-accel=none)
Why? I am not sure, but it seems equally as valid as allowing the switch
to uxa/glamor as default. The runtime equivalent is Option "AccelMethod".

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-27 07:15:19 +01:00
Chris Wilson cac1548a9c sna: Sort the outputs to provide a stable listing order
Make xrandr look neater by grouping the outputs together by type and
then by port ordering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-24 06:35:35 +01:00
Chris Wilson f68d363a23 backlight: Remove unused 'original' member from structure
This was accidentally added with no users.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 22:12:33 +01:00
Chris Wilson 5935c93ce7 sna: Keep the backlight at the same brightness when switching away
Before VT switching, we disable all the outputs. This has the
side-effect of disabling the backlight, but commonly the console does
not set the backlight brightness itself and so we re-enable the
backlight on its behalf. Rather than set the backlight to max
brightness, reset it to the last user value, as maximum can be very
bright!

Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 21:59:20 +01:00
Chris Wilson f9e7ac7db7 backlight: Set structure to safe values when not initialised
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 21:58:05 +01:00
Chris Wilson bc50dff844 sna: Disable rendering with the DRM device whilst away from VT
As root, X gets away with many things, including submitting commands to
the DRM device whilst it is no longer authorised (i.e. when it has
relinquished master to another client across a VT switch). In the
non-root future, if we attempt to use the device whilst unauthorized the
rendering will be lost and we will mark the device as unusable. So flush
our render queue to the device around a VT switch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 21:43:02 +01:00
Chris Wilson 8d95e90b7b 2.99.914 snapshot 2014-07-23 16:43:38 +01:00
Chris Wilson 57f0e65d51 sna/dri2: Compile fix for old xorg/dri2
We have to do conditional compilation as we touch structure members that
may not exist in older Xserver headers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 16:43:38 +01:00
Chris Wilson 4ed0937640 Add automake magic required for libobj/
So libobj/ wasn't included in the tarball, and nor was the compatability
functions being added to the driver when they were needed. The oddity is
that using the ./configure script (and thus make distcheck) succeeds. It
was only when 'autoreconf -fi' was run was the first error encoutered.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Tobias Klausmann
2014-07-23 16:02:47 +01:00
Chris Wilson dcf9ce4a9f Fix compile failure on old Xorg with XF86_ALLOCATE_GPU_SCREEN
Sigh, a late fix was not compile checked against xorg-1.7.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 15:44:21 +01:00
Chris Wilson 1c5e20716f 2.99.913 snapshot 2014-07-23 14:45:19 +01:00
Chris Wilson d242965979 sna: Skip performing an async flip after fixup
After the first async failure and we fix up the CRTC, ordinary we queue
a no-op flip in order to queue the event. For async flips, we do not
want that event so just skip the flip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 14:45:19 +01:00
Chris Wilson 4153d4b430 sna/dri2: Tidy freeing the queued frame events
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 13:55:39 +01:00
Chris Wilson f2b2b6eda0 test/dri2: Use the right device node
Use the device node as instructed by Xorg.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 13:55:39 +01:00
Chris Wilson 65c2376730 sna: Add a DBG message for slave damage propagation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 13:55:39 +01:00
Chris Wilson 95c059b330 sna: Reorder disabling scanout pixmap when updating slave
The assertion caught that we would unregister an invalid drawable on
older Xorg.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23 11:04:54 +01:00