platform/upstream/xf86-video-intel.git
10 years agoconfigure: Provide a poor man's replacement for getline()
Chris Wilson [Thu, 10 Jul 2014 20:01:57 +0000 (21:01 +0100)]
configure: Provide a poor man's replacement for getline()

uClibc is one such library that doesn't implement getline()

Reported-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Rewrite rotation setup on top of universal drm planes
Chris Wilson [Tue, 8 Jul 2014 10:53:13 +0000 (11:53 +0100)]
sna: Rewrite rotation setup on top of universal drm planes

The kernel interface has changed slightly since the early proposals. Now
the rotation property is only on the plane and so we have to lookup the
primary prime as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix a couple of DBG messages
Chris Wilson [Sat, 5 Jul 2014 13:40:38 +0000 (14:40 +0100)]
sna: Fix a couple of DBG messages

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotest/lowlevel-blt-bench: Add common PDF operators
Chris Wilson [Sat, 5 Jul 2014 08:46:00 +0000 (09:46 +0100)]
test/lowlevel-blt-bench: Add common PDF operators

Applications are starting to use PDF operators, so far I have spotted
multiply, dodge and lighten.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agobacklight: Fix security issues in handling of the interface path name.
Matthieu Herrb [Fri, 4 Jul 2014 16:26:09 +0000 (18:26 +0200)]
backlight: Fix security issues in handling of the interface path name.

- don't allow '/' in the interface name to avoid escaping the /sys
  hierarchy
- check snprintf() return value for overflow.

Problems reported by  Adam Sampson. Thanks.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agosna: Discard operations to either CPU or GPU bo when overwriting with RenderRectangles
Chris Wilson [Fri, 4 Jul 2014 12:04:02 +0000 (13:04 +0100)]
sna: Discard operations to either CPU or GPU bo when overwriting with RenderRectangles

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tweak number of threads for short areas
Chris Wilson [Fri, 4 Jul 2014 11:43:55 +0000 (12:43 +0100)]
sna: Tweak number of threads for short areas

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Convert a clear tile into a solid fill
Chris Wilson [Fri, 4 Jul 2014 11:39:01 +0000 (12:39 +0100)]
sna: Convert a clear tile into a solid fill

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix typo s/num_threads/max_threads/
Chris Wilson [Fri, 4 Jul 2014 11:26:43 +0000 (12:26 +0100)]
sna: Fix typo s/num_threads/max_threads/

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Do a quirk early check for short areas before threading
Chris Wilson [Fri, 4 Jul 2014 11:14:11 +0000 (12:14 +0100)]
sna: Do a quirk early check for short areas before threading

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Disable use of threaded compositor when using threaded renderer
Chris Wilson [Fri, 4 Jul 2014 11:10:10 +0000 (12:10 +0100)]
sna: Disable use of threaded compositor when using threaded renderer

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Utilise existing cached upload for promoting to GPU bo
Chris Wilson [Fri, 4 Jul 2014 10:02:39 +0000 (11:02 +0100)]
sna: Utilise existing cached upload for promoting to GPU bo

If we already have a buffer that represents the data on the GPU, we can
simply use that when we need to promote the pixmap onto the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Promote tile pixmaps to GPU when reused
Chris Wilson [Fri, 4 Jul 2014 09:43:35 +0000 (10:43 +0100)]
sna: Promote tile pixmaps to GPU when reused

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen8: Disable the unaligned check
Chris Wilson [Fri, 4 Jul 2014 09:14:54 +0000 (10:14 +0100)]
sna/gen8: Disable the unaligned check

Note sure if this is strictly required -- but at the moment it fails for
1x1R solids, causing us to skip glyphs. The simulator doesn't complain,
so just skip the check for now.

Reported-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tighten assertions for using upload proxies concurrently with CPU reads
Chris Wilson [Fri, 4 Jul 2014 08:55:04 +0000 (09:55 +0100)]
sna: Tighten assertions for using upload proxies concurrently with CPU reads

After relaxing some of the rules on when to discard the upload proxies,
we also need to relax some of the complementary asserts.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Prevent creating a GPU bo for an inplace read
Chris Wilson [Fri, 4 Jul 2014 08:48:53 +0000 (09:48 +0100)]
sna: Prevent creating a GPU bo for an inplace read

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Wrap xf86DPMSSet
Chris Wilson [Thu, 3 Jul 2014 18:18:04 +0000 (18:18 +0000)]
sna: Wrap xf86DPMSSet

