Commit Graph

9422 Commits

Author SHA1 Message Date
Peter Hutterer
dd913354e6 autogen.sh: use exec instead of waiting for configure to finish
Syncs the invocation of configure with the one from the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-26 11:13:26 +10:00
Rodrigo Vivi
028c946df0 intel: Update SKL SRV GT4 pci ids reference.
No functional changes. Apparently spec has been changed
the valid table showing 0x192A as Server GT4
while 0x193A is Server GT4e.

Libdrm and Mesa already have this right. So let's fix the ref here.

Kernel is also fixed with commit 5390974f981907.
"drm/i915: Update SKL SRV GT4 pci ids reference."

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2017-01-03 21:03:54 +00:00
Rodrigo Vivi
169c74fa6c intel: Adding Marketing names for Skylake, Kabylake and Apollolake/Broxton.
This commit adding all known marketing names for latest gen9 platforms.

v2: On top of simplified generic string names.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-12-06 09:38:57 +00:00
Rodrigo Vivi
2948cf0531 intel: Simplify new platform names.
Modern Intel (R) platforms with integrated graphics comes with common
names varying the range numbers. So instead of listing all supported
platforms let's start using the generic marketing strings without
the numbers.

And for the specific board we list it's actual marketing name if
available on detection.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-12-06 09:38:56 +00:00
Chris Wilson
ff25ad3402 sna: Reorder frontbuffer resize vs flip event queue draining
If we are not careful, we may process an unflip in the middle of
resizing the frontbuffer - when the ScreenPixmap state is ill-defined.
First flush all the pending flip events, cancel any residual unflips,
then update the screen pixmap. This should be enough to close the race.

References: https://bugs.freedesktop.org/show_bug.cgi?id=98855#c11
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-05 21:37:52 +00:00
Ander Conselvan de Oliveira
fcf943f45b Add Geminialke PCI IDs
Same ids from kernel's

commit 8363e3c3947d0e22955f94a6a87e4f17ce5087b4
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Thu Nov 10 17:23:08 2016 +0200

    drm/i915/glk: Add Geminilake PCI IDs

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2016-12-05 21:37:52 +00:00
James Clarke
a1b39eb6dd sna: Add missing NULL check for readdir result in has_connector_backlight
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
2016-12-05 21:37:52 +00:00
Chris Wilson
4acd4a7d3d sna/gen9: Emit a dummy primitive between VertexElements
References: https://bugs.freedesktop.org/show_bug.cgi?id=98999
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-05 21:37:49 +00:00
Chris Wilson
9ac7a3370a sna: Handle xf86Randr12 gamma changes in xorg-xserver-1.19
commit 17213b74fd7fc4c4e2fe7a3781e7422dd482a0ab
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 21 16:44:20 2016 +0900

    xfree86/modes: Remove xf86RandR12CrtcGetGamma

removed the randr_crtc->palettes allocation and initialisation causing a
later dereference of the gamma table to crash. Looks like that was just
ABI misuse.

References: https://bugs.freedesktop.org/show_bug.cgi?id=98855
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-30 23:54:05 +00:00
Chris Wilson
f2901dd34d sna: Always ask the client to reprobe after userspace
This doesn't guarrantee that the client does, but the kernel insists.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-30 23:54:05 +00:00
Chris Wilson
35473dd9c9 sna: Prevent switching to GPU rendering when given a SHM pixmap
If we have a SHM pixmap, we only track rendering via the CPU bo for
synchronisation with the client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-30 23:54:05 +00:00
Chris Wilson
cdd0671764 tools/intel-virtual-output: Check for pending events before blocking
If the xlib/xcb library has pulled events from the fd, then a poll on
that fd will block until new events arrive. If none do, we fail to
process the currently waiting events in a timely fashion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-30 23:54:05 +00:00
Chris Wilson
bde946054e backlight: Protect iface writes against signal interruptions
Handle EINTR (and EAGAIN) by repeating until the write is complete.

References: https://bugs.freedesktop.org/show_bug.cgi?id=98759
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18 16:32:46 +00:00
Chris Wilson
04491bbdaa sna: Set reprobe flag on attached connectors after setcrtc failure
The most common cause of SETCRTC failure is if the connectors disappear.
Force the reprobe on these after a failure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18 16:32:46 +00:00
Matt Roper
a1a0f76e55 sna: Ensure we re-calculate fb_to_cursor transform if sharing cursor
If we find that we're sharing the cursor, we wind up bailing out of
__sna_get_cursor() before the fb_to_cursor transform is computed.  For
rotated displays, this can prevent the hotspot transformation from
happening properly, so the cursor's visible position won't match the
software's idea of where it is.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2016-11-16 06:59:29 +00:00
Chris Wilson
0472b1f0fe sna: Acquire cursor before use in sna_cursor_set_position()
sna_cursor_set_position() requires an already computed cursor
transformation matrix in order to determine whether the cursor is
visible. This is computed in __sna_get_cursor() which is currently only
called for visible cursors - i.e. we were using uninitialised state.

