Commit Graph

1837 Commits

Author SHA1 Message Date
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 7008eac855 Update dolt from git, fixing fallback to libtool. 2008-04-16 12:09:41 -07: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
Carl Worth d3138d9ff0 Enumerate all possible wm_state objects
We have a collection of wm_state objects for each ps kernel,
(one for each combination of src and mask extend and repeat
values).

Thanks to Dave Airlie for noticing an errant write through a
wild wm_state pointer in an early version of this commit.

(cherry picked from 7763706a93d3021907273f9b330750ba110e2fc3 commit)

This cherry-pick required more reformatting than most, due to the
projective texturing merge.
2008-04-11 14:15:49 -07:00
Carl Worth 2293a3677d Enumerate all possible src,mask sampler state pairs
This will eventually allow for the elimination of sampler state
updates while compositing---and initializing everything in the
initialization function.

(cherry picked from commit d0874697be8086cd64740c24698df8cd4d31c76f)
2008-04-11 14:15:48 -07:00
Keith Packard da85d1b822 Revert "remove '#line NUM ...' in macro process"
This reverts commit f47486fab3.

Sorry for failing to push the #line processing changes to intel-gen4asm;
those are now pushed, so this change should no longer be necessary. Having
correct file name and line numbers in the error messages is awfully nice
though.
2008-04-11 11:22:29 -07:00
Zhenyu Wang f47486fab3 remove '#line NUM ...' in macro process
intel-gen4asm doesn't allow '#' line
2008-04-11 10:12:40 +08:00
Hong Liu 5c9cde37e7 Bug #14935: Fix i9xx reference clock for spread spectrum. 2008-04-11 09:54:34 +08:00
Eric Anholt 152a50703a Fix compiler warning from 24-bit lvds change. 2008-04-10 16:06:41 -07:00
Carl Worth baa55ffe3b Enumerate all possible cc_state objects
We need one for each possible combination of src and dst
blend_factors. Again, as with recent changes, this eliminates
state updates from prepare_composite and allows that function
to instead simply reference an existing object initialized
within gen4_state_init.

Thanks to Dave Airlie (and git-bisect) for pointing out that with
gnome-terminal all text was appearing as solid black with an early
version of this commit. As expected the bug was an alignment issue.

(cherry picked from 0c0ab52c2d100c47f38c7ef826ef585c8b9815e9 commit)

Performance is approximately equivalent on text tests, but may be
around +2%.
2008-04-10 16:03:29 -07:00
Keith Packard d5a80e1e3a Single memcpy when pitches align on planar image transfer 2008-04-10 16:58:12 -05:00
Keith Packard ac97f2b148 Use available symbolic register name 2008-04-10 16:58:12 -05:00
Keith Packard f270456e56 Remove .g4b files on clean 2008-04-10 16:58:12 -05:00
Keith Packard fb6ed8b8b5 Update yuv->rgb conversion programs to write to src_sample regs
The YUV->RGB code was written to write directly to the dataport registers,
but that didn't work for the compositing functions (cause still unknown).
This change makes that code write RGB values to the src_sample registers as
with the other sample computation fragments.
2008-04-10 16:58:11 -05:00
Keith Packard b01d582e23 Revert "Compute pixel values directly into data port"
This reverts commit 346cf57deabb4c336612df4c13650a87b5ef6775.

Mixing randr transforms and video caused screen corruption for Render
operations. No, I don't understand why.
2008-04-10 16:58:11 -05:00
Keith Packard 3fc3d1a701 Remove sync after 965 video put.
The hardware has been marked as needing a sync, so the next video put will
block waiting for the previous one to complete. Adding a sync here just
stalls the video playback for no good reason.
2008-04-10 16:58:11 -05:00
Keith Packard 825d9e50c5 Add planer video decode kernel
Support for planar video reduces bus bandwidth by 25% and also reduces CPU
usage during planar->packed conversion.
2008-04-10 16:58:11 -05:00
Keith Packard a03eaaa67b Use shared exa_wm code for packed yuv decode
Eliminate special video sf and ps programs.
2008-04-10 16:58:11 -05:00
Keith Packard 32ef985183 Compute pixel values directly into data port
Instead of leaving pixel values in src_sample registers, compute the pixel
values directl to the data port to save 8 moves. This cannot work when no
computation is done as there is both no way to wait for the sampler to
finish and because the sampler returns data in a different order from that
required by the data port (sigh).
2008-04-10 16:58:11 -05:00
Keith Packard b68d9f4245 Use symbolic names for channels in YUV code 2008-04-10 16:58:11 -05:00
Keith Packard 781be9d472 Rename src/mask/data registers to indicate channel 2008-04-10 16:58:11 -05:00