Commit Graph

1891 Commits

Author SHA1 Message Date
Eric Anholt bade7d7d25 Use the DRM for submitting batchbuffers when available.
There are some concerns with this, as the DRM will be setting the nonsecure
flag on the batchbuffer, and the server may be submitting some secure-only
commands.  It appears to work on the 915GM test system currently.
2008-06-10 11:37:03 -07:00
Eric Anholt 6e94affcc2 Avoid needless flush emits in the blockhandler.
The EmitFlush in i830_dri.c was added as a pageflipping workaround, and was
noted to not even be sufficient then.  There's no reason for it to be there,
so it's removed.  After that, we just have to not emit an MI_FLUSH if we
already had, and cursor movement no longer bashes memory manager.
2008-06-10 11:37:03 -07:00
Eric Anholt b2216e7bc2 Use batchbuffers instead of ring emits for general commands.
The batchbuffers are managed using libdrm and bufmgr_fake, and dispatched from
the ring from userland.
2008-06-10 11:37:03 -07:00
Eric Anholt d0fda9d24c Merge branch 'master' into drm-gem 2008-06-10 11:32:49 -07:00
Eric Anholt 79f94ee3c4 Set up/restore PWRCTXA from enter/leavevt not server start/exit.
This should improve behavior in the presence of VT switching, but also avoids
a crash on X exit from writing the register after unmapping mmio.
2008-06-10 11:32:07 -07:00
Bryce Harrington 231a302013 Two more Dell quirks
fd.o #16160
2008-06-10 14:10:39 +08:00
Eric Anholt cc98d41df6 Add a little program to dump out the first 64 dwords of the status page. 2008-06-09 12:01:51 -07:00
Jesse Barnes 1142be53eb Fix TV programming: add vblank wait after TV_CTL writes
Fxies FDO bug #14000; we need to wait for vblank after writing TV_CTL or followi
ng "DPMS on" calls may not actually enable the output.
2008-06-09 08:52:59 -07:00
Robert Lowery 64a8f2433d Fix TV out connection type detection
Make sure we wait for vblank when using the TV DAC to detect the connection
type.

Fixes FDO bug #14000.
2008-06-05 21:21:17 -07:00
Tomas Carnecky a993a8f3ce Fix compile error in LeaveVT 2008-06-06 10:03:23 +08:00
Eric Anholt 432d07fb17 Merge branch 'master' into drm-gem 2008-06-05 14:57:18 -07:00
Eric Anholt bff180e6ca Move debug clock printout from ErrorF to X_INFO. 2008-06-05 14:55:23 -07:00
Eric Anholt ad459b21b7 Remove SVG_WORK_CONTROL init.
The bit set is now reserved -- used to be a workaround for early revisions.
2008-06-05 14:37:59 -07:00
Eric Anholt e41dc98a0a Initialize clock gating from EnterVT and save/restore it appropriately. 2008-06-05 14:37:26 -07:00
Eric Anholt 8061e5ac27 Move BIOS scratch register setup to EnterVT instead of PreInit.
We want these to always be set when our driver's in control.  They are
already appropriately save/restored at leave/entervt.
2008-06-05 14:09:45 -07:00
Eric Anholt b61cb92831 Remove gratuitous wait_ring_idle after I830Sync. Syncing implies that. 2008-06-05 13:57:54 -07:00
Eric Anholt b65f67b74f Move the remaining two lines of SetHWOperatingState to the caller. 2008-06-05 13:40:55 -07:00
Eric Anholt adb4f5a5e8 Remove duplicated i830_stop_ring()/SetHWOperatingState() in EnterVT(). 2008-06-05 13:39:08 -07:00
Eric Anholt c2e2fe4811 Move DSPARB setup into a separate function, and save/restore it at VT switch. 2008-06-05 13:24:20 -07:00
Eric Anholt 7e51384c97 Replace a couple of wait-for-ring-idles with a single function to do so. 2008-06-05 11:56:42 -07:00
Eric Anholt 65306cdd71 Just remove the mprotect kludge.
Besides not being #ifdef __linux__ed as requested, some linux kernels break
in exciting new ways when you try to mprotect from PROT_NONE back to
PROT_READ|PROT_WRITE.  Yes, there are bugs in the code we're calling in a
bug-exploiting bug workaround.

