Commit Graph

3244 Commits

Author SHA1 Message Date
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
Chris Wilson 24bdfe0d5e video: Reuse the old buffers.
After passing the new buffer to the kernel, the old buffer is unpinned
and becomes available for re-use. So keep hold of the old buffer and
swap after a PutImage. This greatly reduces the amount of CPU time
consumed by the kernel on behalf of the video overlay -- by only
allocating two buffers for an entire sequence, we avoid clflushing and
page allocation on every frame.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-16 10:31:58 +01:00
Chris Wilson 2267e5928b Workaround a broken container_of define in list.h 2010-07-13 10:36:34 +01:00
Chris Wilson 798c3a5fc6 Teardown the bufmgr on shutdown as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-13 10:30:51 +01:00
Chris Wilson b2e98227d1 Remove the duplicate drmmode prototypes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-13 10:15:34 +01:00
Chris Wilson 5de1b74d64 modes: There may be more than one crtc and output... DESTROY THEM ALL!
In order to cleanup all CRTCs and outputs on shutdown, we need to keep a
list of the individual structures and iterate over that list on
shutdown.

Also, the output and crtcs are configured just once and not for each
screen generation so move the shutdown to the termination and not on
CloseScreen. Oops.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-13 10:09:38 +01:00
Chris Wilson 3a7c25ff8d video: Apply overlay stride errata for i830 and i845
Due to an erratum on these chipsets, the overlay stride must be a
multiple of 256 bytes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-12 19:47:46 +01:00
Chris Wilson 56e5816252 video: Copy DummyEncoding into each adapter.
As we use the static DummyEncoding and may attempt to modify it for each
adaptor (on each device), we should use copies instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-12 17:40:55 +01:00
Keith Packard e30f0338fb Destroy screen pixmap on screen close.
This avoids a memory leak on server reset.

Signed-off-by: Keith Packard <keithp@keithp.com>
[ickle: Added comments from Keith that explain the necessity of
destroying the pixmap ourselves and why chaining up in this instance is
not the correct approach.]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-12 17:40:55 +01:00
Fernando Carrijo 6e08b0f48f Purge macro NEED_EVENTS
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-09 20:49:13 -07:00
Chris Wilson 5ce3f536b7 drmmode: Destroy the output on shutdown
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 14:12:43 +01:00
Chris Wilson 6ff369cd26 drmmode: Destroy Crtc on screen shutdown
Should fix:

  Bug 26946 - CRTC cursor BO leak in 2D
  https://bugs.freedesktop.org/show_bug.cgi?id=26946

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 14:12:25 +01:00
Chris Wilson 6fba8c449f Add support for I854.
I spotted that the kernel knew of the I854, but the pci-id was never
added to the ddx.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 12:12:13 +01:00
Chris Wilson 141e88c873 video: forgotten amendment to previous commit.
An extra sanity check to skip the wait if all clipped...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 12:12:00 +01:00
Chris Wilson 272d1c14a3 video: apply the crtc box checks from dri.
The dri code is much more careful in ensuring that the scan lines that
is waits for are valid. Copy this code to video, with a bit of work this
can be refactored, and perhaps even teach dri how to handle rotated
front buffers.

References:

  Bug 28964 - [i965gm] GPU infinite MI_WAIT_FOR_EVENT while watching video
              in Totem
  https://bugs.freedesktop.org/show_bug.cgi?id=28964

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 10:50:52 +01:00
Evan McClain 75850e824b Add mbp_backlight support.
Acked-by: Julien Cristau <jcristau@debian.org>
2010-07-05 17:08:35 +01:00
Dave Airlie a2aa4c23f6 uxa: oops typo in previous commit 2010-07-05 14:02:42 +10:00
Dave Airlie feff2ec80e uxa: don't compare planemask with FB_ALLONES.
planemask is an unsigned long initialised to ~0, on 64-bit this is not equal
to an (unsigned int)-1.

