Commit Graph

137 Commits

Author SHA1 Message Date
Eric Anholt f367334c63 Track the move of irq emit/wait to fake bufmgr. 2008-09-09 19:18:10 -07:00
Eric Anholt 0b4f7b6303 Track move of bufmgr functions to libdrm_intel. 2008-09-09 19:18:10 -07:00
Jesse Barnes 173b909a71 Make it actually build the kernel stuff if possible
Fixup the kernel stuff to have a slightly better chance of working.  Still need
to fixup the EXA pixmap functions.
2008-08-08 18:11:13 -07:00
Jesse Barnes b1aef6f63c Initial port of kernel modesetting from old intel-kernelmode branch
Thanks airlied!
2008-08-08 11:54:18 -07:00
Keith Packard 12df8f40d2 Use dri_bo for all object allocations, including pixmaps under uxa 2008-08-05 15:40:14 -07:00
Keith Packard 59774e9aca Add UXA - the unified memory acceleration architecture.
This eliminates the cost of EXA migration management while providing full
pixmap allocation control to the driver. The goal is to make something
useful for UMA drivers.
2008-08-05 15:29:50 -07:00
Jesse Barnes 4f1f308542 Merge branch 'master' into drm-gem
Conflicts:

	src/i830_driver.c
2008-08-05 13:02:47 -07:00
Tomas Carnecky 42fb06f3f1 Reorder visuals reported by the intel driver
The root window visual can not be changed. Neither at runtime nor
through the configuration file. The xserver simply selects the first one
that matches the class (usually TrueColor). I need a root window visual
with stencil buffer because my compiz plugin uses the it for some
operations. This patch reorders the visuals that the 3D driver reports
and puts the one with stencil (and depth) bits as first.
2008-07-30 11:29:13 -07:00
Carl Worth a6ad50402c Merge branch 'master' into drm-gem
Conflicts:

	configure.ac
	src/reg_dumper/Makefile.am
2008-07-17 00:38:54 -07:00
Jesse Barnes 1056d79809 Fix back buffer damage handler for 965+ chips
When page flipping is enabled, we need to make sure any changes to the front
buffer are reflected in the back buffer(s) or corruption might occur at page
flip time.  So make the damage handler work on 965 by adding appropriate tiling
flags and pitch adjustments.
2008-06-24 10:46:21 -07:00
Dave Airlie 02d7141ac3 [gem] remove one more unused bit 2008-06-13 11:30:58 +10:00
Eric Anholt f07acbdaac Require libdrm 2.4.0 always since we need the bufmgr code.
This lets us remove a lot of conditional compile stuff in the DRI case, as
if we're doing DRI and have 2.4.0, we can rely on GEM ioctls existing.
2008-06-12 13:47:35 -07:00
Eric Anholt 339f00e340 [gem] Don't set up the ring in GEM mode, as that'll be handled by the kernel. 2008-06-10 22:50:01 -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
Keith Packard 9c9a5d0e48 Add check for GEM, use that to enable driver GEM support 2008-05-17 23:23:17 -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
Keith Packard b9d12da91e Use GEM for buffer naming now. 2008-05-05 10:44:09 -07:00
Eric Anholt 271abfd0ec Add initial GEM hacks to bring the server up. 2008-05-02 10:06:13 -07:00
Matthias Hopf 3414313ac9 Fix obviously wrong verification of DRI_SUPPORTS_CLIP_NOTIFY. 2008-03-28 14:18:26 +01:00
Paulo Cesar Pereira de Andrade d72e18c109 Compile warning fixes.
Move some declarations and don't declare an extra variable with the
same name, to fix warnings about mixed declarations and code.
2008-03-18 09:24:58 +08:00
Eric Anholt 69fbc17441 Change OUT_RING and similar calls to OUT_BATCH for batchbuffer merge 2008-03-14 10:18:11 -07:00
Eric Anholt 9a62d3b598 Remove i830+ driver's use of CARD*/INT* types for great justice.
Several uses are actually left, which are determined by the X Server
interfaces we're implementing.
2008-03-11 12:07:52 -07:00
Zhenyu Wang bf629466a4 hardware status page initialization rework
Order hardware status page setup more reasonable after
all memory bound, in case new chipset requires non-stolen
page and that could be bound then.

Also clean up drm irq handler install function, and put
first install in starting stage later than status page setup,
so we won't make device cry for uninitialized status page.
2008-01-30 18:55:20 +08:00
Zhenyu Wang 04032dad28 Wrap up chipsets which needs graphics address for status page
Also add support on new chipset.
2008-01-30 18:52:32 +08:00
Zhenyu Wang 75ef3e669d Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree 2007-11-28 22:13:55 +08:00
Jesse Barnes a2a0821e74 Don't stop ring before restoring hw state
Some of the hw state restoration callbacks may want to use the ring for various
things like stopping video playback, so leave the ring enabled until we get
back from RestoreHWState.  Also rename the functions so that their purpose is
clearer and remove a couple of redundant lines.
2007-11-14 11:30:20 -08:00
Jesse Barnes 539b669d6e Remove harmless error message
This really isn't an error in general.  If vblank pipe setup really fails for
some reason, it'll be obvious enough when the user tries to use vblank events
for something.