We need to wrap xf86DPMSSet() so that we can reintialize our bookkeeping
and auxiliary planes after disabling/re-enabling CRTC during DPMS
operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Clear the cursor reference from the CRTC if the update fails
Chris Wilson [Thu, 3 Jul 2014 08:07:44 +0000 (09:07 +0100)]
sna: Clear the cursor reference from the CRTC if the update fails

This should allow it to be restored correctly the next time it gets
shown.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Limit the size of the tiling object to be smaller than either the originals
Chris Wilson [Wed, 2 Jul 2014 20:17:54 +0000 (21:17 +0100)]
sna: Limit the size of the tiling object to be smaller than either the originals

When we tile, we do so in order to fit an operation involving two
objects larger than the aperture. If we then choose an intermediate
tiling object that is larger than either of those two, the error will
persist and we will be forced to recuse.

In the worst case, this will provide an upper bound to the recursion.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotest: Create separate SHM segments for ref/out
Chris Wilson [Wed, 2 Jul 2014 09:16:07 +0000 (09:16 +0000)]
test: Create separate SHM segments for ref/out

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Use the threaded compositor for picture conversions
Chris Wilson [Wed, 2 Jul 2014 10:47:32 +0000 (10:47 +0000)]
sna: Use the threaded compositor for picture conversions

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen6+: Tweak consideration of compositing on BLT
Chris Wilson [Wed, 2 Jul 2014 10:31:54 +0000 (11:31 +0100)]
sna/gen6+: Tweak consideration of compositing on BLT

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix typo in LinearFramebuffer handling
Chris Wilson [Tue, 1 Jul 2014 16:54:49 +0000 (17:54 +0100)]
sna: Fix typo in LinearFramebuffer handling

Eeek, when not using LinearFramebuffer we still want to create the GPU
bo: s/,/;/

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Correct migration flags for initial scanout creation
Chris Wilson [Tue, 1 Jul 2014 16:53:56 +0000 (17:53 +0100)]
sna: Correct migration flags for initial scanout creation

We want to preserve any contents preloaded (not that there should be
any...)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: Add a DBG option to select copy method
Chris Wilson [Tue, 1 Jul 2014 15:59:31 +0000 (16:59 +0100)]
sna/dri2: Add a DBG option to select copy method

Often when debugging it is useful to force either use of the BLT or 3D
pipelines for copies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Enforce LinearFramebuffer option
Chris Wilson [Tue, 1 Jul 2014 14:11:07 +0000 (15:11 +0100)]
sna: Enforce LinearFramebuffer option

This option should only be used for compatibility. Previously this was
done at a high level, this changes it to enforce the tiling as we apply
the CRTC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: Use CPU fallback if possible
Chris Wilson [Tue, 1 Jul 2014 13:31:32 +0000 (14:31 +0100)]
sna/dri2: Use CPU fallback if possible

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: Set depth/bpp on scratch DrawableRec
Chris Wilson [Tue, 1 Jul 2014 12:10:32 +0000 (13:10 +0100)]
sna/dri2: Set depth/bpp on scratch DrawableRec

We need to initialise both depth and bitsPerPixel on the drawable struct
we pass around as they are used for selecting for the format when
copying.

Reported-by: Vedran Rodic <vrodic@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Use the i845 info structure for INTEL_I845G_IDS()
Damien Lespiau [Mon, 30 Jun 2014 18:24:13 +0000 (19:24 +0100)]
intel: Use the i845 info structure for INTEL_I845G_IDS()

I assume the intention was to provide a different structure for each of
the gen 2 devices.

This doesn't change anything really.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agosna: Add DBG breadcrumbs before flushes in BLT
Chris Wilson [Mon, 30 Jun 2014 18:56:39 +0000 (19:56 +0100)]
sna: Add DBG breadcrumbs before flushes in BLT

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo
Chris Wilson [Mon, 30 Jun 2014 20:01:11 +0000 (21:01 +0100)]
sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo

One day, we will move the width/height/bpp to the bo itself...

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: Apply the paraniod buffer clip in the correct coordinate system
Chris Wilson [Mon, 30 Jun 2014 15:32:45 +0000 (16:32 +0100)]
sna/dri2: Apply the paraniod buffer clip in the correct coordinate system

We need to only clip to the extents of the copy in the buffer space -
which implies that we need to translate the region into that space before
doing the clip.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tweak preference for small GPU bo
Chris Wilson [Mon, 30 Jun 2014 13:13:13 +0000 (14:13 +0100)]
sna: Tweak preference for small GPU bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotest/lowlevel-blt-bench: Update progress more frequently
Chris Wilson [Mon, 30 Jun 2014 10:20:54 +0000 (11:20 +0100)]
test/lowlevel-blt-bench: Update progress more frequently

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Reduce assertion when using asynchronous CPU access
Chris Wilson [Mon, 30 Jun 2014 10:05:33 +0000 (11:05 +0100)]
sna: Reduce assertion when using asynchronous CPU access

