Commit Graph

3287 Commits

Author SHA1 Message Date
Krzysztof Halasa bfba6d6148 Allow interlaced modes.
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-21 22:57:36 +01:00
Zhenyu Wang f63c7df686 Disable swap buffer wait on Sandybridge
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-17 16:39:12 +08:00
Chris Wilson 55b5fe8880 Add alternate pci-id for B43
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-16 16:51:59 +01:00
Chris Wilson 08c2caca48 uxa: Apply source clipping to blits
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-13 01:10:48 +01:00
Chris Wilson ae160d7fbf shadow: Simply modify the Screen pixmap header
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-10 13:19:12 +01:00
Chris Wilson 0515256490 display: Free the EDID blob after we copy it to the output, not before.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-10 00:08:58 +01:00
Chris Wilson 2b96c18165 Enable a shadow buffer and disable GPU acceleration.
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-08 13:33:37 +01:00
Jesse Barnes 0fa4321a76 KMS: initialize backlight support for eDP panels too
Since being able to control the backlight is handy.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-09-07 13:56:16 -07:00
Jesse Barnes f56c839f30 KMS: rename LVDS fields to reflect actual usage
These are used for panels, not just LVDS connections, so name them as such.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-09-07 13:53:47 -07:00
Jesse Barnes 0d26d950fd KMS: add fake EDID on eDP too
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-07 13:48:59 -07:00
Chris Wilson 273d34fbc4 display: Query current level after finding max value.
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 38f940dfea.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-07 13:00:23 +01:00
Zhenyu Wang 53767cc0d0 Add more sandybridge graphics device ids
New ids for GT2 and GT2+ on desktop and mobile sandybridge, and
server sandybridge device ids.
2010-09-07 14:17:05 +08:00
Chris Wilson 00f6af2c8e display: Set MONITOR_EDID_COMPLETE_RAWDATA for large EDIDs
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-04 18:51:32 +01:00
Chris Wilson 501e78b009 Force use of GTT and fence registers for mapping tiled objects
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-09-04 12:37:39 +01:00
Chris Wilson b7a8087fbc Revert "Leave adjustment of backlight to the driver."
This reverts commit 9c3e34703d.

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-26 00:59:33 +01:00
Chris Wilson 68a5ad497b uxa: Fallback if faced with large A1 glyphs.
Rather than assert, we should fixup the use of large A1 glyphs. However,
the simplest approach is to simply fallback to s/w.

Fixes:

  Bug 29430 - [UXA] Crash due assert (uxa_pixmap_is_offscreen(src_pixmap));
  https://bugs.freedesktop.org/show_bug.cgi?id=29430

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-25 15:01:50 +01:00
Chris Wilson 9c3e34703d Leave adjustment of backlight to the driver. 2010-08-25 15:01:41 +01:00
Zhenyu Wang 104cd0554b Add sandybridge D0 support
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-08-23 09:48:22 +08:00
Chris Wilson 271dda84be display: Use the native intel backlight controller
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-22 19:57:24 +01:00
Chris Wilson 42312bbd8c Remove accel_pitch_alignment
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-22 09:54:18 +01:00
Matt Turner 7f86e5b5da Replace ROUND_* macros with ALIGN.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22 09:52:54 +01:00
Matt Turner b611bced15 Use ALIGN macro instead of open coding it.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-22 09:52:42 +01:00
Chris Wilson 8b04b350a9 Open-code DRICreatePCIBusID()
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-19 20:05:08 +01:00
Chris Wilson c882f6a22a Move registration of vsync fd from pre-init to screen-init
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-18 10:21:22 +01:00
Chris Wilson 19c48d3b3f display: outputs are enabled automatically by KMS
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-09 10:13:58 +01:00
Chris Wilson 6304cb048c display: Minor cleanup for adding extra LVDS modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05 18:17:18 +01:00
Chris Wilson 41ae956435 display: Refactor EDID attachment to output.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-05 18:16:35 +01:00
Chris Wilson a8919ab296 Revert "display: Cache whether we have probed for an EDID"
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 622e600069.
2010-08-05 10:00:56 +01:00
Chris Wilson 622e600069 display: Cache whether we have probed for an EDID
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-04 10:05:09 +01:00
Chris Wilson a6a707ca13 display: Embed the lvds size into the connector
Remove one very common allocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 10:05:09 +01:00
Chris Wilson 6c7d105cca display: Handle cursor error paths.
Check that the cursor was allocated before freeing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 09:51:34 +01:00
Chris Wilson 38f940dfea display: Tidy backlight initialisation
Mostly whitespace and a single error-code fix.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-04 09:50:14 +01:00
Chris Wilson 2b7263b771 display: Check for buffer overrun in output name lookup.
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-04 09:46:01 +01:00
Dave Airlie 5662916691 intel: add output names for later additions to kernel 2010-08-04 15:35:41 +10:00
Chris Wilson fe7dee7fe1 Remove the final references to the drmmode prefix
In particular fix the compile regression for intel_do_pageflip().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01 14:15:09 +01:00
Chris Wilson 4f8b279f32 intel_display: Miscellaneous tidy
A mixture of whitespace and closing of leaks on error paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01 12:35:57 +01:00
Chris Wilson db7cd7b9f0 Rename drmmode_display to intel_display
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-08-01 11:27:29 +01:00
Kristian Høgsberg 0be3e95c84 Remove explicit batchbuffer submit in DRI2 copyregion
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-30 09:39:58 -04:00
Kristian Høgsberg 69d65f9184 Submit batch buffers from flush callback chain
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-30 09:29:55 -04:00
Chris Wilson b68d4fcab5 drmmode: Only treat a backlight as connected if it has a non-zero max
Optimistically might help
https://bugs.freedesktop.org/show_bug.cgi?id=29273

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-28 13:42:15 +01:00
Kristian Høgsberg 938ef4eaec legacy: Remove long gone use of GlxSetVisualConfigs()
This removes the last dependeny on anything GL/GLX in the driver.
2010-07-28 07:58:02 -04:00
Kristian Høgsberg fba6651a92 Drop use of GL types in the driver
Still used in i810 for building the glx visuals.
2010-07-27 12:59:53 -04:00
Jesse Barnes 34b9d45be6 Revert "configure.ac: add xi and gl requirements"
This reverts commit d580fa82a1.

Oops, these should be server or other package dependencies, we don't
actually need them for xf86-video-intel.
2010-07-27 09:10:04 -07:00
Jesse Barnes d580fa82a1 configure.ac: add xi and gl requirements
Could probably be earlier versions, but having these here makes packaging
easier.
2010-07-26 16:44:19 -07:00
Daniel Vetter f46a8dfce5 video: kill do { ... } while (ret != -EINTR) loops
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-26 23:02:02 +02:00
Daniel Vetter 1cb69b9a77 video: kernel overlay needs triple buffering
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-26 23:00:20 +02:00
Gaetan Nadon 68df6b2790 simplify Makefile as per-target compilation flags are not needed
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-24 09:21:02 -04:00
Gaetan Nadon 0ae30b6d1f config: add comments for main statements 2010-07-22 15:22:11 -04:00
Gaetan Nadon b12b221967 config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon 8b2d65da41 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00