Reported-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-15 22:07:35 +00:00
Chris Wilson
01114334dd sna: Recompute the cursor after a modeset
As a modeset may adjust the rotation or the transform of the cursor, we
may need to recompute the cursor image afterwards.

Reported-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-15 22:07:31 +00:00
Sergei Trofimovich
d1d14f20cf brw_eu_emit.c: fix wrong test on a register type
Caught by gcc-6 as:
    brw_eu_emit.c:180:49: warning: logical 'and' of equal expressions [-Wlogical-op]

    if (reg.file == BRW_ARCHITECTURE_REGISTER_FILE &&
        reg.file == BRW_ARF_NULL)
        return;

Change uses 'reg.nr' test for 'BRW_ARF_NULL'.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-11 19:39:18 +00:00
Chris Wilson
dad64e9f76 sna/video: Mark the bo as clean after a setplane
The kernel will flush it, so we can treat it as clean after a successful
setplane.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10 15:42:54 +00:00
Chris Wilson
65b680e6cf sna/video: Don't skip setplane if this frame.bo is the same as the last
Always show the image, even if the bo doesn't appear to change as the
client may have put fresh data in the shared buffer and repositioned the
image.

Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10 15:42:54 +00:00
Chris Wilson
6d7e13f78b sna/video: Add tiling modifiers for addfb2
In case we do end up with a tiled buffer, create the framebuffer
appropriately.

Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10 15:42:54 +00:00
Chris Wilson
f3809df493 sna/video: Pass the dst extents to xf86XVClipVideoHelper()
xf86XVClipVideoHelper wants to measure from the origin of the target
extents to the clip in order to determine the right offset into the
source.

Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10 15:42:54 +00:00
Chris Wilson
6c8fc44343 sna: Mark up CPU writes for scanout flush
When we flip to a bo, the kernel will flush it from the CPU write domain
and so afterwards we need to do a new set-domain to mark up a subsequent
CPU write (and flush before another flip).

References: https://bugs.freedesktop.org/show_bug.cgi?id=95414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-05 23:50:10 +00:00
Chris Wilson
bf7316a453 sna/dri2: Don't request a signal following a dead flip completion
If we do flip to restore the bo after the current Window is destroyed,
we should not request that we send an event back to the client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-03 10:39:56 +00:00
Chris Wilson
40e3be3436 sna/dri2: Complete the final flip in a chain after the window is destroyed
When the pending flip is queued, we update all the Windows to use the
next bo as their rendering target. However, that bo is not yet the
scanout until the future flip is performed. If the current fullscreen
Window is destroyed, we still must allow that flip to proceed or else
the old bo is left on the scanout.

And yes, this is indeed a fix to one of the debug patches that intended
to detect the error causing #93844. Irony.

Fixes: 7817949314 ("sna/dri2: Avoiding marking a pending-signal on a dead Drawable")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93844
Reported-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-03 10:25:00 +00:00
Chris Wilson
47da17fe74 sna: Load DRI3 if try to load DRI2 and fail
As a backup in case DRI2 is disabled due to the presence of vgaarb, make
sure we have DRI3 loaded.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-28 08:05:50 +01:00
Chris Wilson
714052fb32 sna: Keep the backlight iface name on the heap
When finding the per-connector backlight interface, we have to take a
copy of the interface name for later use, as in this case it is not
constant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-24 22:22:44 +01:00
Chris Wilson
325570e731 sna: Check for the per-connector backlight sysfs interface
Modern kernels include a link from the sysfs connector directory to the
backlight interface on that connector. Try to find that link first as
this should allow us to enable backlight interfaces on connectors other
than the presumed solitary panel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-24 15:42:34 +01:00
Chris Wilson
388fd4a654 sna: Check current fb id before flip as well as after
More debug sanity checks that pageflips work.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-23 20:54:03 +01:00
Chris Wilson
90172d81ea sna: Allow Option DPMS to switch on (but not off)
We start off the system with the screens blanked, waiting the first
dixSaveScreen unblank, where we then apply the accumulated modesets.
This means we have to allow that even if Option DPMS off, and so we
restrict the Option to only enable DPMS (then once enabled they will not
turn off).