Patch from Hong Liu.
2007-11-13 17:59:54 -08:00
Eric Anholt 132dce7565 Delay SAREA and mapping setup until EnterVT when using the memory manager.
Otherwise, we would use uninitialized offsets in the early setup.
2007-10-11 12:17:14 -07:00
Eric Anholt 4ca3550fb7 Rework DRI buffer mappings and sarea setup to allow for moving buffers.
While this has been a desired feature for some time, to allow for reallocation
of the front buffer, it was made more necessary by the desire to avoid
requiring a NO_MOVE buffer type in TTM because buffer objects may not be left
pinned over VT switch.  This is a step towards making those buffers
movable and resizable.
2007-10-11 12:17:14 -07:00
Jesse Barnes 1845e7c6e9 Go back to using old drm_i915_flip_t field name
This field shouldn't have been renamed in the first place.  Go back to using
the old name so that the tree is backward and forward compatible again.
2007-09-28 10:12:11 -07:00
Eric Anholt ca67fa767d Remove logic for supporting i915tex_dri.so vs. i915_dri.so.
There can be only one.
2007-09-24 11:12:22 -07:00
Eric Anholt 126031655c Merge remote branch 'origin/master' into buffer-objects
Conflicts:

	src/i830.h
	src/i830_driver.c
2007-09-20 08:57:58 -07:00
Jesse Barnes 4c7542ef43 Only swap planes and pipes if DRM supports it
We want to associate plane A with pipe B on pre-965 mobile chips, since that's
the only way to get framebuffer compression on the builtin LVDS on those
platforms.  However, if we do this swapping and DRM isn't aware of it, we may
end up requesting vblank events for the wrong pipe, or setting up SAREA buffer
swap state incorrectly.

This mod checks whether DRM supports the new plane->pipe swapping behavior, and
only enables the swapping if so.  This should fix the bugs Lukas found and
debugged.  Reviewed by Michel Danzer.
2007-09-10 23:30:50 -07:00
Keith Packard 70e8e59572 Change DRI interface to fill in PCI data from new libpciaccess structure.
The DRI interface requires bus identification for each DRI object; pull that
data from the libpciaccess structures as necessary.
2007-08-26 22:40:25 -07:00
Eric Anholt 0c9e4aeea8 Merge branch 'master' into buffer-objects
Conflicts:

	src/i830_dri.c
	src/i830_memory.c
2007-08-16 11:30:16 -07:00
Dave Airlie a69db6f7fe intel: don't setup texOffsetStart unless using EXA 2007-08-15 18:28:50 +10:00
Eric Anholt cb36635a05 Attempt to fix several front buffer tiling failure cases.
Front buffer tiling is now disabled with G965 and XAA.  Some of the acceleration
that i830_xaa.c does can't be supported on tiled buffers.

Adds a tiling field to struct i830_memory, and uses it instead of separate
variables for each potential tiled buffer.
2007-08-10 16:33:04 -07:00
Eric Anholt 79d9a309b1 Mark DRI buffers as shareable, and pass their buffer handles through the SAREA. 2007-08-02 15:50:42 -07:00
Eric Anholt 2b1ec0f514 Use the dontMapFramebuffer option available with DRIINFO 5.4.
If not available, AIGLX init will fail.  While here, simplify DRIINFO tests
since we refuse to init with a version queried less than the version we
compiled against, anyway.
2007-07-27 10:42:25 -07:00
Eric Anholt 18c707a8c1 When TTM is available, use it instead of manual AGP allocations when possible.
This is a step towards being able to expose buffer objects through the screen
private to DRI clients, instead of having them have to use the fake buffer
object type.

This fails in two ways.  First, the kernel memory manager is not currently
suitable for doing the physical allocations we need, so we still use AGP for
those.  Additionally, the DRI lock can't be initialized early enough for us, so
these buffer object allocations fail.  This will be fixed by improving the
DRM interface.
2007-07-25 10:11:16 -07:00
Eric Anholt 420e41e792 Revert "Replace failure-prone configure test for fresh libdrm with a simple ifndef."
This reverts commit c2b130354a.

Sadly, a non-working DRM_IOCTL_I915_FLIP already existed.
2007-06-13 13:34:26 -07:00
Eric Anholt ceb6dd7244 Fix context switching between DRI and X.
Now, all 3D pipeline consumers in the driver just call
IntelEmitInvariantState(), which handles basic state setup, the caching of that
state setup, and notifying DRI clients.  This also removes a mistaken idle
wait in the Render code which was papering over the brokenness in the context
switching.
2007-06-12 10:04:39 -07:00
Eric Anholt c2b130354a Replace failure-prone configure test for fresh libdrm with a simple ifndef. 2007-06-12 08:50:14 -07:00
Wang Zhenyu f4c05973d3 Add support for the G33, Q33, and Q35 chipsets.
These chipsets require that the hardware status page be referenced by an offset
in the GTT rather than a physical memory address, so the X Server allocates it
rather than the DRM.
2007-06-05 11:34:22 -07:00
Michel Dänzer 9971fac876 i830: Provide new DRI texOffsetStart hook when available with EXA. 2007-05-22 10:46:39 +02:00
Eric Anholt b930bb9d6d Disable vblank interrupts when no DRI clients are running.
(cherry picked from commit 6621dd71ada839f4c1742e9e5b272e924cee21d9)
2007-05-03 13:55:37 -07:00
Dave Airlie c59e5895a0 make warning info only so ppl don't go reporting stupid bugs 2007-04-02 07:18:04 +10:00
Michel Dänzer c21b88d838 Fix build when DAMAGE is not defined. 2007-03-19 10:45:58 +01:00
Keith Packard 62a5399d70 Elide I830DRIClipNotify for older DRI versions.
I830DRIClipNotify is passed to newer versions of DRI; don't include it in
the server when building against older versions.
2007-03-17 21:32:36 -07:00