summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-09-26Retry framebuffer allocation if first attempt fails.Chris Wilson
If we are tiled, we may fail the allocation due to an EIO and so not being able to set tiling. Try again with an untiled request in this case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-26Disable dri2 after forcing fallbacksChris Wilson
If we force fallbacks, then we will only create pixmaps in system memory, preventing DRI2 from passing valid bo names to the clients. In this case, they will just fallback to swrast. If we disable DRI2 after forcing fallbacks (e.g. regenerating after a GPU hang or explicitly disabled with the shadow buffer) then it is simpler just to disable the extension and allow mesa to use pure swrast. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-22Make driver compile for 1.6 Xserver series again.Matthias Hopf
Signed-off-by: Matthias Hopf <mhopf@suse.de>
2010-09-22display: Refactor is_panel()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-21Allow interlaced modes.Krzysztof Halasa
This may not the best method, but it should be a good base on which to build... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-17Disable swap buffer wait on SandybridgeZhenyu Wang
MI_LOAD_SCAN_LINE_INCL command is not available on sandybridge. I haven't got reply on any substitution for it, so turn it off for now. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-09-16Add alternate pci-id for B43Chris Wilson
Confirmed by http://en.wikipedia.org/wiki/Intel_GMA Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30221 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-13uxa: Apply source clipping to blitsChris Wilson
Yes, this should be done in the higher layers. Yes, I have written code to that. No, it is not ready, hence add the sanity check to the SRC_COPY_BLT. This isn't the first report that I've seen, but will be the last. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30120 Reported-by: rezbit.hex@gmail.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-10shadow: Simply modify the Screen pixmap headerChris Wilson
This is a slightly less risky strategy than having to remember to update all pointers to the old Screen pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-10display: Free the EDID blob after we copy it to the output, not before.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-08Enable a shadow buffer and disable GPU acceleration.Chris Wilson
An attempt to workaround the incoherency in gen2 chipsets, we avoid using dynamic reallocation as much as possible. The first step is to disable allocation of pixmaps using GEM and simply create them in system memory without a backing buffer object. This forces all rendering to use S/W fallbacks. The second step is to allocate a shadow front buffer and assign that to the Screen pixmap. This ensure that the front buffer remains in the GTT and pinned for scanout. The shadow buffer will be rendered to in the normal fashion via the Screen pixmap, and be marked dirty. In the block handler, the dirty shadow buffer is then blitted (using the GPU) over the front buffer. This should completely avoid having to move pages around in the GTT and avoid incurring the wrath of those early chipsets. Secondly, performance should be reasonable as we avoid the ping-pong caused by the small aperture and weak GPU forcing software fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-07KMS: initialize backlight support for eDP panels tooJesse Barnes
Since being able to control the backlight is handy. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-09-07KMS: rename LVDS fields to reflect actual usageJesse Barnes
These are used for panels, not just LVDS connections, so name them as such. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-09-07KMS: add fake EDID on eDP tooJesse Barnes
This gives us a few more standard modes on eDP panels with just a simple fixed timing in the VBT, just like on older, LVDS attached panels. Fixes FDO bug https://bugs.freedesktop.org/show_bug.cgi?id=30069. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Manoj Iyer <manoj.iyer@canonical.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-09-07display: Query current level after finding max value.Chris Wilson
The current backlight value is clamped to the valid range [0, max] and so as we queried the value before setting the max, we forced the current backlight to 0 and so set it to be zero on initialising the display. Fixes: Bug 30063 - start X will modify brightness value to zero https://bugs.freedesktop.org/show_bug.cgi?id=30063 which is a regression due to 38f940dfea494d3093236f065392c431be06ae6e. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-07Add more sandybridge graphics device idsZhenyu Wang
New ids for GT2 and GT2+ on desktop and mobile sandybridge, and server sandybridge device ids.
2010-09-04display: Set MONITOR_EDID_COMPLETE_RAWDATA for large EDIDsChris Wilson
Quoting Adam Jackson: "But the X driver looks like it never sets MONITOR_EDID_COMPLETE_RAWDATA, which means the X core doesn't know that any sections beyond the first are present, so it won't ever hand back more than 128 bytes to clients. Boo." This patch is based on his. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-04Force use of GTT and fence registers for mapping tiled objectsChris Wilson
If the buffer object is tiled, we need to use the fence registers to perform the appropriate untiling for CPU access. Ensure that we always take this path for tiled objects, regardless of their size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-26Revert "Leave adjustment of backlight to the driver."Chris Wilson
This reverts commit 9c3e34703dcdc2155faeb2c1886930def19d9989. This commit is not ready, as first the driver needs to handle all controllers, especially those that ignore the BLC and require their own interface. Fortunately, by moving that discovery into the kernel - where it just means finding which ACPI device is attached to the video and has a backlight interface - the userspace code should become much more sane, and work even with multi-gpu, multi-lid systems. But that is for tomorrow.
2010-08-25Leave adjustment of backlight to the driver.Chris Wilson
2010-08-23Add sandybridge D0 supportZhenyu Wang
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-08-22display: Use the native intel backlight controllerChris Wilson
If the i915 driver exposes a native ACPI interface to modify the panel backlight use it in preference to the generic interfaces. On multi-GPU systems, the panel backlight is meant to be connected via the IGP and this ensures that we always find the right interface. Fixes: Bug 29273 - XORG Intel driver chooses wrong acpi_video to control brightness in multi-GPU system https://bugs.freedesktop.org/show_bug.cgi?id=29273 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22Remove accel_pitch_alignmentChris Wilson
This has to be 64 on all generations currently, so replace the variable with a constant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22Replace ROUND_* macros with ALIGN.Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22Use ALIGN macro instead of open coding it.Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-19Open-code DRICreatePCIBusID()Chris Wilson
During -configure we would attempt to query the availablility of KMS before the DRI module was loaded, thus we were unable to create a valid bus identifier and so the query failed and we disowned the device. Fixes: Bug 29611 - Xorg -configure fails https://bugs.freedesktop.org/show_bug.cgi?id=29611 Reported-by: Sergey Samokhin <prikrutil@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-18Move registration of vsync fd from pre-init to screen-initChris Wilson
Marty Jack reported an issue he found where the page-flipping handler was being lost on server reset. This results in the swap completion notification being lost, with the sporadic hang of full screen applications like Compiz, flash and even glxgears! Fixes: Bug 29584 - Server in compute loop https://bugs.freedesktop.org/show_bug.cgi?id=29584 There are also several possibly related bugs with similar symptoms, i.e. OpenGL applications hanging on missed swap notifications. Reported-by: Marty Jack <martyj19@comcast.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Keith Packard <keithp@keithp.com>
2010-08-09display: outputs are enabled automatically by KMSChris Wilson
When an output is attached to a crtc and that crtc is enabled, the output is automatically enabled so we can remove the redundant manual dpms on. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05display: Minor cleanup for adding extra LVDS modesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05display: Refactor EDID attachment to output.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05Revert "display: Cache whether we have probed for an EDID"Chris Wilson
Dave Airlie advised that hotplug detection can be unreliable and that mode caching, in general, should be done in the kernel in any case. This reverts commit 622e600069ab0efd22586c7a71eecbd4baf21c40.
2010-08-04display: Cache whether we have probed for an EDIDChris Wilson
Remember for the detection cycle whether we have already probed for the EDID -- as this can be slow. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04display: Embed the lvds size into the connectorChris Wilson
Remove one very common allocation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04display: Handle cursor error paths.Chris Wilson
Check that the cursor was allocated before freeing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04display: Tidy backlight initialisationChris Wilson
Mostly whitespace and a single error-code fix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04display: Check for buffer overrun in output name lookup.Chris Wilson
The kernel may know about more types than we do, so protect ourselves from reading from beyond the end of the string array. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04intel: add output names for later additions to kernelDave Airlie
2010-08-01Remove the final references to the drmmode prefixChris Wilson
In particular fix the compile regression for intel_do_pageflip(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01intel_display: Miscellaneous tidyChris Wilson
A mixture of whitespace and closing of leaks on error paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01Rename drmmode_display to intel_displayChris Wilson
And fixup all the drmmode_* functions to have an intel prefix and categorise those into intel_mode, intel_crtc, intel_output and intel_property so that the functions are a little more self-descriptive and, more importantly, are consistent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-30Remove explicit batchbuffer submit in DRI2 copyregionKristian Høgsberg
Now that we submit from the flush callback chain, we know we'll always submit before the client receives the reply or event that blocks it from rendering the next frame.
2010-07-30Submit batch buffers from flush callback chainKristian Høgsberg
There are a few cases where the server will flush client output buffers but our block handler only catches the most common (before going into select). If the server flushes client buffers before we submit our batch buffer, the client may receive a damage event for rendering that hasn't happened yet. Instead, we can hook into the flush callback chain, which the server will invoke just before flushing output. This lets us submit batch buffers before sending out events, preserving ordering. Fixes 28438: [bisected] incorrect character in gnome-terminal under compiz https://bugs.freedesktop.org/show_bug.cgi?id=28438 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-07-28drmmode: Only treat a backlight as connected if it has a non-zero maxChris Wilson
Optimistically might help https://bugs.freedesktop.org/show_bug.cgi?id=29273 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-28legacy: Remove long gone use of GlxSetVisualConfigs()Kristian Høgsberg
This removes the last dependeny on anything GL/GLX in the driver.
2010-07-27Drop use of GL types in the driverKristian Høgsberg
Still used in i810 for building the glx visuals.
2010-07-26video: kill do { ... } while (ret != -EINTR) loopsDaniel Vetter
Chris Wilson likes to sprinkle these all over, but in this case it's just misleading. libdrm already does this for us. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-07-26video: kernel overlay needs triple bufferingDaniel Vetter
The kernel overlay code does asynchronous overlay flips. So keep onto two old buffers, for otherwise the rendering of the next frame might overwrite the contents of the currently still displaying one. With ~25fps videos and ~50 Hz screens that's rather unlikely, still, fix it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-07-24simplify Makefile as per-target compilation flags are not neededGaetan Nadon
Per-target compilation flags (libIntelXvMC_la_CFLAGS) are required when multiple targets which require different compiler flags, are build in the same makefile. Automake issues a command with -c and -o flags which not all compilers support. The object fles are prefixed with libIntelXvMC_la. The macro AM_PROG_CC_C_O must then be used to provide this feature on compilers that do not have it. If not, a warning is issued at make time. This macros checks for compiler support and if missing, uses a "compile" script it generates in the package root directory. Currently the driver uses per-target flags but the macro is missing. Rather than adding the macro, this patch stops using per-target flags by using the AM_CFLAGS variable for all targets in the makefile, as there is only one. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22video/i915: ValidateGC after setting clip.Chris Wilson
Order is important. And ensure that the scratch GC is performing clip by children. Fixes: Bug 29213 - video artifacts if used dualscreen mode https://bugs.freedesktop.org/show_bug.cgi?id=29213 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-20intel: respect tiling disable.Dave Airlie
For testing purposes its nice to know tiling isn't being used anywhere. Signed-off-by: Dave Airlie <airlied@redhat.com>