Commit Graph

8298 Commits

Author SHA1 Message Date
Chris Wilson 2a0176379f sna: Micro-optimise unswizzling tiling/detiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 14:18:23 +01:00
Chris Wilson 24cb50e53c sna/trapezoids: Handle mono traps just in case
I disabled a few paths and ended up in an assert that mono trapezoids
shouldn't get that far...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 07:07:40 +01:00
Chris Wilson 72c041e57b uxa: Update Screen Pixmap width/height first
Since commit dd6db82680 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 9 20:26:19 2014 +0100

    uxa: Add DRI3 and miSyncShm support

we verify that the attaching bo meets the constraints required for the
Pixmap. However, when updating the ScreenPixmap following a resize, we
did not update the Pixmap size until after we tried to update the bo,
resulting in a validation failure when shrinking the screen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:29:17 +01:00
Chris Wilson 0584604b53 test: Expand number of sources for basic benchmarking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:14:09 +01:00
Chris Wilson edd2b78956 sna/dri2: DBG compile fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:00:03 +01:00
Chris Wilson a6ba93283b sna/glyphs: Add DBG option for glyph tolerance
And bump it to 3 so that glyph filtering doesn't force us to use the
mask too often.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:44:48 +01:00
Chris Wilson ee5c74deee sna/glyphs: Add DBG option for forcing glyphs-to-dst
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:40:58 +01:00
Chris Wilson 6ba4ee1fe8 sna: Check source bo is suitable for BLT before doing so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 10:38:59 +01:00
Chris Wilson 157e22cb8e sna: Only reuse pinned batches for 830/845
Trying to fly too close to the sun. :(

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80558
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson f027b4f628 sna/dri2: Slightly improved DBG messages
Missing git add from

commit 2e8c09f3fe
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 25 22:19:23 2014 +0100

    sna/dri2: Hook into ClientGone callback to clear dangling references

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson 2ae5d7d941 sna: Tidy selection of a near-miss active buffer.
References: https://bugs.freedesktop.org/show_bug.cgi?id=80560
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson 8cad98eca6 sna: Fix userptr defines to match i915_drm.h
Now that we are starting to see userptr in the headers, we see that the
definitions slightly changed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 14:39:13 +01:00
Chris Wilson c5c7dd24a5 sna: Remove scare quotes from hotplug detection "enabled"
Tidy up the log message by improving its formatting, and making it more
accurate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 09:32:09 +01:00
Chris Wilson 2e8c09f3fe sna/dri2: Hook into ClientGone callback to clear dangling references
As the Window may exist for multiple Clients, we cannot rely on the
destruction of the Window decoupling all outstanding events and
preventing chasing a stale Client pointer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 08:28:53 +01:00
Chris Wilson 12a349974b sna: Make output destroy more defensive
We may never create the properties as it may be ignored or the
allocation may fail, so we need to be careful when freeing we do not
stumble over invalid pointers.

References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c28
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 07:00:20 +01:00
Chris Wilson 2ec2164ba4 sna/dri2: Compile fixes for ancient Xorg
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 18:08:20 +01:00
Chris Wilson 258f8983da sna: Fix uninitialisable variable
sna_render.c: In function 'sna_render_picture_downsample':
sna_render.c:822: warning: 'priv' may be used uninitialized in this function

introduced in

commit ded05e8abb
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 22:15:56 2014 +0100

    sna: Allow scratch pixmap to allocate linear GPU bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 17:20:52 +01:00
Chris Wilson ca0d06add9 sna: Improve throttling during bo allocation
By controlling how long we may block during buffer allocation, we can
relax the throttle elsewhere to prevent render lag buildup.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 15:27:34 +01:00
Chris Wilson 5ad1661b87 sna: Only mark throttle as done after success
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 13:23:17 +01:00
Chris Wilson c3e4518e84 sna: Track desired flushes better after starting a new batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:51:12 +01:00
Chris Wilson 85bb55e4a6 intel: Fix weblinks (again)
Julien pointed out that I fail at checking links.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:45:55 +01:00
Chris Wilson ff31d49bfa intel: Fix weblinks
Matti reported a few outdated links to intellinuxgraphics.org, now
superseded by 01.org.

Reported-by: Matti Hämäläinen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:34:48 +01:00
Chris Wilson 8c1729aab6 sna: Tweak scanout flush
We now distinguish gpu_dirty whilst the bo is not flushed within a batch
and needs_flush for when it is dirty and still busy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 09:00:04 +01:00
Chris Wilson 26c4e850b8 sna: Throttle before doing a TearFree buffer replacement
If the client is rendering fast, he may be rendering too fast and
starting to build up a backlog.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:21:05 +01:00
Chris Wilson ea6b0bb8e1 sna: And fix the typo...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:05:22 +01:00
Chris Wilson 3f4da671b0 sna: Disable userptr for bdw
Something fishy is afoot. But let's kill this particularly worrisome
regression so that we can do a full round of testing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=79053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:03:10 +01:00
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