Commit Graph

7610 Commits

Author SHA1 Message Date
Chris Wilson 0138b38dfc sna: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
As we assume that Suspend, Standby alias to Off and disable the crtc
when switching to any mode other than On, we need to also perform the
backlight updates for Suspend,Standby prior to passing the DPMS value
onto the kernel.

Suggested-by: Alexander Monakov <amonakov@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-06 14:34:25 +00:00
Chris Wilson 28810d5b36 uxa/dri: Pixmap are offscreen and not attached to any display
As the code current assumes that pixmaps are located at screen origin
(0,0), it assumes that they are all on the first CRTC. However, since
they are offscreen, this leads to such complications as attempting to
emit vsync swapbuffers, and even worse attempting to swap a GLXPixmap
onto the scanout following a DRI2SwapBuffers.

Reported-by: Alexander Monakov <amonakov@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73282
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-06 14:26:38 +00:00
Chris Wilson 4d8f78bc95 sna/gen7+: Emit invalidate between operations if rendering to source/mask
Fixes regression from
commit c79cb18407 [2.99.907]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Nov 20 11:17:20 2013 +0000

    sna/gen7: Try to reduce flushes between primitive continuations

Reported-by: Simon Munton <simon.j.munton@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73208
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-02 15:02:56 +00:00
Chris Wilson c4b88d6026 2.99.907 snapshot 2013-12-30 10:35:18 +00:00
Chris Wilson 9289e2c56b sna/gen4: Sacrifice performance to workaround render corruption
The long running saga of trying to find an acceptable workaround for the
gen4 rendering corruption (seems to be a read-write hazard failure inside
the gpu) is failing, the only w/a found so far is to send a single
rectangle through the GPU at a time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-16 11:39:20 +00:00
Chris Wilson 660fbdac8d sna: Remove stale assertion
Now that we do not remove the move-to-gpu for a plain read from the
TearFree buffer, it is viable to use that buffer as source for cloning.
So we need to kill the stale assertion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-15 10:42:35 +00:00
Chris Wilson 989198f3dd intel-virtual-output: Disable build if timerfd is not present
Otherwise the build breaks on *BSD.

Reported-by: Yuta SATOH <nigoro.gentoo@0x100.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72707
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-15 09:45:24 +00:00
Chris Wilson c8e339edd3 sna: Avoid recursive out-of-order operations in the middle of TearFree
During TearFree, if we have to wait for the shadow flip to complete, we
run the event handler for the device. This can then cause us to evaluate
pending completed vblank events, which may in turn then attempt to use
the shadow bo and recurse into the TearFree handler. Try to prevent this
and requeue the vblank event.

Reported-by: Pascal de Bruijn <pmjdebruijn@pcode.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72690
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-15 09:39:54 +00:00
Chris Wilson f350a1369b sna/gen4+: Drop new assertion that we only finish a vbo after use in this batch
A full vbo might not be discarded and so upon first use in the following
batch we decided to finish the old vbo and allocate a new. This can
happen before we even emit any relocations and so the assert is bogus.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-12 16:49:02 +00:00
Chris Wilson 7c62925ba7 sna: Remove unused variable
sna_display.c: In function 'sna_crtc_redisplay__fallback':
sna_display.c:4104: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>
2013-12-11 21:39:40 +00:00
Chris Wilson 7e76f21a4d intel: Recognise gen8
Assign gen=8 to the Broadwell PCI IDs, no marketing names are known at
this point in time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-11 21:39:40 +00:00
Chris Wilson f7d1c2b8d1 sna: Enable scanline waits for Broadwell
Broadwell uses the same mechanism as Haswell for vsync.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-11 21:39:40 +00:00
Chris Wilson e017542d10 sna/gen8: Initial backend for Broadwell
Should match the functionality of the earlier generations, but untuned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-11 21:39:40 +00:00
Chris Wilson 610af0c70e Update i915_pciids.h
Pulling in changes from:

kernel commit 4d4dead67a4ab1d5de393f15ed5e4e2aa63d3bcf
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Sun Nov 3 16:47:33 2013 -0800

    drm/i915/bdw: Add device IDs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-11 21:39:34 +00:00
Chris Wilson 628b68f3a0 sna/gen2,3: Replace stale bo replacement with simple asserts
The surface creation routines should ensure that the minimum pitch
alignments are met. However, when rendering to a CPU bo, the pitch is
not under our control so we need to be more careful.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-10 12:49:24 +00:00
Chris Wilson 6c91ec2980 sna: Set minimum pitch alignment to 8 bytes
This prevents render corruption on gen3 and should not adversely affect
BLT pitch requirements or other GPUs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-10 12:38:35 +00:00
Chris Wilson ade25f4f95 sna: Only discard READ hint for TearFree copy iff it subsumes the pixmap
Remembering that the target window may be smaller than its backing
pixmap.

