summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-02-14sna: Inherit the native rotation on initial output probingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-14sna: Reorganise native rotation ioctls to compile on old LinuxChris Wilson
It is not just the BSDs that lack these ioctls in their userspace headers, but everything older than about a year... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-14sna: Guard use of DRM_MODE_OBJECT type idsChris Wilson
These are not currently exported on OpenBSD and cause the build to fail. Hide their use behind an ifdef guard for the time being. "I noticed the following when trying to compile xf86-video-intel git on OpenBSD: /usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: 'DRM_MODE_OBJECT_CRTC' undeclared (first use in this function) /usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: (Each undeclared identifier is reported only once /usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: for each function it appears in.) /usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2107: error: 'DRM_MODE_OBJECT_PLANE' undeclared (first use in this function)" Reported-by: Jonathan Gray Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-14sna: Check that the backlight interface is in sysfs before accessChris Wilson
Before we write values into the file, we want to be sure that it is our sysfs backlight interface, and not some ordinary file we are about to destroy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Increase the acceptable screen size rangeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Filter out requests to create a 0x0 frontbufferChris Wilson
Attempting to create a 0x0 frontbuffer results in erroneous pixmap generation, and is liable to explode at a random point in future, so just reject it outright. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Fix comparison of previous BLT commandsChris Wilson
After altering the command bits to accommodate Broadwell, we needed to fixup the comparison of previous BLT commands to detect overwritten commands. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13uxa: Check for access to backlight interfaceChris Wilson
Before attaching properties to any connector, check that we can indeed control the backlight through the sysfs interface by doing an access check. If the xserver is started without root privileges, we cannot write through /sys/class/backlight and so should take care not to advertise that we can. Reported-by: Hans de Geode <hdegeode@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Check for access to backlight interfaceChris Wilson
Before attaching properties to any connector, check that we can indeed control the backlight through the sysfs interface by doing an access check. If the xserver is started without root privileges, we cannot write through /sys/class/backlight and so should take care not to advertise that we can. Reported-by: Hans de Geode <hdegeode@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Clear DPMS tracking on VT switchChris Wilson
Assume the worst and force us to reset the property when we restore control. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Extend native rotation support to spritesChris Wilson
The sprite plane can be independently rotated to the CRTC primary plane. To rotate the sprite plane, we just set a property on the plane similar to how we rotate the CRTC, so we can refactor them together to use the same routines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Enable coordinate transforms for native CRTC rotationChris Wilson
Otherwise X tells Clients that the cursor is still in the unrotated location when it appears rotated on the display. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13Revert "uxa: Do not change DPMS mode on unconnected outputs"Chris Wilson
This reverts commit 4497212307dee5e35bc6836201738a2fdb559020. Unfortunately, this simple fix does not work for UXA as DPMS is used by the xserver to turn off CRTCs and outputs. Since UXA does not implement CRTC DPMS, this commit causes us to fail to turn off outputs. The kernel has been fixed up in the meantime and that commit has been recommended to be backported to all stable kernels: commit c9976dcf55c8aaa7037427b239f15e5acfc01a3a Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Sep 29 19:15:07 2013 +0100 drm/i915: Only apply DPMS to the encoder if enabled so it should be safe for UXA to rely on its old behaviour. Bugzilla: https://code.google.com/p/chromium/issues/detail?id=341135 References: https://bugs.freedesktop.org/show_bug.cgi?id=68030 Suggested-by: Dominik Behr <dbehr@google.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Always assign a name to the modesChris Wilson
In some cases, such as querying the mode from the CRTC, we may not have a name associated with the mode. However, RandR always expects a valid name. To satisfy this requirement, always generate the canonical mode name if no other is specified. References: https://bugs.freedesktop.org/show_bug.cgi?id=70132 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12sna/gen5: Flush the render cache between operationsChris Wilson
When we change the blend mode between operations, it appears that we must flush the render cache or else we risk render corruption. This is usually noticeable in rendering of single glyphs. This was originally fixed for bug 51422, but was reintroduced by commit 37eb7343be1aeeb90a860096756603a577df1a77 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sat Dec 1 09:40:11 2012 +0000 sna/gen5: Inspired by gen4, reorder the flushing and the desire to reduce the impact of this w/a. Reported-by: itumaykin@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74882 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12sna: Support native primary plane rotationsChris Wilson
Use the display hardware for simple rotations, when exported through the rotation property on the CRTC. As the kernel support is not yet merged upstream, the feature is hidden behind --enable-rotation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12Revert "sna/gen6: Serialise write to DERRMR register using STORE_REGISTER_MEM"Chris Wilson
This reverts commit 2a5ad9c015bbb41550536dd3cf4ad18b7f21fd80. Oops, pushed from the wrong machine and merged in a incomplete bugfix branch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12sna/gen5: Use the DBG option ALWAYS_FLUSH to force a full flushChris Wilson
When flushing between operations, we can choose between doing a full flush to memory, or just a pipeline flush. For debugging it is better to do the full flush to rule out cache effects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12Merge branch 'master' of hsw:/usr/src/xf86-video-intelChris Wilson
2014-02-12sna/gen5: Add a DBG option to force flushes between operationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12sna: Retrieve tiling for fbconChris Wilson
Yikes, there appear to be tiled fbcon framebuffers on the horizon. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12sna: Delete redundant branchChris Wilson
The MOVE_READ else branch is repeated immediately below when marking up damage for MOVE_WRITE, so remove it for simplicity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-11Merge branch 'master' of hsw:/usr/src/xf86-video-intelChris Wilson
2014-02-11sna: Defer move-to-gpu until we need to transfer GPU damage to CPUChris Wilson
When preparing a pixmap for CPU rendering, one of the last steps is to copy the outstanding GPU damage back to the CPU. Currently, we flush any outstanding pageflips (for TearFree) and in the process accidentally destroy the shadow buffer if there is no outstanding GPU damage. Rearrange the code to avoid tripping over that by only processing the move-to-gpu if we need to touch the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-11sna/gen6: Serialise write to DERRMR register using STORE_REGISTER_MEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-10sna: Remove damaged region after converting CPU bo to GPU boChris Wilson
Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-10sna: Check for overwriting damage before applying clearChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-10sna: Clear GPU damage flag for 1x1 writes onto a clear bufferChris Wilson
An optimisation for 1x1 reads of a clear buffer lead to a bug whereby the damage for a 1x1 write would not be tracked correctly (conflicting full GPU damage vs partial CPU damage). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-10sna/gen6: Restore stall dropped when not flushing insteadChris Wilson
commit 82e6d41c2f4f343bd1854d3d8ee4b624b5d68971 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Oct 31 13:35:59 2013 +0000 sna/gen6: Tweak flush around CC state changes Replaced the pipeline stall with a flush - but only when the target was dirty. The missing stall however seems to be required as well. v2: Actually emit the stall for all CC state changes [Ilia Mirkin] Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72375 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-06sna: And clear drawable->id on reused pixmapsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=74550 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-06uxa: Do not expose TextureVideo Xv adapters when acceleration is disabledChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-06sna: Add some DBG to clarify the source pixmap (for tiles)Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-06sna: Reset composite offsets when reusing freed pixmapsChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74550 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-05sna: Add some DBG around tiled bltsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=74550 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-05sna: Pass read hints from move-to-cpu to wait_for_shadowChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-04sna: Tweak assert_bo_retired() to be callable on cached boChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=73406 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-04sna: Rearrange assertion to ease use of substitute cached boChris Wilson
Since we call kgem_bo_submit() along one path when synchronising a cached bo (which is known to be inactive) but still want to keep the assertion on the refcnt, simply rearrange the code to only assert on the active path. References: https://bugs.freedesktop.org/show_bug.cgi?id=73406 Reported-by: Matti Hamalainen <ccr@tnsp.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-04sna/gen4: Disable use of pipecontrol invalidates againChris Wilson
One day, just not today, we may make gen4 work correctly, efficiently and fast. Today, we can barely pick one. References: https://bugs.freedesktop.org/show_bug.cgi?id=55500 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-04sna/glyphs: Reset composite state between switching glyph formatsChris Wilson
One path uses the mask channel, the other does not. We cannot rely on overwriting all reused state in this case, and so we must clear the composite state prior to use each time. Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74494 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
2014-02-03sna/gen4,5: Fix setting pipe control cache flush bitsEdward Sheldrake
Cache flush bits are on dword 0, not 1, on gen4 and gen5. Also texture cache invalidate is only available from Cantiga onwards.
2014-02-02sna: Reconstruct damage for the partially replaced discarded CPU boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: If IGNORE_CPU is not set we must mark the move as MOVE_READChris Wilson
Logic reversal in discarding CPU damage. An old bug revealed by the more aggressive attempts to discard CPU damage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Add some more DBG for choosing render targetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Skip discarding CPU bo when using as a render targetChris Wilson
The issue with unwanted serialisation does not affect the async move-to-cpu of a render target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Allow more inplace promotions of CPU to GPU boChris Wilson
If the CPU bo is wholly damaged, then it makes an ideal candidate for simply converting into the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Undo region translation before returningChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Apply drawable offsets to partial CPU damage being replacedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Don't discard the GPU prior to using it for stashing CPU damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Remark the region as damaged after uploading the rest to the GPUChris Wilson
If we upload outside of the replaced region to the GPU, we need to remark the region of operation as dirty. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Only discard CPU damage for an replacing regionChris Wilson
When considering move-region-to-cpu, we need to take into account that the region may not replace the whole drawable, in which case we cannot simply dispose of an active CPU bo. Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reported-by: Conley Moorhous <conleymoorhous@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74327 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>