If you want this workaround for the original bug exposed when moving to
libpciaccess, it's already in libpciaccess.
2008-06-05 11:47:27 -07:00
Hong Liu beb72ae5aa Set SDVO sync polarity to default on 965
Fix fd.o bug 15766
2008-06-04 16:58:05 +08:00
Hong Liu c7fee208fd Fix DSPARB change on 965G
From the spec, only 965GM and IGD_GM have 128 FIFO entries.
With DSPARB change introduced by commit bd137a, I've got PIPE B
underrun when dual-headed on G35 platform.
2008-06-04 16:56:50 +08:00
Zhenyu Wang 64ccc8a036 xvmc: add render dump function 2008-06-04 22:30:04 +08:00
Zhenyu Wang 1729a4f29d xvmc: move block size lookup helper to generic 2008-06-04 22:25:39 +08:00
Zhenyu Wang 3cc8876db7 xvmc: a little cleanup
Also safe check context size to not exceed surface max.
2008-06-03 16:15:36 +08:00
Zhenyu Wang 9695500355 xvmc: remove unused dri drawable 2008-06-03 16:13:52 +08:00
Jesse Barnes bd137a19dc Fixup DSPARB for 855 & 945
It turns out 855 has a different DSPARB layout than 915+.  And 945+ have more
FIFO entries, so we have to allocate things differently.  So on 855 split the
FIFO evenly again between A & B planes, and do the same on 945, where we have a
larger FIFO.  Fixes an issue reported by Daniel Stone with the previous default
value.
2008-05-28 15:47:47 -07:00
Eric Anholt 3a967b8359 [gem] Note if pinning a buffer fails. 2008-05-28 11:27:06 -07:00
Jesse Barnes 363ccc3dfb Fixup FIFO comment
What I originally checked in was a bit misleading.
2008-05-26 09:43:40 -07:00
Jesse Barnes 2e1425246c Handle display FIFOs better
Add some debug code to catch FIFO underruns, which are normally bugs (unless
they occur during mode setting) and remove any plane C FIFO allocations, since
we don't use that plane at all.  We may eventually need to be a little smarter
about this on platforms that use plane C for the popup.
2008-05-26 09:40:10 -07:00
Jesse Barnes 89bb53cc7a Fixup power saving registers
Update clock gating disable bits to match docs and allocate a power context
memory area so that newer chips can save state and power down the render unit.
2008-05-26 09:34:34 -07:00
Eric Anholt ced4b4bb0c [gem] Reduce console spam from debugging. 2008-05-22 22:10:25 -07:00
Alan Coopersmith 165c0865d8 Define DEFFILEMODE for OS'es that don't have it 2008-05-21 14:56:27 -07:00
Jesse Barnes 7118065382 Revert "Disable FBC by default on 965GM"
This reverts commit 53e3693ef1.

Conflicts:

	src/i830_driver.c - default FBC on for 965+
2008-05-21 11:51:55 -07:00
Zhenyu Wang 740a73dad1 Revert "Add FIFO watermark regs to register dumper"
This reverts commit 0c00a638ef.