Reported-by: Andreas Klauer <Andreas.Klauer@metamorpher.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72430
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-09 10:51:28 +00:00
Chris Wilson a66db75bf3 sna: Fallback gracefully when redisplaying after a GPU hang
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-09 10:51:28 +00:00
Chris Wilson cf89fb8b73 sna: Simplify kgem_bo_can_map()
Remove the attempt to trick us into mapping large bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-08 16:36:32 +00:00
Chris Wilson 46256fa5a0 sna: Pass MOVE_READ for partial TearFree move-to-gpu
When fixing up a pending shadow pageflip for TearFree, we must tell it
that it needs to flush the damage for a partial move-to-gpu. Even though
the current area does not read from the destination, the move-to-gpu
callback is a global pass, and we need to assume the worst for the
region outside of the target.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72343
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-05 16:16:02 +00:00
Chris Wilson 693c1343ed sna: OsRegisterSigWrapper was only introduced in 1.6.99.900
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-05 11:09:39 +00:00
Chris Wilson ba9a173d81 configure: Correct closing ']'
Too many closed, too few opened.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-05 11:06:59 +00:00
Chris Wilson 845b03ac11 sna: Compilation fixes for squeeze
Older version of glibc and valgrind require a slight massage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-05 11:00:44 +00:00
Chris Wilson bd22abee8f sna: Update Baytrail VSync logic
My current best guess at the glaring hole in the spec that is
synchronisation to vertical refresh.

Note that this leaves VSync disabled for BYT for now as it is
ineffective - but at least it now doesn't hang!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69869
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-04 22:47:09 +00:00
Chris Wilson 6c37ab3ddc sna: Print detected GPU first
This should make the GPU identification easier to find in future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-04 11:58:02 +00:00
Chris Wilson 255025d8d3 intel: Tidy up driver identification string
Split the identification strings between the older integrated graphic
chipsets and the more recent integrated processor graphics. This helps
to emphasis the recent branding and should reduce confusion about which
processors are supported by the driver.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-04 11:56:44 +00:00
Chris Wilson 23f8802857 sna/dri: Always clear the clear hint after pageflipping
commit 3fd116782b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Sep 23 21:03:07 2013 +0100

    sna/dri: Clear the clear hint upon applying DRI damage

missed the short-circuit path for an already all-damaged pixmap - which
is quite common for the clear pixmaps...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72194
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 15:07:41 +00:00
Chris Wilson 0420adfb9d sna/gen2,3: Unmap the old GPU bo when replacing due to render target constaints
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 12:10:23 +00:00
Chris Wilson 3dbf17f00e sna: Mark up an ordinary pixmap for reuse
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 12:10:01 +00:00
Chris Wilson 5a353ed151 sna: More assertions around tracking mapped state
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 12:09:53 +00:00
Chris Wilson 4274110b78 sna: Clear the clear hint after performing a userptr upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 11:03:39 +00:00
Chris Wilson 33f3ddd73d sna: Include Pineview in fence over-allocation checks
When creating the object, we need to take account that fenced regions
in the aperture are in power-of-two sizes and so can be much larger than
the actual object. This includes Pineview, which although is more
relaxed with regards to fence alignment of GPU operations, still imposes
the same restrictions on the fence registers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 09:37:37 +00:00
Chris Wilson 9a8478dae6 sna: Fix stipple offset for drawing into child windows
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:07 +00:00
Chris Wilson 32b942d0ff tests: Exercise stippled fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:07 +00:00
Chris Wilson 463ab7f4fa sna: Fix tile origin for pattern blits
References: https://bugs.freedesktop.org/show_bug.cgi?id=71260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:07 +00:00
Chris Wilson 6889ba38ab sna: Drop forced alignment to 64 on pre-gen4 devices
Some linear GPU bo that we create must be naturally aligned, and the
extra alignment imposed for pure paranoia is counter productive.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:06 +00:00
Chris Wilson 49af22ee55 tests: Exercise tiled fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:06 +00:00
Chris Wilson 3dae8b9715 sna: Dump GTT info if we fail to execute a batch due to ENOSPC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-29 14:47:29 +00:00
Chris Wilson 2497fc332e sna: Fix typo inside DBG message
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:03:39 +00:00
Chris Wilson fd007d9d46 sna/video: Correct handling of cropped images along packed fast path
In particular, it was offseting the read from the source image, but not
correcting the length to read - causing a read from beyond the end of
the source and a segfault.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:00:11 +00:00
Chris Wilson b85051ae48 sna: Fallback from partial to full move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:00:11 +00:00
Chris Wilson faedf266d7 sna: Tidy up an assertion on an uninitialised variable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 14:12:56 +00:00
Chris Wilson 1e382c6ece sna: Harden GetImage for use with very large buffers
That risk causing SIGBUS due to oom.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 14:06:27 +00:00
Chris Wilson 569b06abea sna: Wrap glyph composition with sigtrap handling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:14:27 +00:00
Chris Wilson 974abd0c3a sna: Prefer using userptr for PutImage into large GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:54 +00:00
Chris Wilson 64f1fbb465 sna: Tidy a split conditional in an picture upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:29 +00:00
Chris Wilson 1200aae481 sna: Wrap image upload with sigtrap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:06 +00:00
Chris Wilson 0fb7c366a5 sna: Add a few more refcnt asserts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 22:06:27 +00:00
Chris Wilson d65b57cd33 intel-virtual-output: Trim remote framebuffer to fit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 12:59:25 +00:00
Chris Wilson dd7c556072 intel-virtual-output: Workaround mutter always using the same timestamp
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 12:57:09 +00:00