References: https://bugs.freedesktop.org/show_bug.cgi?id=98375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-22 21:06:11 +01:00
Chris Wilson
b7d6f695dd sna: Disable screen saver if Option "DPMS" is specified
The defacto standard is that the screensaver only blanks the screen but
keeps the outputs alive. We differ by actually disabling the CRTC when
the screen saver kicks in (to save power), however this circumvents
Option "DPMS".

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-21 23:11:42 +01:00
Chris Wilson
f18c7620cf sna: Only apply the CRTC fixup when attempting to turn DPMS off
If we were attempting to switch DPMS leave the state as is if the kernel
reports an error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-21 11:54:05 +01:00
Chris Wilson
b9cebe59f9 sna: Ignore the current CRTC mode following a hotplug event
If we detect a change in the output status, ignore the residual mode on
the CRTC. We use this CRTC mode during inheritance to provide
continuity and to make xrandr look neat we ensure that the mode is
included in the output list. However, following a hotplug event the
current mode may now be invalid and needs to be pruned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-21 11:33:47 +01:00
Chris Wilson
6a2e5bca42 sna: Force a reprobe for the specified hotplug connector
If the kernel can provide us with the exact connector that needs
reprobing following a hotplug event, use it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-21 11:33:47 +01:00
Manasi Navare
a43455d4a3 sna: Reprobe if kernel updates the connector mode list
Output_check_status() should return a false if it detects
that the connector mode list has changed so that sna_mode_discover
can reprobe.

Fixes: eb01cc549d (sna: Refresh mode list if the kernel updates)

Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
2016-10-18 09:33:12 +01:00
Chris Wilson
eb01cc549d sna: Refresh mode list if the kernel updates
If the kernel changes its list of modes, make sure we update. (This is a
losing battle since X will add whatever modes it finds from the EDID
despite what the kernel is telling it.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-12 17:35:37 +01:00
Chris Wilson
696f58f69f sna: Add an assertion that the flip succeeds
Upon completion of the flip-event, check that the current scanout
matches our expectations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-07 23:34:21 +01:00
Chris Wilson
bd33d0a7e9 sna: Force fb release on tiling changes
Since trying to change tiling with an fb attached causes EBUSY, try
without.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-04 12:55:07 +01:00
Chris Wilson
d9a32dc657 sna/dri2: Assert signal is unset before setting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-04 12:55:07 +01:00
Chris Wilson
2579d34713 sna: Handle GetImage planemask inplace
As found by Adam Jackson, we can perform the masking of the planemask on
the user buffer and so avoid hitting the fallback paths, so long as we
have no 24bpp Pixmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-28 18:57:01 +01:00
Chris Wilson
8f33f80100 test/present: Busy spin on the idle fence
Avoid the unix socket + libxcb to maximise the throughput.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-23 12:14:04 +01:00
Chris Wilson
0ffae5601b test/present: Look at scaling to many tiny windows
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-22 11:23:36 +01:00
Chris Wilson
8d6c8191e5 test/present: Stress multiple threads sending present requests
At the kernel level, threads and processes are identical - they each get
a fair share of CPU time. From this we can surmise the cause of any
variation between threads and processes. If the threads are balanced
(each thread completing the same number of requests), but the processes
have unbalanced numbers, we know that X is not as fair.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-20 14:07:19 +01:00
Chris Wilson
f0fbead9f2 sna/present: Prime the msc cache on first query
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-20 08:56:02 +01:00
Chris Wilson
b45dbdbd44 sna: Update sanity check for next stage of Xorg ABI
Now X will set the scrn->screen backpointer before Init, update our
assertion to track.

Reported-by: Nick Sarnie <commendsarnex@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97855
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-19 09:34:32 +01:00
Chris Wilson
15c5ff1245 sna: Clear damage tracking when marking as all-clear
In the middle of a composite op, we take the opportunity to note when a
fill clears the entire surface - and mark up the surface as clear. This
includes marking it as all damaged, to the surprise of the upper layer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-08 08:30:02 +01:00
Chris Wilson
5735b3ce3c sna/dri2: Fix busy engine check
We should be using the kernel's exec-id and not our own index.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-07 14:48:12 +01:00
Chris Wilson
205146b0fd sna/gen9: Fix Kabylake typo
Reported-by: Joseph Yasi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-05 10:05:30 +01:00
Chris Wilson
ebc066c1ec sna: Add missing GT info for bxt,kbl
commit c446a7ccc7
Author: Wayne Boyer <wayne.boyer@intel.com>
Date:   Wed Nov 18 10:39:42 2015 -0800

    Add Kabylake PCI IDs

missed adding the GT information, leaving bxt,kbl using only generic
acceleration.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-02 14:16:01 +01:00
Chris Wilson
74e4c131da sna: Limit the guessed modes by clock rate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-29 08:25:09 +01:00