Commit Graph

3276 Commits

Author SHA1 Message Date
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
Gaetan Nadon 3feeef5294 config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon 74a828e286 config: complete AC_INIT m4 quoting
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon 33ec66d700 config: remove unrequired AC_SUBST([DRI_CFLAGS])
This macro is called by PKG_CHECK_MODULES

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon b20b8ac937 config: remove unrequired AC_HEADER_STDC
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon 9fe5169fff config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:11 -04:00
Gaetan Nadon e6b8811e5b config: update AC_PREREQ statement to 2.60
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-22 15:22:10 -04:00
Gaetan Nadon 2d85efaa36 config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.
2010-07-22 15:22:10 -04:00
Chris Wilson 142ffa2872 video/i915: ValidateGC after setting clip.
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-22 16:49:05 +01:00
Chris Wilson c57840b272 uxa: Check for failed pixmap allocation
Fixes:

  Bug 29187 - crash in intel_drv
  https://bugs.freedesktop.org/show_bug.cgi?id=29187

Backtrace:
0: /usr/bin/X (xorg_backtrace+0x28) [0x466808]
1: /usr/bin/X (0x400000+0x67c79) [0x467c79]
2: /lib/libpthread.so.0 (0x7ff19b297000+0xef60) [0x7ff19b2a5f60]
3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7ff197986000+0x34684) => uxa/uxa-render.c:841

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-21 09:08:28 +01:00
Dave Airlie 7a4bfaf424 intel: respect tiling disable.
For testing purposes its nice to know tiling isn't being used anywhere.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-20 11:31:48 +10:00
Chris Wilson d48d584a82 video: Free the buffers immediately after turning off.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-16 10:31:58 +01:00