Use the macro provided to do this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-05 09:07:08 +10:00
Jesse Barnes 7ad9c0bebf add cscope files to gitignore 2010-07-02 12:39:27 -07:00
Chris Wilson afcd41820d Reduce front buffer stride prior to rejection
If we reject the front buffer because it has too large a stride, repeat
the allocation using untiled for the cases where we can utilize laxer
hardware restrictions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-01 22:10:49 +01:00
Chris Wilson f8778b66a9 drmmode: Add missing newlines at the end of log messages.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-01 21:58:43 +01:00
Chris Wilson 690fbd1a64 drmmode: Use a copy of the converted mode on resize
Avoid a potential use-after-free of the copied mode string by reusing
the converted kernel mode on resize.

==19897== Invalid read of size 8
==19897==    at 0x661C330: ??? (strcpy.S:1308)
==19897==    by 0x8618AE7: drmmode_set_mode_major (drmmode_display.c:293)
==19897==    by 0x8618E6F: drmmode_xf86crtc_resize (drmmode_display.c:1299)
==19897==    by 0x529A77: xf86RandR12ScreenSetSize (xf86RandR12.c:708)
==19897==    by 0x4BD528: ProcRRSetScreenSize (rrscreen.c:301)
==19897==    by 0x42B820: Dispatch (dispatch.c:432)
==19897==    by 0x4254C9: main (main.c:289)
==19897==  Address 0x72e91e0 is 0 bytes inside a block of size 9 free'd
==19897==    at 0x4C23DBC: free (vg_replace_malloc.c:325)
==19897==    by 0x48424F: xf86DeleteMode (xf86Mode.c:1921)
==19897==    by 0x4942B7: xf86ProbeOutputModes (xf86Crtc.c:1572)
==19897==    by 0x5290BB: xf86RandR12GetInfo12 (xf86RandR12.c:1551)
==19897==    by 0x5313AE: RRGetInfo (rrinfo.c:202)
==19897==    by 0x4BCCAA: rrGetScreenResources (rrscreen.c:337)
==19897==    by 0x42B820: Dispatch (dispatch.c:432)
==19897==    by 0x4254C9: main (main.c:289)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-01 21:55:04 +01:00
Chris Wilson 772f8236d5 dri: Handle errors during GetBuffers() gracefully.
Unwind the array of Pixmaps already allocated and report failure for the
old dri GetBuffers() path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-30 13:58:05 +01:00
Chris Wilson 17884af4ed Repair the damage to 'make distcheck' after splitting out i810
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-28 17:44:45 +01:00
Chris Wilson 28c0ca676c Remove unused inclusion of <sys/mman.h>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:40:22 +01:00
Chris Wilson 2306e675c4 configure: Remove check for unused function, mprotect
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:32:02 +01:00
Chris Wilson 6695296ca2 configure: Remove unused checks for xext
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:31:11 +01:00
Chris Wilson 5c663ce844 Rename common infrastructure to the intel namespace.
After splitting out the i810 driver into its own legacy directory, we
can identify the common routines not as i830 but as intel. This
clarifies the code which *is* i830 specific.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:18:01 +01:00
Chris Wilson 797d173a9a i810: Move into a legacy directory.
The driver is still built but is no longer under active development so
move it and supporting files to a new directory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:18:01 +01:00
Chris Wilson cd61531a78 Remove unused configure option: --enable-video-debug
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 12:44:25 +01:00
Carl Worth ca16e31336 Update version to 2.12.0
For the imminent 2.12.0 release.
2010-06-24 14:07:15 -07:00
Carl Worth 8caf1564a7 NEWS: Add notes for the 2.12.0 release.
Let it ship!
2010-06-24 14:06:43 -07:00
Chris Wilson b58a6a39c1 uxa: Fallback to pixman if source is out-of-bounds
If the source is outside the drawable, then CopyArea will fail to
initialise the source correctly. The simplest fix in this case is to
fallback to pixman to generate the source texture.

Fixes:

  Bug 28497 - Graphics corruption after opening a specific website
  https://bugs.freedesktop.org/show_bug.cgi?id=28497

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-23 23:56:44 +01:00