If we are not actually accessing the memory through the pointer, we do
not care if it not currently coherent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Silence snarky compliers
Chris Wilson [Mon, 30 Jun 2014 09:55:20 +0000 (10:55 +0100)]
sna: Silence snarky compliers

0 != (void *)0

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Mollify assert to be consistent with the scanout flush
Chris Wilson [Mon, 30 Jun 2014 09:46:00 +0000 (10:46 +0100)]
sna: Mollify assert to be consistent with the scanout flush

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotest/lowlevel-blt-bench: Exercise masks
Chris Wilson [Mon, 30 Jun 2014 07:44:33 +0000 (08:44 +0100)]
test/lowlevel-blt-bench: Exercise masks

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotest/lowlevel-blt-bench: Exercise SHM pixmaps
Chris Wilson [Mon, 30 Jun 2014 07:44:33 +0000 (08:44 +0100)]
test/lowlevel-blt-bench: Exercise SHM pixmaps

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Remove one redundant cleanup on error
Chris Wilson [Mon, 30 Jun 2014 06:44:25 +0000 (07:44 +0100)]
intel-virtual-output: Remove one redundant cleanup on error

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Cleanup singleton on failure
Chris Wilson [Sun, 29 Jun 2014 14:25:19 +0000 (15:25 +0100)]
intel-virtual-output: Cleanup singleton on failure

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Convert debugging messages to verbosity
Chris Wilson [Sun, 29 Jun 2014 07:29:36 +0000 (08:29 +0100)]
intel-virtual-output: Convert debugging messages to verbosity

Original patch by main.haarp:
"A verbose switch is quite useful for debugging, it shouldn't require
editing and recompilation to gain more useful output. I added it."

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80664
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Ensure CPU bo is synchronized before writing
Chris Wilson [Sun, 29 Jun 2014 08:26:10 +0000 (09:26 +0100)]
sna: Ensure CPU bo is synchronized before writing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Update allocation of CPU bo to avoid creating active buffers
Chris Wilson [Sun, 29 Jun 2014 06:02:44 +0000 (07:02 +0100)]
sna: Update allocation of CPU bo to avoid creating active buffers

Since we now prefer CPU detiling, exactly when we want active/inactive
buffers is a little more complex - and we also need to take into account
when we want to use the CPU bo as a render target.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Sync CPU bo before writes
Chris Wilson [Sun, 29 Jun 2014 06:00:58 +0000 (07:00 +0100)]
sna: Sync CPU bo before writes

Fixes regression from

