Commit Graph

8272 Commits

Author SHA1 Message Date
Chris Wilson 204ec74a61 sna: Check all connectors for reuse
Do not rely on the MST path being present to indicate a connector that
may be reused.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80355
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 07:31:33 +01:00
Rodrigo Vivi 43ad5dbc60 Add marketing names for Broadwell
Even the unknown/reserved ones will stay with HD Graphics.

v2: Add missing names to intel.man and README files as well. (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-06-24 20:54:30 +01:00
Chris Wilson 78053bb842 Add reserved PCD IDs for Broadwell
Updating using kernel commit fb7023e0e248a33cb00d0a9cdce0bcedaa1ad284
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Tue Jun 10 10:09:52 2014 -0700

    drm/i915: BDW: Adding Reserved PCI IDs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 20:52:48 +01:00
Chris Wilson 74c1cf60a7 sna: Add yet more DBG messages to MST discovery
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 20:49:18 +01:00
Chris Wilson ca296c1831 configure: Display our README before the summary
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 16:37:52 +01:00
Chris Wilson d14d7efb28 intel: Add a note about the myriad places we have identifier strings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 16:33:43 +01:00
Chris Wilson 0c7cf7a6bb intel: Wait for our expected device node to appear
If the path we want to open for the KMS device is not yet available,
wait a short while and try again.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80397
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 11:50:55 +01:00
Chris Wilson 5c8829b30a sna: Add some more DBG around connector discovery
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 11:38:52 +01:00
Chris Wilson 271ed88e51 sna: Ensure serial is not 0 for runtime MST discovery
We reserve serial==0 for the initial setup that is run before RandR is
configured. After the server is running, we have to take extra steps to
make the outputs visible to userspace.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 11:24:26 +01:00
Chris Wilson 92dd13ae8d sna: Fix the usual "x = y" typos in creating boxes
Fixes regression from

commit 1d74b2e07d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 24 08:58:51 2014 +0100

    sna: Decompose self-copy into overlapping/non-overlapping regions

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 11:04:01 +01:00
Chris Wilson 92119ef093 sna/glyphs: Clip damage to dst
We only check if the hardware will automatically discard writes outside
of the target pixmap, but we must manually clip the damage before adding
it to our tracker.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c58
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 10:55:54 +01:00
Chris Wilson b33be7fbac sna: Trim composite region against dst clip extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 10:55:54 +01:00
Chris Wilson f66e25def3 intel: Wait for the DRM device to load
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80397
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 10:55:54 +01:00
Chris Wilson 1d74b2e07d sna: Decompose self-copy into overlapping/non-overlapping regions
We only need to stage the copy for the overlapping portion of the
self-copy, for the rest we can do in a single pass.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 10:55:02 +01:00
Chris Wilson 6e2cee27c3 sna/dri2: Add a dash more asserts
References: https://bugs.freedesktop.org/attachment.cgi?id=101618
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24 09:01:58 +01:00
Chris Wilson 706480bde6 sna: Disable CRTC after MST topology change
In order to disable CRTC after marking outputs as removed after probing
MST topology updates, we must manually mark the CRTCs as no longer
enabled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 22:52:52 +01:00
Chris Wilson 5530cb4165 sna: Silence compiler warning for shadowed variable
sna_display.c: In function 'sna_mode_redisplay':
sna_display.c:6322:12: warning: declaration of 'fb_id' shadows a global declaration [-Wshadow]
sna_display.c:223:24: warning: shadowed declaration is here [-Wshadow]
  CC     sna_display_fake.lo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 22:52:45 +01:00
Chris Wilson ded05e8abb sna: Allow scratch pixmap to allocate linear GPU bo
When allocating a scratch pixmap, we do so in the expectation that
rendering on the GPU is always preferrable, so even allocate a small
linear bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 22:15:56 +01:00
Chris Wilson 6c5658b144 sna: Promote to full GPU bo after forced migration away from CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 14:11:27 +01:00
Chris Wilson 25776547bb sna: Prefer rendering on the CPU to avoid damage migration
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 14:02:51 +01:00
Chris Wilson a3c9cbefcb sna: Force creation of GPU bo for drawing if need be
Now that we are more eager to transfer to the GPU bo if we expect
rendering to the CPU bo to be either slow or risk potential corruption,
we can find ourselves in a recursive loop when we also decide not to
create the GPU bo. Prevent that by explicitly creating the GPU bo if
desired.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 12:27:30 +01:00
Chris Wilson 827b89fa2d sna/gen6+: Initialise src offset before use
Fixes regression from

commit 30348efd57
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 11:14:25 2014 +0100

    sna/gen6+: Avoid adjusting copy coordinates until commited to using them

which assumed that the render state was being zeroed.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 11:44:22 +01:00
Chris Wilson 6848fb235b sna: Fix flushing empty batches
A logic inversion in

commit 1909910fdf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jun 22 20:19:22 2014 +0100

    sna: Inject a batch flush before adding a fresh bo

also applied the injection to when the batch was empty.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c48
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 11:28:07 +01:00
Chris Wilson 60fd6764eb sna: Handle old busy_ioctl not reporting the active ring
If we have an old kernel, just presume that the bo was last active on the
render ring.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 11:26:21 +01:00
Chris Wilson 30348efd57 sna/gen6+: Avoid adjusting copy coordinates until commited to using them
If we need to fallback to the BLT unit, we need to pass it the original
source/dest coordinates and not our transformed render coordinates. So
keep the original values intact until we start emitting the render
operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 11:14:25 +01:00
Chris Wilson e1e853edee sna/gen4+: Add some more asserts around recreating vertex buffers
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c46
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 10:14:09 +01:00
Chris Wilson 978790dc52 sna: Allow the CPU bo to be created if GPU rendering is forced
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 10:01:19 +01:00
Chris Wilson b2206eca00 sna/gen6+: Encourage the compiler to inline a couple of key functions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 10:01:16 +01:00
Chris Wilson bb4c057620 sna: Prefer to render over damage into the GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 09:43:10 +01:00
Chris Wilson 416c223861 sna: Do not set CAN_CREATE_GPU flag for untiled allocations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 09:43:10 +01:00
Chris Wilson fb51ec44f4 sna: Rename IGNORE_CPU to IGNORE_DAMAGE to better reflect its purpose
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 09:07:13 +01:00
Chris Wilson 96d2749660 sna: Add DBG breadcrumbs to sna_output_discover()
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 08:18:23 +01:00
Chris Wilson a33aa554fa sna/gen4+: Add box emitters for the generic vertex paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 07:51:38 +01:00
Chris Wilson 1909910fdf sna: Inject a batch flush before adding a fresh bo
Fresh bo (those without a reservation already defined, ala
presumed_offset) will cause the kernel to do a full relocation pass. So,
if possible flush the already correct batch in the hope of trimming the
amount of checking the kernel has to perform on this new batch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 07:51:38 +01:00
Chris Wilson 83cbbcd816 sna: Add missing string for DBG
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23 07:51:38 +01:00
Chris Wilson f22ea4e821 sna: Disable unused CRTC after undock events
If undocking removes output (as the MST topology changes and some
outputs then become unreachable), we may leave dangling CRTC. This
confuses us, so disable any enabled but unconnected CRTC after the
undock event.

Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22 18:46:26 +01:00
Chris Wilson dca0f1c2cc sna: Track CRTC mode changes and discard old flips
If we have a pending flip across a modeset we must be careful to drop
the stale flip_bo after the modeset.

Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22 17:56:43 +01:00
Chris Wilson dae370423a sna: Clean up CRTC on CloseScreen
We need to do this to stop any stray references escaping through kernel
events now that we are passing the CRTC through the event.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22 11:47:06 +01:00
Chris Wilson 923dc207df sna: Discard write hint from a couple more move-to-gpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-21 15:44:38 +01:00
Chris Wilson 2046a49be5 sna: Clear the transform flag on disabling the CRTC
In places, we assume that if the flag is set, we must have an active
CRTC. However, we were not clearing when disabling the CRTC.

Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80325
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-21 15:45:39 +01:00
Chris Wilson b3d3c0e8e7 sna: Avoid blending with the render engine on snoopable bo
This seems slightly weird, as there is nothing to indicate that this
would generate incorrect results only for snoopable bo. But no many of
flushes make my pnv box happy, so adjust the placement logic to move the
blending operation away from the snoopable target. This is sensible for
reasons of avoiding snoops from the render pipeline anyway.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80253
Reported-and-tested-by: Matti Hämäläinen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 20:06:53 +01:00
Chris Wilson 219f6bd9e8 sna: Be more flexible in converting random subsamples to 8x8 tiles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 20:01:11 +01:00
Chris Wilson 91bc9e42e4 sna: Mark up const boxes to keep the compiler happy
Pass around const to suppress a few compiler warnings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 16:23:18 +01:00
Chris Wilson e5c68b4358 sna: Feed more operations into the 8x8 BLT tiler
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 15:08:57 +01:00
Chris Wilson d2b90ac969 sna: Color patterns for BLT are required to be aligned to 256 byte boundaries
This so far appears to be the most restrictive alignment required, so
simply increase the upload alignment to 256 bytes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80033
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 15:08:56 +01:00
Chris Wilson 8d7e7010e3 test: Increase number of tiled sources
Significantly improve the stress impose upon the tiled BLT operations.
Also start dumping pngs of the failures.

References: https://bugs.freedesktop.org/show_bug.cgi?id=80033
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 15:08:56 +01:00
Chris Wilson db6dfc3227 sna/dri2: Don't decouple front buffer tracking for invalid SwapBuffer calls
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 10:57:22 +01:00
Chris Wilson 113a8b9be9 sna: Mark upload from SHM segment as read-only
As this may be mapped by the Xserver using a read-only SHM segment, we
are forced to treat it always as read-only. And this being X, that it is
using a SHM segment is opaque to the driver. Fantastic middlelayer.

This was incorrectly removed in
commit e680e54eab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 11 10:48:26 2014 +0100

    sna: Ignore setting read-only for temporary userptr maps

Also let's not forget the ShmPutImage -> CopyArea path.

Reported-by: Christoph Haag <haagch.christoph@googlemail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78411
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20 10:57:22 +01:00
Chris Wilson df89b49411 sna: Mark upload from SHM segment as read-only
As this may be mapped by the Xserver using a read-only SHM segment, we
are forced to treat it always as read-only. And this being X, that it is
using a SHM segment is opaque to the driver. Fantastic middlelayer.

This was incorrectly removed in
commit e680e54eab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 11 10:48:26 2014 +0100

    sna: Ignore setting read-only for temporary userptr maps

Reported-by: Christoph Haag <haagch.christoph@googlemail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78411
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-19 20:40:30 +01:00
Chris Wilson 6b32cf3a3c sna: Missed fixing y tile offset in last commit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-19 12:29:58 +01:00