Commit Graph

2167 Commits

Author SHA1 Message Date
Vincent Mussard 05ff561234 quirk for AOpen MP45 2009-01-24 08:33:16 +08:00
Eric Anholt fbf003ef27 Move i965 render sampler state to BOs.
This eliminates the pinned memory allocation for 965 render state.
2009-01-21 14:50:58 -08:00
Eric Anholt befd4ad8be Move i965 render kernels to BOs. 2009-01-21 14:50:58 -08:00
Eric Anholt 5d705de5d1 Move 965 render unit state to BOs.
This is a first step in a series of changes to avoid requiring a pinned object,
which gets in the way of doing non-root KMS.  This change appears to result in
about a 2-6% loss in x11perf -aa10text, which better algorithms in libdrm could
make up for (it hasn't really had to deal with code this bad before).
2009-01-21 14:50:58 -08:00
Eric Anholt 64b08ed5ad Remove 965 render wm scratch space, which was just unused. 2009-01-21 14:50:58 -08:00
Eric Anholt f126aabdf8 Fix build with server 1.4.
Debian "unstable" is still stuck with this ancient version.
2009-01-21 12:52:46 -08:00
Jesse Barnes 253b8db298 Don't run in KD_TEXT mode even with KMS
Leaving the VT in KD_TEXT mode keeps the kernel's blanking code active,
so when a DPMS event happens, the fb console is restored rather than X's
configuration.  On the downside it means the kernel won't print messages
in the background, which would be visible if a panic or emergency switch
occurred.  The proper fix here is a new kernel mode, which we can move
to when ready.
2009-01-21 09:02:13 -08:00
Jesse Barnes 131b414feb Tear down batchbuffers unconditionally on LeaveVT
Even if KMS is enabled we should do this, to avoid running batches that
depend on other state we tear down in LeaveVT.
2009-01-21 09:01:05 -08:00
Eric Anholt b6f3ce32e2 Use drm_intel_bo_subdata to put render vb data in.
This improves performance by avoiding repeated map/unmap cycles, which are
a bit expensive on my machine with lock debugging on in the kernel.  It could
do much better if we did more than 18 or so floats at a time.
2009-01-20 10:50:20 -08:00
Eric Anholt 9a8bbb1951 Move i965 render vb setup to use time, and decouple state emit from it.
The require_space had failed since it only checked for the space required
by the batch emits in the function itself, but not in the
i965_emit_composite_state() that it called (the state we were concerned about
having set up for that 12 * 4 dwords to follow!).  This is replaced by
intel_batch_start_atomic(), which will catch such mistakes in the future.
2009-01-20 10:50:20 -08:00
Eric Anholt 3d739597c4 Move i965 render transform setup from emit_composite_state to prepare_composite. 2009-01-20 10:50:20 -08:00
Eric Anholt e20f7278f3 i965: Pull check_aperture out to a separate function and make it dtrt.
Previously it wouldn't count the pixmaps that were about to be used, which
is pretty much the only purpose of having the pain around.  This also
eliminates the check_twice confusion with emit_batch_header_for_composite().
2009-01-20 10:50:20 -08:00
Eric Anholt 013e2adfbf Move filter computation from emit_batch_header to prepare_composite. 2009-01-20 10:50:20 -08:00
Eric Anholt a340fe5e42 Use intel_emit_reloc from video to prettify 965 render bind_bo setup. 2009-01-20 10:50:20 -08:00
Eric Anholt aefe198ca4 Move i965 render state bo setup back to prepare_composite.
We want the objects to be created once per prepare/done both for efficiency and
so we can handle aperture checking better.
2009-01-20 10:50:20 -08:00
Eric Anholt 946c7ef817 Do check_aperture_space and batch_start_atomic for i965 video.
This increases the overhead for video in the presence of cliprects, but we
were already doing nasty things in that case and don't seem to care.  This
could fix potential bad rendering or hangs with video, particularly with
DRI2.
2009-01-20 10:50:19 -08:00
Eric Anholt 7be668179a Move 965 video setup to a separate function so we can move it around. 2009-01-20 10:50:19 -08:00
Owain G. Ainsworth c7db320110 Remove the pageflipping infrastructure.
It was broken on current kernels, and deprecated anyway.
2009-01-20 12:11:01 -05:00
Owain G. Ainsworth c82adfd016 Remove triple-buffering support
It never worked with any upstream linux kernel, and is quite heavily
deprecated. A new solution based around DRI2 will probably be
forthcoming. Pageflipping itself is next.
2009-01-20 12:11:01 -05:00
Kshitij Kulshreshtha ada44c1c0e Support sysfs backlight control for Sony laptops in xf86-video-intel
The sony_laptop kernel module (since v2.6.23) supports backlight control
via the sysfs interface:
/sys/class/backlight/sony

This patch will enable xf86-video-intel to use this backlight control method
for Sony VAIO Laptops with Intel integrated video.
2009-01-20 11:35:36 +08:00
Eric Anholt d89de6d60a Protect i915 textured video against batchbuffer wrapping. 2009-01-17 16:28:12 -08:00
Eric Anholt 15780c53f5 Fix i915 batch_start_atomic counting. 2009-01-17 16:27:50 -08:00
Dave Airlie 1459f794e2 intel: fix DRI2 should be DRI_DRI2 2009-01-17 22:14:26 +10:00
Eric Anholt db43b7870a Re-emit i915 composite setup when the batchbuffer wraps.
This also introduces tests to make sure that we asked for enough reserved space
and that we don't allow wrapping at the wrong time.

This fixes a hang during text rendering with DRI2 and a GL client running,
but could potentially affect text rendering with GEM in general with an
exceptional batchbuffer setup.
2009-01-16 17:56:03 -08:00
Eric Anholt cab5b7a7b0 Fix invarient state emits for DRI2 (do it per batch, since there's no lock). 2009-01-15 09:31:55 -08:00
Owain G. Ainsworth 9f306193c4 Fix ioctl type.
I915_EMIT_IRQ is a read/write ioctl, not a write only. Found by OpenBSd's
kernel code which checks these things a long more strongly than Linux.
2009-01-14 17:12:33 -08:00
Owain G. Ainsworth 1e8588ad50 use ifdef __linux__ where needed.
since modesetting is compiled by default now, ifdef __linux__ the linux
only includes and ioctls.
2009-01-14 17:12:33 -08:00
Ma Ling db9f5915ce Disable VGA plane reliably
This fixes #17235, VGA random hang on recent G45/43 board.
From spec, SR01 bit 5 should be set before VGA plane disable through
control register, otherwise we might get random crash and lockups.
2009-01-14 14:46:52 +08:00
Keith Packard a4b023c17b Assign rotation memory dri_bo to rotation pixmap.
As the rotation memory and rotation pixmap are allocated separately (to make
rotation at startup work), the allocate dri_bo needs to be set in the pixmap
for acceleration to work. This restores the performance in rotated modes.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-13 20:01:49 -08:00
Jesse Barnes f659cc37e6 bios_reader: make mode timing output friendlier
Print out the calculated mode line values (as i830_bios.c uses) and
check for validity against known problems.
2009-01-13 16:51:49 -08:00
Ma Ling 3d206f9e46 set continuous-frequency flag in get modes function
http://bugs.freedesktop.org/show_bug.cgi?id=19247
Because latest xorg will check whether the display is continuous frequency through one flag in monitor info structure,
if not it doesn't touch default modes. When laptop failed to fetch edid, We don't set the flag. In i830_lvds.c,
so currently we can not get default modes except only one mode line from bios.
In order to achieve default modes from xserver successfully,I set the flag and other EDID features.
2009-01-13 10:26:40 +08:00
Keith Packard 3354e660b0 Fix LVDS EDID to match all possible default modes
If the EDID data from the LVDS doesn't indicate support for a wide range of
continuous frequencies, it will not match any of the default modes although
our LVDS scaler logic ignores refresh rates when programming LVDS modes. Fix
this by smashing the compute EDID data to open up the sync rates.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-13 10:22:00 +08:00
Ian Romanick 91c49067ab Prevent redefinitions of CARD8 and friends. Fixes build. 2009-01-07 21:45:54 -08:00
Eric Anholt 342120be09 Fix pin leakage with EXA GTT-mapping shortcut, and crash with UXA on KMS. 2009-01-06 11:20:08 -08:00
Eric Anholt 9a5082d292 Disable DRI2 buffer tiling on non-965, as those need fence regs for 2D blits.
This fixes glReadPixels failure on single-channel 915GM, as the software code
for readpixels was actually the only code in the driver doing tiling against
these buffers (everything else says "rely on fence registers", since the 2D
blits don't have a "don't rely on fence registers" option).
2009-01-06 11:20:07 -08:00
Keith Packard 7736b65be4 FatalError on batchbuffer map failure
Yes, it would be nice to do something other than crash here.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:39 -08:00
Keith Packard 90b28a5655 Handle drm_bo_map failure in 965 video and composite paths.
These two paths allocate a number of objects directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:39 -08:00
Keith Packard 8237faf8f3 Resize framebuffer on screen size change (requires UXA and DRI2)
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:39 -08:00
Keith Packard 21bd4e8974 Make i830_allocate_memory take tiling parameters.
This eliminates the separate i830_allocate_memory_tiled function which means
that all memory objects will have tiling parameters set correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:38 -08:00
Zhenyu Wang 1f61e97904 UXA: Fallback to dri_bo_map() if pin failed
This fixes VT switch issue with UXA after Eric's
aae4008096 on 2D side.
2008-12-31 22:56:57 +08:00
Eric Anholt 830bf91672 Don't touch the pipestat regs for detecting FIFO underrun. The kernel owns them.
Since we don't perform any synchronization with the kernel on these regs, we
could race with the kernel to write stale values and end up not having vblank
interrupts enabled when somebody was waiting on one.
2008-12-30 16:02:42 -08:00
Eric Anholt d96f774d1b warning fix. 2008-12-29 13:57:24 -08:00
Henry unbongo 59b0fbb9be Add support for SDVO LVDS. 2008-12-29 13:57:03 -08:00
Eric Anholt 750d8e1058 Fix compile failure after 45f45c7346 2008-12-29 12:44:26 -08:00
Eric Anholt 45f45c7346 Remove logical context setup.
This should be a noop.  If it wasn't a noop, it means that on pre-g33 chipsets
we were spamming some data into a page of system memory because we used a
virtual instead of a physical address.  It was also supposed to not work when
we submit it from a batchbuffer, as we have been doing for some time now.
This code has existed since about the beginning of the driver's existence,
with no justification.
2008-12-29 11:31:26 -08:00
Eric Anholt 3544bbe22d Add PCI write posting to LeaveVT path when we're about to wait on write results. 2008-12-29 11:31:26 -08:00
Eric Anholt 7b67914b23 Add SDVO LVDS register definitions. 2008-12-29 11:29:32 -08:00
Eric Anholt c1dde7ac06 Remove old mergedfb includes and defines, which bother spatch. 2008-12-29 09:50:37 -08:00
Zhenyu Wang 75799d2834 Bug #18004: Add Aopen 915GM LVDS quirk 2008-12-30 00:55:30 +08:00
Zhenyu Wang cfaaf6af77 Don't count vertex buffer in second aperture size check
With batch flush notify vertex buffer will be unreferenced,
so don't count it in later aperture check. Also adding
uninitialized vertex buffer check in batch flush notify.
2008-12-29 21:17:44 +08:00