Commit Graph

1738 Commits

Author SHA1 Message Date
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
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
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
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
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
Zhenyu Wang 79fde3ad7a Check pitch for EXA operation
2D pitch limit applys to all chips. Pre-965 chip has
8KB pitch limit for 3D. 965 supports max pitch by current
exa (128KB).
(cherry picked from commit 8187a5a16f8bd8f0ba5e7f5357f355928b3b8f07)
2008-05-07 13:42:38 +08:00
Eric Anholt 36ec933009 Bug #15807: Fix use of the ring while VT-switched, hit by fast user switching.
The fix for flushing at blockhandler with no DRI on 965 was broken and would
try to flush the chip even when the driver wasn't in control of the VT.
Hilarity ensued.
2008-05-06 18:57:20 -07:00
Jesse Barnes 0c00a638ef Add FIFO watermark regs to register dumper 2008-05-06 14:39:40 -07:00
Zhenyu Wang c81a4687fc Only check xvmc lib when xvmc is enabled.
Don't check xvmc lib if user has already wanted to disable it.
Fix fdo bug #15762.
2008-05-06 13:52:22 +08:00
Bryce Harrington be746a90a8 More quirks from ubuntu/dell 2008-05-06 13:51:46 +08:00
Jesse Barnes a0ced923bb Add a new quirk for BIOSes that reprogram regs at lid close/open time
Dell Latitude D500s seem to have this problem.  At lid close/open, the DSPABASE
reg gets reset to 0, so we either need to keep the framebuffer at offset 0 or
make sure we reprogram the CRTCs after the lid opens again.  Since we can't
make sure the former is always true (buffer resize, etc.), this patch adds a
quirk to reset the modes at lid open time.

Fixes FDO bug #14890.
2008-04-29 13:19:02 -07:00
Keith Packard fff17b9d1b Use new xf86RotateFreeShadow function to clean up shadow buffers.
This simply moves code from the driver up into the X server; use it where
available.
2008-04-29 10:32:14 -07:00
Keith Packard 1d467a8038 Overlay video doesn't require that the target pixmap be in video memory.
I830PutImage was checking to make sure the target pixmap resided in video
memory, but this isn't necessary when using the overlay. Test
2008-04-23 11:08:38 -07:00
Keith Packard 40e0a03af5 Dump batch buffers found from main ring 2008-04-21 01:03:22 -07:00
Keith Packard c8ae3b781f Add a bunch of 965 ring stuff to the debug dump 2008-04-20 02:11:28 -07:00
Eric Anholt 2c135ef8ac Make the binding table and surface state be arrays to reduce syncing. 2008-04-17 11:08:28 -07:00
Keith Packard c3fb62df4e Add a kludge-around to fix cd/wt bits in fb ptes on linux.
Mmap from /sys/devices/pci* on linux forces the cache-disable and
write-through bits, which turns our write-combining map into an
uncached-map, seriously impacting performance. It turns out that a bug in
mprotect allows us to fix this by disabling access to those pages and then
immediately re-enabling them.
2008-04-17 10:05:00 -07:00
Hong Liu 0ae283582d fix possible segfault in I830FreeScreen
pI830 may point to NULL if I830PreInit fails
2008-04-17 10:57:34 +08:00
Eric Anholt 23d1df22d1 Abstract surface setup into a separate function. 2008-04-14 23:54:38 -07:00
Eric Anholt e27ce4238f Move the vertex buffer to the state structure as well. 2008-04-14 23:30:21 -07:00
Eric Anholt 69709fe36c Move the binding table for 965 to the state structure. 2008-04-14 18:34:13 -07:00
Eric Anholt 049d057dfd Move the 965 static variables local to the function they're used in. 2008-04-14 17:09:22 -07:00
Eric Anholt 092962c962 Make the VS unit state static for 965 render. 2008-04-14 14:02:58 -07:00
Eric Anholt 4bbdd7096d Rename some variables in i965_render.c for clarity.
The gen4_render_state is now always called "render_state" (i965_render.c
bookkeeping) and gen4_state_t is now always called "card_state" (the buffer
for state used by the chip).
2008-04-14 13:53:36 -07:00
Carl Worth 456bb52933 Associate one sf_state object with each sf_kernel
(cherry picked from a2b5c23184d19b386fdfd04f578a55566df60132 commit)
2008-04-14 13:24:50 -07:00
Zhenyu Wang 90d6b17847 Change default panel fitting mode to origin
i8xx currently only works in FULL mode.
(cherry picked from commit 33ffd781bbca3d0dee8c1b47e7b90be5824b9a4f)
2008-04-14 16:55:53 +08:00
Zhenyu Wang c1ad0a1a34 Remove old sf/wm program from Makefile
Fix distcheck
(cherry picked from commit 1d8383923bebf38ab8ada6a262cb4fc8c30e074a)
2008-04-14 16:55:37 +08:00
Keith Packard 18ef4158e5 Only use FOURCC_XVMC when INTEL_XVMC is defined
The XVMC code uses a magic FOURCC code to signal frame updates, but that
code is only defined when the XVMC code is used.
2008-04-13 21:37:49 -07:00
Keith Packard 269809030e Move wm_scratch first to meet alignment requirements 2008-04-13 12:47:02 -07:00
Keith Packard 08d3206f3b Kludge to make planar video work - duplicate sampler state
This patch duplicates all of the surface sampler state needed to read from
the separate YUV surfaces and then has the planar sampler read from samplers
0, 2, 4 instead of 0, 1, 2. This appears to make things work, instead of
having the samplers break at random. I do not understand why this works.
2008-04-13 12:43:16 -07:00
Keith Packard 6366e4de54 Skip copying on FOURCC_XVMC surfaces 2008-04-13 12:43:16 -07:00
Keith Packard 0fec42b64e Set some mask bits to try and get yuv conversion working 2008-04-13 12:43:16 -07:00
Keith Packard 91d3e19786 Use compressed instructions for yuv conversion 2008-04-13 12:42:53 -07:00
Eric Anholt 03836067b7 Fix the offset to sampler default color, and a compiler warning. 2008-04-11 14:15:49 -07:00