Those FIFO watermark regs are 945-ish, and cause problem
on G35.
2008-05-20 08:54:01 +08:00
Keith Packard c81050c005 Merge commit 'origin/master' into drm-gem 2008-05-17 23:26:14 -07:00
Keith Packard 9c9a5d0e48 Add check for GEM, use that to enable driver GEM support 2008-05-17 23:23:17 -07:00
Rémi Cardona e9532f3abf Add glproto to DRI dependencies 2008-05-14 14:52:37 +08:00
Eric Anholt fe455a38cb Formatting fixes for intel_idle. 2008-05-13 11:56:10 -07:00
Eric Anholt 5c1720ecbc Add i915 support to intel_idle. 2008-05-13 11:50:24 -07:00
Keith Packard 089011daf3 Track name changes in GEM ioctls.
allocate → create
unreference → close
name → flink
2008-05-12 12:18:19 -07:00
Keith Packard 10f1d835b8 Record alignment requirements in mem structure for use by GEM.
GEM needs memory alignment requirements sent at pin time, which is a bit
after the allocation itself. Store the required alignment in the memory
object for later use by pin.
2008-05-12 12:15:09 -07:00
Jesse Barnes 5103e5a39a Panel fitting: fix letterbox modes
In full_aspect mode, we try to preserve the aspect ratio by adding
either top & bottom or left & right borders.  In the letterbox case (top
& bottom borders) we were miscalculating the top border which led to
programming a bad mode.  Fix the calculation and bug #15559.
2008-05-12 10:58:24 -07:00
Zhenyu Wang f280c50dd5 Revert last HP 965GM pipe A quirk
Seems not resolve the issue (fdo bug #15885).
2008-05-12 08:57:56 +08:00
Bryce Harrington d91d9e6a2f More Pipe A force quirks 2008-05-10 07:58:59 +08:00
Zhenyu Wang 548d4c0f97 Fix i965 render getting dest format error
Depend on value returned by function within assert is wrong.
Fixed weird render corrupt on i965.
2008-05-08 12:43:30 +08:00
Mike Isely 9f32486043 Implement option to ignore external fixed mode settings
The Intel xorg driver tries mightily to determine the native fixed
panel mode settings for the LVDS output.  It does this through various
means, including scanning video BIOS tables, and noticing if the pipe
in question has already been set up by somebody else (and adopting
those timings).  This strategy works well for say a laptop where the
LCD panel is an integral part of the machine.  But for other
applications where the display is unrelated to the system's BIOS or
other software, then the BIOS will likely have no clue how to
configure the LVDS output.  Worse still, the BIOS can simply "get it
wrong", leaving the pipe misconfigured.  Unfortunately the Intel
driver can potentially notice this, adopt the same settings, leaving a
messed up display.

All of this complexity normally happens independently, behind the
scenes, from the mode timings that might otherwise be specified by the
user.  This driver has a concept of fixed, i.e. "native" mode, and
then user-specified mode.  If the corresponding resolutions between
those concepts don't match, then the driver in theory will arrange for
scaling to take place while adhering to the actual native mode of the
panel.  Said another way, if the user says 800x600 but the driver
mistakenly (see above) thinks the native mode is 640x480, then 640x480
is the mode set with scaling to an 800x600 frame buffer.  If the
driver gets the wrong native mode, then the result is a miserable mess
with no way for the user to override what the driver thinks is right.

This patch provides a means to override the driver.  This implements a
new driver option, "LVDSFixedMode" which defaults to true (the normal,
probe-what-I-need behavior).  However when set to false, then all the
guessing is skipped and the driver will assume no fixed, i.e. "native"
mode for the display device.  Instead with this option set to false,
the driver will directly set the timings specified by the user,
providing an escape hatch for situations where the driver can't
correctly figure out the right mode.

Under most scenarios of course, this option should not be needed.  But
in situations where the Intel video BIOS is hopelessly fouled up
related to the LVDS output, this option provides the escape hatch for
the user to get a working display in spite of the BIOS situation.

Signed-off-by: Mike Isely <isely@pobox.com>
2008-05-08 10:00:17 +08:00
Jesse Barnes 33f033cbf3 Save/restore cursor registers
There are lots of good reasons for doing this, one of them is fdo bug #11305.
2008-05-07 14:46:52 -07:00
Zhenyu Wang a7188b1f2d Use I830FALLBACK when check pitch for debug 2008-05-07 14:21:59 +08:00