commit 961139f5878572ebea268a0bbf47caf05af9093f [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 30 09:45:15 2014 +0100

    sna: Use manual detiling for downloads

Reported-by: Harald Judt <h.judt@gmx.at>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80560
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Only preferentially upload through the GTT for large transfers
Chris Wilson [Sat, 28 Jun 2014 20:07:08 +0000 (21:07 +0100)]
sna: Only preferentially upload through the GTT for large transfers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Prefer linear if below tile_width
Chris Wilson [Sat, 28 Jun 2014 16:38:54 +0000 (17:38 +0100)]
sna: Prefer linear if below tile_width

Be stricter in order to allow greater use of CPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/io: Prefer CPU copies on LLC
Chris Wilson [Sat, 28 Jun 2014 13:23:29 +0000 (14:23 +0100)]
sna/io: Prefer CPU copies on LLC

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Don't discard damage for SHM pixmaps
Chris Wilson [Sat, 28 Jun 2014 13:22:17 +0000 (14:22 +0100)]
sna: Don't discard damage for SHM pixmaps

We don't really want to rendering into SHM pixmaps except for copying
back due to the strict serialisation requirements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Check for a mappable GPU bo before migrating damage
Chris Wilson [Sat, 28 Jun 2014 13:21:36 +0000 (14:21 +0100)]
sna: Check for a mappable GPU bo before migrating damage

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Skip adding damage if it is already contained
Chris Wilson [Sat, 28 Jun 2014 13:20:00 +0000 (14:20 +0100)]
sna: Skip adding damage if it is already contained

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tidy calling memcpy_from_tiled
Chris Wilson [Sat, 28 Jun 2014 13:19:22 +0000 (14:19 +0100)]
sna: Tidy calling memcpy_from_tiled

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Micro-optimise unswizzling tiling/detiling
Chris Wilson [Sat, 28 Jun 2014 13:18:23 +0000 (14:18 +0100)]
sna: Micro-optimise unswizzling tiling/detiling

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/trapezoids: Handle mono traps just in case
Chris Wilson [Sat, 28 Jun 2014 06:05:55 +0000 (07:05 +0100)]
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>
10 years agouxa: Update Screen Pixmap width/height first
Chris Wilson [Fri, 27 Jun 2014 15:26:24 +0000 (16:26 +0100)]
uxa: Update Screen Pixmap width/height first

Since commit dd6db82680b05cde4a47116b7096c054f3837e20 [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>
10 years agotest: Expand number of sources for basic benchmarking
Chris Wilson [Fri, 27 Jun 2014 15:12:35 +0000 (16:12 +0100)]
test: Expand number of sources for basic benchmarking

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri2: DBG compile fixes
Chris Wilson [Fri, 27 Jun 2014 15:00:03 +0000 (16:00 +0100)]
sna/dri2: DBG compile fixes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/glyphs: Add DBG option for glyph tolerance
Chris Wilson [Fri, 27 Jun 2014 12:42:37 +0000 (13:42 +0100)]
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>
10 years agosna/glyphs: Add DBG option for forcing glyphs-to-dst
Chris Wilson [Fri, 27 Jun 2014 11:56:43 +0000 (12:56 +0100)]
sna/glyphs: Add DBG option for forcing glyphs-to-dst

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Check source bo is suitable for BLT before doing so
Chris Wilson [Fri, 27 Jun 2014 09:38:59 +0000 (10:38 +0100)]
sna: Check source bo is suitable for BLT before doing so

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Only reuse pinned batches for 830/845
Chris Wilson [Thu, 26 Jun 2014 19:19:52 +0000 (20:19 +0100)]
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>
10 years agosna/dri2: Slightly improved DBG messages
Chris Wilson [Thu, 26 Jun 2014 19:24:05 +0000 (20:24 +0100)]
sna/dri2: Slightly improved DBG messages

Missing git add from

commit 2e8c09f3fe468abba9c307ba3d7b2d22908e1172
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>
10 years agosna: Tidy selection of a near-miss active buffer.
Chris Wilson [Thu, 26 Jun 2014 19:21:12 +0000 (20:21 +0100)]
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>
10 years agosna: Fix userptr defines to match i915_drm.h
Chris Wilson [Thu, 26 Jun 2014 11:42:30 +0000 (12:42 +0100)]
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>
10 years agosna: Remove scare quotes from hotplug detection "enabled"
Chris Wilson [Thu, 26 Jun 2014 08:25:06 +0000 (09:25 +0100)]
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>
10 years agosna/dri2: Hook into ClientGone callback to clear dangling references
Chris Wilson [Wed, 25 Jun 2014 21:19:23 +0000 (22:19 +0100)]
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>
10 years agosna: Make output destroy more defensive
Chris Wilson [Thu, 26 Jun 2014 05:59:07 +0000 (06:59 +0100)]
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>
10 years agosna/dri2: Compile fixes for ancient Xorg
Chris Wilson [Wed, 25 Jun 2014 17:05:46 +0000 (18:05 +0100)]
sna/dri2: Compile fixes for ancient Xorg

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix uninitialisable variable
Chris Wilson [Wed, 25 Jun 2014 16:20:52 +0000 (17:20 +0100)]
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 ded05e8abb248664124d2b86f77c27497a252c4e
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>
10 years agosna: Improve throttling during bo allocation
Chris Wilson [Wed, 25 Jun 2014 13:19:33 +0000 (14:19 +0100)]
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>
10 years agosna: Only mark throttle as done after success
Chris Wilson [Wed, 25 Jun 2014 12:21:58 +0000 (13:21 +0100)]
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>
10 years agosna: Track desired flushes better after starting a new batch
Chris Wilson [Wed, 25 Jun 2014 10:18:01 +0000 (11:18 +0100)]
sna: Track desired flushes better after starting a new batch

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Fix weblinks (again)
Chris Wilson [Wed, 25 Jun 2014 10:45:55 +0000 (11:45 +0100)]
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>
10 years agointel: Fix weblinks
Chris Wilson [Wed, 25 Jun 2014 10:31:58 +0000 (11:31 +0100)]
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>
10 years agosna: Tweak scanout flush
Chris Wilson [Wed, 25 Jun 2014 08:00:04 +0000 (09:00 +0100)]
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>
10 years agosna: Throttle before doing a TearFree buffer replacement
Chris Wilson [Wed, 25 Jun 2014 07:18:25 +0000 (08:18 +0100)]
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>
10 years agosna: And fix the typo...
Chris Wilson [Wed, 25 Jun 2014 07:05:22 +0000 (08:05 +0100)]
sna: And fix the typo...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Disable userptr for bdw
Chris Wilson [Wed, 25 Jun 2014 07:01:57 +0000 (08:01 +0100)]
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>
10 years agosna: Check all connectors for reuse
Chris Wilson [Wed, 25 Jun 2014 06:31:33 +0000 (07:31 +0100)]
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>
10 years agoAdd marketing names for Broadwell
Rodrigo Vivi [Tue, 24 Jun 2014 10:14:54 +0000 (03:14 -0700)]
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>
10 years agoAdd reserved PCD IDs for Broadwell
Chris Wilson [Tue, 24 Jun 2014 19:51:54 +0000 (20:51 +0100)]
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>
10 years agosna: Add yet more DBG messages to MST discovery
Chris Wilson [Tue, 24 Jun 2014 19:49:18 +0000 (20:49 +0100)]
sna: Add yet more DBG messages to MST discovery

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoconfigure: Display our README before the summary
Chris Wilson [Tue, 24 Jun 2014 15:37:52 +0000 (16:37 +0100)]
configure: Display our README before the summary

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Add a note about the myriad places we have identifier strings
Chris Wilson [Tue, 24 Jun 2014 15:33:43 +0000 (16:33 +0100)]
intel: Add a note about the myriad places we have identifier strings

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Wait for our expected device node to appear
Chris Wilson [Tue, 24 Jun 2014 10:50:55 +0000 (11:50 +0100)]
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>
10 years agosna: Add some more DBG around connector discovery
Chris Wilson [Tue, 24 Jun 2014 10:35:23 +0000 (11:35 +0100)]
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>
10 years agosna: Ensure serial is not 0 for runtime MST discovery
Chris Wilson [Tue, 24 Jun 2014 10:24:26 +0000 (11:24 +0100)]
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>
10 years agosna: Fix the usual "x = y" typos in creating boxes
Chris Wilson [Tue, 24 Jun 2014 10:04:01 +0000 (11:04 +0100)]
sna: Fix the usual "x = y" typos in creating boxes

Fixes regression from

commit 1d74b2e07d125ad95b9db6c9c032e90faf2bfa60
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>
10 years agosna/glyphs: Clip damage to dst
Chris Wilson [Tue, 24 Jun 2014 09:23:03 +0000 (10:23 +0100)]
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>
10 years agosna: Trim composite region against dst clip extents
Chris Wilson [Tue, 24 Jun 2014 09:17:47 +0000 (10:17 +0100)]
sna: Trim composite region against dst clip extents

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Wait for the DRM device to load
Chris Wilson [Mon, 23 Jun 2014 15:14:28 +0000 (16:14 +0100)]
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>
10 years agosna: Decompose self-copy into overlapping/non-overlapping regions
Chris Wilson [Tue, 24 Jun 2014 07:58:51 +0000 (08:58 +0100)]
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>
10 years agosna/dri2: Add a dash more asserts
Chris Wilson [Tue, 24 Jun 2014 06:34:46 +0000 (07:34 +0100)]
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>
10 years agosna: Disable CRTC after MST topology change
Chris Wilson [Mon, 23 Jun 2014 21:50:23 +0000 (22:50 +0100)]
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>
10 years agosna: Silence compiler warning for shadowed variable
Chris Wilson [Mon, 23 Jun 2014 14:47:13 +0000 (15:47 +0100)]
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>
10 years agosna: Allow scratch pixmap to allocate linear GPU bo
Chris Wilson [Mon, 23 Jun 2014 21:15:56 +0000 (22:15 +0100)]
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>
10 years agosna: Promote to full GPU bo after forced migration away from CPU bo
Chris Wilson [Mon, 23 Jun 2014 13:11:27 +0000 (14:11 +0100)]
sna: Promote to full GPU bo after forced migration away from CPU bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Prefer rendering on the CPU to avoid damage migration
Chris Wilson [Mon, 23 Jun 2014 13:02:51 +0000 (14:02 +0100)]
sna: Prefer rendering on the CPU to avoid damage migration

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Force creation of GPU bo for drawing if need be
Chris Wilson [Mon, 23 Jun 2014 11:27:30 +0000 (12:27 +0100)]
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>
10 years agosna/gen6+: Initialise src offset before use
Chris Wilson [Mon, 23 Jun 2014 10:44:22 +0000 (11:44 +0100)]
sna/gen6+: Initialise src offset before use

Fixes regression from

commit 30348efd57135edee41fccb87133c572b6473aa8
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>