Commit Graph

201 Commits

Author SHA1 Message Date
Kristian Høgsberg 0cb87ccfe9 Implement front buffer resize for KMS.
This adds back the resize hook so we can resize the front buffer under
kernel mode setting as well.

The patch also pulls the drmmode_* structs from drmmode_display.h into
drmmode_display.c and eliminates the header file.
2009-02-01 22:28:14 -05:00
Jesse Barnes 8d4bc36fae Support tiled back/depth on 915-class hardware with DRI2.
Set alignments, tile settings and flags correctly in the 2D driver to support
tiled rendering.  UXA's create pixmap function currently assumes the worst
about the alignment constraints; that should probably be fixed.  Some of the
1M alignment fixes could probably be done more cleanly as well.
2009-01-27 14:33:43 -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
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
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
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
Dave Airlie b710a688a7 intel/kms: disable overlay when it needs physical address
We can't do phy address allocations, need kernel support for this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-29 12:51:48 +10:00
Eric Anholt 34d54db945 Remove DRI_MM defines which are always true now. 2008-12-02 13:01:56 -08:00
Kristian Høgsberg ee87f7becc Merge commit 'origin/master' into dri2
Conflicts:
	src/i830_dri.c
	src/i830_driver.c
	src/i830_memory.c
2008-11-17 12:26:38 -05:00
Keith Packard 9b91cdf7ac No need to check for drmCommandWriteRead; we link against libdrm
My checks for DRM enabled were a bit too extensive; drmCommandWriteRead is
part of libdrm which the driver is always linked against. Only the symbols
in the DRI module need to be checked here.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:25:01 -07:00
Keith Packard ae224be27b Check for DRI module before initializing GEM mm
GEM requires the DRI extension module currently, so make sure that is loaded
(by checking for the DRIQueryVersion symbol) before trying to call it. This
allows the server to start with the DRI extension disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:12:02 -07:00
Kristian Høgsberg 282f51c3f0 Merge commit 'origin/master' into HEAD 2008-10-14 23:13:40 -04:00
Julien Cristau 1c6ea4ab47 Typo fix
Reported by Tomas Carnecky on IRC
2008-10-12 15:17:35 +02:00
Zhenyu Wang bc36608e32 Check display stride limit when allocate front buffer 2008-09-18 10:42:33 +08:00
Eric Anholt 7e8eb6e20b Merge branch 'master' into dri2
Conflicts:

	src/i830_batchbuffer.c
	src/i830_display.c
2008-09-10 14:10:26 -07:00
Eric Anholt 0b4f7b6303 Track move of bufmgr functions to libdrm_intel. 2008-09-09 19:18:10 -07:00
Kristian Høgsberg fd6a9ca5b5 Add DRI2 support. 2008-08-29 14:31:02 -04:00
Jesse Barnes 547cf77480 Don't allocate EXA offscreen space if kernel mode setting is active
We'll use GEM alloc & free routines in that case.
2008-08-19 15:45:26 -07:00
Jesse Barnes b8ee31cd80 Remove last TTM bits
Makes it build again with drm#modesetting-gem.
2008-08-16 12:18:01 -07:00
Jesse Barnes 603f48e31b Don't set tiling (yet) if kernel mode setting is active 2008-08-12 18:04:08 -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
Eric Anholt e9e6b47385 intel-gem: Use new getparam to detect kernel GEM support. 2008-07-30 14:15:57 -07:00
Eric Anholt d77d42e543 intel-gem: Give a better error message if the kernel rejects the tiling mode. 2008-07-26 16:10:05 -07:00
Eric Anholt 286ff63f83 Don't set up the HWS page in GEM mode now that the kernel manages it. 2008-07-21 14:14:22 -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
Eric Anholt e9916b9d49 Set tiling state for buffers allocated using GEM. 2008-07-11 18:59:27 -07:00
Zhenyu Wang a34a4e3f64 Fix official name for GM45 chipset 2008-07-03 01:03:14 +08:00
Zhenyu Wang 1cfe769c74 Add support for Intel 4 series chipsets. 2008-06-17 12:39:28 -07:00
Zhenyu Wang 66418cc99c Fix compiler warning when disable xvmc config
(cherry picked from commit df0bbdc7cbb6ff357a81ed28d12e56c9c7d643f7)
2008-06-16 02:52:56 +08: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 754df0aa55 [gem] Chase move of create ioctl from generic to device-specific. 2008-06-11 14:43:38 -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 e930c0dc5b Use bufmgr_gem when available instead of the fake bufmgr.
This is a bit unstable still sometimes.
2008-06-10 11:37:04 -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 432d07fb17 Merge branch 'master' into drm-gem 2008-06-05 14:57:18 -07:00
Eric Anholt 3a967b8359 [gem] Note if pinning a buffer fails. 2008-05-28 11:27:06 -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
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 0741020f37 Set pin alignment for gem on non-965
non-965 tiled frame buffers have fairly strict alignment requirements, 512K
on 8xx and 1MB on 9xx, plus they must be aligned to the size of the
allocation.
2008-05-05 10:17:01 -07:00
Eric Anholt 271abfd0ec Add initial GEM hacks to bring the server up. 2008-05-02 10:06:13 -07:00
Eric Anholt b606278db8 Keep static copies of the 965 render programs in video memory.
This reduces the CPU overhead of memcpying them in every time, for a speedup
in aa24text of around 30%.  This is based on work by Carl Worth which is
in the intel-batchbuffer branch.
2008-04-10 13:37:47 -07:00
Zhenyu Wang b1f358ba97 Disable overlay on new mobile chipset
It's gone, really.
2008-03-28 11:29:40 +08:00