Commit Graph

1818 Commits (1bae8844cafd70f6196116f6e84b0f36c069e976)

Author SHA1 Message Date
Alex Deucher 4b98f6d74f radeon: fix bus master enabled bits on newer asics 2008-10-06 03:08:27 -04:00
Mihail Zenkov 5a36cce349 radeon: fix missing bit from rs740 patch
See bug 17908
2008-10-06 00:49:15 -04:00
Alex Deucher ce40261012 radeon: Add support for HD2100 IGP (RS740) 2008-10-04 20:43:21 -04:00
Dave Airlie 7b3aa62648 Merge remote branch 'origin/modesetting-gem' into modesetting-gem 2008-09-30 14:17:27 +10:00
Dave Airlie 972f657265 Merge remote branch 'origin/master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/dri_bufmgr.h
	linux-core/drm_irq.c
	linux-core/drm_sysfs.c
	linux-core/drm_ttm.c
	shared-core/i915_dma.c
	shared-core/i915_irq.c
	shared-core/nouveau_drv.h
	shared-core/radeon_cp.c
2008-09-30 14:13:49 +10:00
Alex Deucher 09b2dfcedc radeon: make atom on r4xx a module option
default is legacy modesetting.  pass module option r4xx_atom
to try using atom on r4xx.
2008-09-26 17:20:04 -04:00
Jakob Bornecrantz ea9711b954 Seperate modesetting userspace bits into drm_mode.h 2008-09-25 23:13:19 +02:00
Dave Airlie 35e379ce5a radeon: add r600 modesetting registers writes 2008-09-24 15:25:35 +10:00
Alex Deucher 34af71c42a radeon: add function to configure PCIE lanes 2008-09-18 16:07:41 -04:00
Alex Deucher e1e782af5d Radeon: restructure PLL data
- store pixel clocks, core clock, and memory clocks separately
- grab all pll limits from bios tables
2008-09-18 15:11:48 -04:00
Dave Airlie 3a497db786 radeon: fixup buffer and cs bits 2008-09-18 10:22:23 +10:00
Dave Airlie 8f38c28a39 radeon: fail properly if we can't create the ring.
Normally this will be due to an AGP driver needing updating
2008-09-18 10:19:08 +10:00
Dave Airlie 515aa0800c radeon: do proper memory controller init and setup 2008-09-18 10:17:27 +10:00
Dave Airlie ed961cb428 radeon: remove unneeded debugging 2008-09-18 10:14:32 +10:00
Dave Airlie 8f23d4a44c make text reserve 256k 2008-09-18 10:12:13 +10:00
Dave Airlie 2a6dad31d8 radeon: add initial suspend/resume support
plus a bunch of fixes
2008-09-18 10:11:23 +10:00
Ben Skeggs ee6bcabc50 nv50: add initial context for chipset 0xaa
This just doesn't look right..
2008-09-17 22:18:03 +10:00
Ben Skeggs d55e8090fa nv50: add initial context to match ctxprog for chipset 0x50 2008-09-17 22:03:38 +10:00
Ben Skeggs 4d2f1257fa nv50: add ctxprog for chipset 0x50 2008-09-17 15:13:27 +10:00
Ben Skeggs 301be1dc9b nv50: add ctxprog for chipset 0xaa 2008-09-17 15:02:54 +10:00
Ben Skeggs f152482bde nv50: add support for chipset 0x92 2008-09-17 14:52:22 +10:00
Robert Noland 6f2479c674 [FreeBSD] Ensure that drm_pci_alloc is never called while locks are held. 2008-09-06 18:37:06 -04:00
Dave Airlie f60d9a04b8 radeon: change interface from headers add pin_domain into padding 2008-09-07 08:09:24 +10:00
Robert Noland 3f915f68e8 i915: fix i915_ring_validate() 2008-09-05 12:38:41 -04:00
Stephane Marchesin ce84511f4d nouveau: 8200 cards are 0xA0 family. 2008-09-05 00:17:52 +02:00
Dave Airlie cd7d71f19c radeon: make writeback work after suspend/resume.
While re-writing this for modesetting, I find we disable writeback on
resume.
2008-08-31 07:27:26 +10:00
vehemens 71f0a3e389 [FreeBSD] Replace typedefs on bsd.
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-29 15:46:05 -04:00
Dave Airlie 7552b2a6c3 drm: fix some whitespace 2008-08-27 13:41:53 +10:00
Dave Airlie 361ab10d2f radeon: fixup domains and use them properly 2008-08-26 17:39:00 +10:00
Robert Noland c8fd8d3a0d i915: Fix i915 build on FreeBSD
ifdef out all the gem stuff for now.  Also, the msi stuff isn't portable
the way it is... I'll try and fix that up sometime soon.
2008-08-24 15:53:17 -04:00
Robert Noland d0acbe4553 i915: Convert vblank on disabled pipe DRM_ERROR to DRM_DEBUG. 2008-08-24 15:25:20 -04:00
Robert Noland 739b01dde4 i915: Clear sarea_priv during lastclose.
sarea_priv needs to be NULL before i915_initialized is called to
properly reset it.  The stale value produces a panic any time something
opens/closes drm without calling initialize.  i.e. version checking
2008-08-24 15:25:20 -04:00
Robert Noland 1f3c4dd938 i915: Free dev->dev_private on unload. 2008-08-24 15:25:19 -04:00
Robert Noland 16c1a87580 i915: Move spinlock init / destroy to load / unload time.
This resolves the panic on FreeBSD during VT switch, without attempting
any of the more lofty goals for the time being.
2008-08-24 15:25:19 -04:00
root 0da66c27fa nouveau: fifo and graphics engine suspend and resume for nv04-nv4x
Corresponding DDX patch at http://people.freedesktop.org/~stuart/nv0x-nv4x_suspend/
2008-08-19 02:01:14 +01:00
Dave Airlie 2d4cf9cc0f radeon: oops set correct scratch 2008-08-19 08:20:09 +10:00
Alex Deucher aed70622ab radeon: first pass at bios scratch regs
- todo: updated connected status
2008-08-17 18:09:07 -04:00
Maarten Maathuis a5381cac55 nouveau: make it compile under 2.6.27 2008-08-17 00:41:50 +02:00
Jesse Barnes a2adc69656 i915: finish removing TTM bits
Makes it build again.
2008-08-16 12:09:24 -07:00
Jesse Barnes d313108167 Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-gem 2008-08-16 11:45:53 -07:00
Jesse Barnes 893315d49e i915: set domain properly on fb mapping, flush out changes
The user visible ioctl does this, but since we call into GEM internals
directly, we have to flush things ourselves.  Fixes initial fb console
corruption.
2008-08-16 11:35:10 -07:00
Dave Airlie 30ff279e42 radeon: add support for memory map init 2008-08-14 14:43:51 +10:00
Dave Airlie eb8f9b9da4 radeon: add copy/solid regs for rn50 2008-08-14 14:41:15 +10:00
Dave Airlie 9dff806802 i915: fixup from last merge hopefully 2008-08-14 09:43:23 +10:00
Dave Airlie 2d4420c666 Merge branch 'radeon-gem-cs' into modesetting-gem
Conflicts:

	libdrm/xf86drm.c
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_compat.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/drm_vm.c
	shared-core/i915_dma.c
	shared-core/r300_cmdbuf.c
	shared-core/radeon_drv.h
2008-08-14 09:36:34 +10:00
Alex Deucher b486ed7f7d Get legacy working finally
- extra ~ in RADEON_WRITE_P()
- re-arrange crtc setup a bit
- add debugging for tracing calls
- fix pitch calculation
2008-08-14 09:19:03 +10:00
Alex Deucher 5f427e9aae Brute force port of legacy crtc/encoder code
- removed save/init/restore chain with set functions
2008-08-14 09:19:02 +10:00
Dave Airlie b167ccf10f radeon: fix kernel_mm properly 2008-08-14 09:17:43 +10:00
Dave Airlie 58df2fa0ec radeon: remove debugging 2008-08-14 09:14:56 +10:00
Dave Airlie b0ee12e6bb radeon: use mm_enabled variable to denote memory manager running 2008-08-14 09:14:14 +10:00
Dave Airlie 18020e5e96 radeon: make buffer swap for older drivers work again on GEM 2008-08-14 09:12:36 +10:00
Dave Airlie d59f41b8cf radeon: add userspace call for mm support check 2008-08-14 09:11:15 +10:00
Dave Airlie 957c71ff52 radeon: FEDORA: add old DMA buffers on top of GEM
This really shouldn't go upstream, it just lets me
run the old 3D driver on GEM setup system
2008-08-14 09:10:11 +10:00
Jesse Barnes 1c6abcefdc i915: setup hardware status page if physical addrs are required
Needed for the modesetting case where we initialize the ring at load time.
2008-08-13 11:39:22 -07:00
Jesse Barnes b8724ae647 Merge branch 'modesetting-101' into modesetting-gem 2008-08-13 10:09:41 -07:00
Jesse Barnes 2f03ba4aad Merge branch 'master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/xf86drm.h
	shared-core/i915_dma.c
	shared-core/i915_irq.c
2008-08-13 10:08:02 -07:00
Maarten Maathuis 9a2adc442a NV50: minor changes 2008-08-09 19:50:00 +02:00
Maarten Maathuis f79ed55462 NV50: enable hotplug irq 2008-08-09 19:47:06 +02:00
Eric Anholt e1b8e79796 Merge branch 'drm-gem'
Conflicts:

	shared-core/i915_dma.c

This brings in kernel support and userland interface for intel GEM.
2008-08-08 14:05:01 -07:00
Stuart Bennett 0c47151a57 nouveau: wait for pgraph idle after loading or saving a context
the nvidia driver does this, and it stops the error message appearing on nv40
2008-08-08 16:25:05 +01:00
Dave Airlie c2184e450e radeon: add initial support for legacy crtc/encoders.
not all there yet
2008-08-08 16:04:45 +10:00
Jesse Barnes 8074b2e83d Make modesetting-gem build with recent kernels
Needed to merge in VM fault changes & pci_read_base API update.
2008-08-07 17:15:50 -07:00
Dave Airlie 513d4c3ff1 radeon: fix setting new memmap in right place 2008-08-06 10:21:20 +10:00
Dave Airlie 4748fbcbd7 radeon: fix blit due to registers wrong 2008-08-05 11:36:37 +10:00
Dave Airlie aa8e15f8b5 radeon: add userspace mm enable switch 2008-08-04 14:59:17 +10:00
Dave Airlie dff8485151 drm: remove unused types 2008-08-04 14:55:12 +10:00
Dave Airlie af6efc3d77 i915/radeon: use rmmap locked 2008-08-04 14:54:02 +10:00
Kristian Høgsberg 086716c8e2 Merge commit 'origin/drm-gem' into modesetting-gem
Conflicts:
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_mm.c
	linux-core/drm_stub.c
	linux-core/i915_gem.c
	linux-core/i915_opregion.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-08-01 13:35:56 -04:00
Dave Airlie 4585787bd1 Revert "i915: Move all of the irq install/uninstall to load time."
This reverts commit 965a72202b.

Please re-do over properly
2008-08-01 07:43:58 +10:00
Kristian Høgsberg 5052e966ec Merge commit 'origin/master' into modesetting-gem
Conflicts:
	linux-core/Makefile.kernel
	linux-core/ati_pcigart.c
	linux-core/drm_compat.h
	linux-core/drm_irq.c
	linux-core/drm_lock.c
	linux-core/i915_drv.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/nouveau_mem.c
	shared-core/radeon_cp.c
	shared-core/radeon_drv.h
2008-07-31 15:18:32 -04:00
Dave Airlie d2d7f3069d drm: userspace rip out TTM API 2008-07-31 13:31:30 +10:00
Dave Airlie 9b8d71b5eb TTM: remove API and userspace objects.
This removes all the TTM userspace API and all userspace objects.

It also removes the drm_bo_lock.c code
2008-07-31 12:54:48 +10:00
Eric Anholt ccbaad52f7 intel-gem: Replace version bump signalling GEM with I915_PARAM_HAS_GEM. 2008-07-30 14:10:36 -07:00
Eric Anholt 33c8e03787 Revert "Rename drm_mm.c and its fuctions to drm_memrange."
This reverts commit 3ad8db2071.

We ended up not needing that namespace, and I'd rather not have the churn
for producing diffs.
2008-07-30 11:25:34 -07:00
Dave Airlie d659302e09 radeon: add some handles to the sarea + kernel mm available check 2008-07-30 17:05:50 +10:00
Dave Airlie 95c02743c9 i915: more version checks 2008-07-30 16:52:13 +10:00
Dave Airlie 02b09d271c i915: add version checks for opregion on old kernels 2008-07-30 16:26:59 +10:00
Nicolai Haehnle 90b90c65dc r300: Fix cliprect emit
This makes our handling of cliprects sane. drm_clip_rect always has exclusive
bottom-right corners, but the hardware expects inclusive bottom-right corners,
so we adjust this here.

This complements Michel Daenzer's commit 57aea290e1e0a26d1e74df6cff777eb9f038f1f8
to Mesa. See also http://bugs.freedesktop.org/show_bug.cgi?id=16123 .
2008-07-29 19:59:08 +02:00
Dave Airlie 0452be8826 radeon: move code around putting emit into cs 2008-07-29 18:05:11 +10:00
Dave Airlie 4234f82acc radeon_cs: add relocate hook for mm and non-mm relocations 2008-07-29 16:51:47 +10:00
Eric Anholt 0e49e49c9f intel: Fix typo in unused register definition name. 2008-07-28 23:14:47 -07:00
Eric Anholt 1d2bb68d28 Merge commit 'origin/master' into drm-gem
Conflicts:

	linux-core/Makefile.kernel
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-28 23:12:26 -07:00
Stuart Bennett 6b903f5edf nouveau: fix nv04 fifo context save to save reg contents, not reg offset
clearly the function had never been used :)
2008-07-29 02:32:13 +01:00
Stuart Bennett 591f6bcba3 nouveau: fix bad rename from 5a072f32c8 2008-07-29 02:26:34 +01:00
Eric Anholt 487c42bd42 intel-gem: Another checkpatch.pl pass. 2008-07-28 11:45:22 -07:00
Eric Anholt f85fd1b42d intel-gem: Speed up tiled readpixels by tracking which pages have been flushed.
This is around 3x or so speedup, since we would read wide rows at a time, and
clflush each tile 8 times as a result.  We'll want code related to this anyway
when we do fault-based per-page clflushing for sw fallbacks.
2008-07-28 11:25:19 -07:00
Dave Airlie 42e373e903 radeon_cs: extract some offsets from packet data 2008-07-28 18:18:28 +10:00
Dave Airlie 87520347b4 r300: add some packet 3 decodes 2008-07-28 17:42:53 +10:00
Dave Airlie dc3a7c023d r300: initial command stream parser for packet 0.
this at least parses the DDX stream and lets me run gnome-terminal/metacity
2008-07-28 17:27:24 +10:00
Dave Airlie 38835f9cd2 radeon command submission start
take code from Jerome munge into a TTM IB re-use
2008-07-28 15:21:13 +10:00
Eric Anholt 04ae66db1c intel-gem: Move debug-only functions to a separate file. 2008-07-26 19:52:47 -07:00
Nicolai Haehnle c3d463840c r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEX
DRAW_INDEX writes a vertex count to VAP_VF_CNTL. Docs say that behaviour
is undefined (i.e. lockups happen) when this write is not followed by the
right number of vertex indices.

Thus we used to do the wrong thing when drawing across many cliprects was
necessary, because we emitted a sequence
 DRAW_INDEX, DRAW_INDEX, INDX_BUFFER, INDX_BUFFER
instead of
 DRAW_INDEX, INDX_BUFFER, DRAW_INDEX, INDX_BUFFER
The latter is what we're doing now and which ought to be correct.
2008-07-26 16:40:51 +02:00
Dave Airlie df9871064e radeon: add initial atombios modesetting and GEM -> TTM translation layer.
This is an initial import of the atom bios parser with modesetting support
for r500 hw using atombios. It also includes a simple memory manager
layer that translates a radeon GEM style interface onto TTM internally.

So far this memory manager has only been used for pinned object allocation
for the DDX to test modesetting.
2008-07-26 08:56:23 +10:00
Dave Airlie fb05c4d621 Merge remote branch 'origin/modesetting-101' into modesetting-gem 2008-07-26 08:38:59 +10:00
Robert Noland 965a72202b i915: Move all of the irq install/uninstall to load time.
This resolves a panic on FreeBSD which was caused by trying
to re-initialize the swap lock.  It's just much easier to
initialize all of the locks at load time.  It should also
ensure that the vblank structures are available earlier.
2008-07-23 19:55:06 -04:00
Dave Airlie 589f968173 radeon: fix typo with a better typo 2008-07-22 18:47:27 +10:00
Dave Airlie c669489813 radeon: fix type DST vs Z cache flush 2008-07-22 18:10:03 +10:00
Eric Anholt 67d1521566 intel-gem: Set up HWS when it needs a vaddr during GEM init.
This requires an updated 2D driver to not try to set it up as well.
2008-07-21 14:19:53 -07:00
Michel Dänzer b5cddbcc15 Remove accidental leftover tests.
Thanks to Nicolai Haehnle for pointing this out on IRC.
2008-07-21 13:43:12 +02:00
Michel Dänzer e4feaf506d radeon: Post-vblank-rework-rework cleanups.
Thanks to the reworked vblank-rework, we can just use the hardware frame
counter directly, and make the RADEON_PARAM_VBLANK_CRTC getparam just return
what was set by the corresponding setparam.
2008-07-21 08:16:59 +02:00
Maarten Maathuis 65803e53a6 modesetting-101: implement optional scaling and dithering properties 2008-07-20 13:49:18 +02:00
Jesse Barnes 04893aa99a i915: convert to using drm_vblank_get/put around vblank counter usage
All interrupt off vblank count updates are done in drm_vblank_get/put
now, so convert users of the vblank counter over to that interface.
2008-07-19 13:21:38 -04:00
Ben Skeggs 0ef097b598 nv50: use same dma object for fb/tt access
We depend on the VM fully now for memory protection, separate DMA objects
for VRAM and GART are unneccesary.  However, until the next interface break
(soon) a client can't depend on the objects being the same and must still
call NV_OBJ_SET_DMA_* methods appropriately.
2008-07-18 18:25:33 +02:00
Ben Skeggs 4872ac9c62 nouveau: interface changes for nv5x 3d 2008-07-18 17:44:51 +02:00
Dave Airlie 7cfdba2b30 radeon: remove microcode version 2008-07-18 14:36:47 +10:00
Dave Airlie ed7e170915 drm/radeon: fixup 0 vs NULL 2008-07-18 14:32:46 +10:00
Jesse Barnes a9427cf318 i915: remove old broken vblank code
Remove the unused (and broken) "in vblank" code now that the core has
been fixed to use a counter while interrupts are enabled.  Also make the
vblank pipe get/set ioctls into dumb stub functions, since with the new
code we can no longer let userspace control whether vblank interrupts
are enabled, or the core code will misbehave.
2008-07-17 13:55:24 -04:00
Hong Liu dfd441cf96 This is a modified version of Hong's patch from last month, with a few
modifications to make it work correctly on my test hardware (altered the
backlight write function, made it enable the legacy backlight controller
interrupts on mobile hardware, sorted the interrupt function so we don't
get an excessive number of vblank interrupts). This lets the backlight
keys on my T61 work properly, though there's a 750msec or so delay
between the request and the brightness actually changing - this sounds
awfully like the hardware spinning waiting for a status flag to become
ready, but as far as I can tell they're all set correctly. If anyone can
figure out what's wrong here, it'd be nice to know.

Some of the functions are still stubs and just tell the hardware that
the request was successful. These can be filled in as kernel modesetting
gets integrated. I think it's worth getting this in anyway, since it's
required for backlight control to work properly on some new platforms.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2008-07-15 10:14:17 -07:00
Dave Airlie abdd523c75 drm: add fix for PAT on radeon with 2.6.26 2008-07-15 16:18:22 +10:00
Eric Anholt a0474be4e7 intel-gem: Add two new ioctls for managing tiling on objects.
Various chips have exciting interactions between the CPU and the GPU's
different ways of accessing interleaved memory, so we need some kernel
assistance in determining how it works.

Only fully tested on GM965 so far.
2008-07-11 18:58:02 -07:00
Dave Airlie 2556341f8b Merge remote branch 'origin/modesetting-101' into modesetting-gem 2008-07-09 14:53:47 +10:00
Ben Skeggs c7ed2c6791 nouveau: interface changes for nv5x 3d 2008-07-08 12:35:50 +10:00
Kristian Høgsberg 38a5f6686c Add back flink, open and close ioctls.
They fell through the cracks in 86accbcb.
2008-07-07 18:00:23 -04:00
Kristian Høgsberg 3e02f7fd31 Merge commit 'origin/drm-gem' into ms-gem
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/i915_drv.c
	linux-core/i915_gem.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-07 15:43:43 -04:00
Maarten Maathuis 6738e7b00b modesetting-101: Rename DPMS modes to avoid compatibility issues with xorg definitions. 2008-07-06 11:08:49 +02:00
Maarten Maathuis e810cb9243 modesetting-101: rename modeflags, as to avoid conflicts with the xorg definitions 2008-07-06 10:52:25 +02:00
Maarten Maathuis 7cbc5f6145 modesetting-101: Make the interface variable names a little more consistent + modeprint changes.
- All things are now called _id when they are id's.
- modeprint now accepts driver name as first argument.
2008-07-05 12:04:07 +02:00
Maarten Maathuis c9915d695d modesetting-101: Move some defines used for enumeration into the public header.
- Otherwise userspace has no idea of the meaning.
2008-07-04 17:28:04 +02:00
Dave Airlie 142a309604 modesetting: rip out all of the generation code.
not needed, hotplug will work just as well hopefully.
2008-07-04 09:34:24 +10:00
Maarten Maathuis 062d850620 nv50: s/FALSE/false && s/TRUE/true 2008-07-03 09:08:01 +02:00
Zhenyu Wang 401f77a2ef i915: official name for GM45 chipset
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
2008-07-03 00:49:51 +08:00
Maarten Maathuis f1fe9178f1 NV50: basic fbcon + misc fixes
- There is one fb, used for as many outputs as possible.
- Eventually smaller screens will be scaled to see the full console, but for the moment this'll do.
2008-07-02 16:14:48 +02:00
Jesse Barnes 301d984ea8 i915: only use tiled blits on 965+
When scheduled swaps occur, we need to blit between front & back buffers.  I
the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit,
only on 965 chips, since it will cause corruption on pre-965 (e.g. 945).

Bug reported by and fix tested by Tomas Janousek <tomi@nomi.cz>.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-07-01 16:10:01 -07:00
Maarten Maathuis bc32d1798a NV50: some i2c cleanup 2008-07-01 15:14:30 +02:00
Maarten Maathuis 91c742663a NV50: use list_head item instead of list_head head to avoid confusion 2008-06-27 18:58:13 +02:00
Maarten Maathuis 4d85d5d251 NV50: i misunderstood NOUVEAU_MEM_INTERNAL, so remove it 2008-06-25 15:27:07 +02:00
Maarten Maathuis 09b67dda0b NV50: Some cleanup and fixes. 2008-06-25 15:16:38 +02:00
Ben Skeggs be72762816 nv50: when destroying a channel make sure it's not still current on PFIFO
We won't get a PFIFO context switch when the same channel ID is recreated if
the hw still thinks the channel is already active, which causes fun issues.

Should allow X to be stopped and started without tearing down the entire
card state in lastclose().
2008-06-25 09:55:19 +02:00
Ben Skeggs 5a0164d1e1 nouveau: allocate drm-use vram buffers from end of vram.
This avoids seeing garbage from engine setup etc before X gets around
to pointing the CRTCs at a new scanout buffer.  Not actually a noticable
problem before G80 as PRAMIN is forced to the end of VRAM by the hardware
already.
2008-06-25 09:55:14 +02:00
Ben Skeggs 5d27fd94af nv50: when destroying a channel make sure it's not still current on PFIFO
We won't get a PFIFO context switch when the same channel ID is recreated if
the hw still thinks the channel is already active, which causes fun issues.

Should allow X to be stopped and started without tearing down the entire
card state in lastclose().
2008-06-25 16:49:48 +10:00
Keith Packard d250a55fc6 [intel] Get vblank pipe from irq_mask_reg instead of hardware enable reg
With the interrupt enable/disable using only the mask register, it was wrong
to use the enable register to detect which pipes had vblank detection
turned on. Also, as we keep a local copy of the mask register around, and
MSI machines smack the hardware during the interrupt handler, it is more
efficient and more correct to use the local copy.
2008-06-24 13:39:25 -07:00
Keith Packard e36da6a133 [intel] Create functions to enable/disable interrupts
This shares common code sequences for managing the interrupt register bits
2008-06-24 13:08:04 -07:00
Jesse Barnes 893cd01a1d i915: register definition & header file cleanup
It would be nice if one day the DRM driver was the canonical source for
register definitions and core macros.  To that end, this patch cleans things up
quite a bit, removing redundant definitions (some with different names
referring to the same register) and generally tidying up the header file.
2008-06-24 12:51:29 -07:00
Keith Packard ed73651d47 [intel-gem] Recover resources from wedged hardware.
Clean up queues, free objects. On the next entervt, unmark the hardware to
let the user try again (presumably after resetting the chip). Someday we'll
automatically recover...
2008-06-24 09:52:14 -07:00
Maarten Maathuis 30f153a7c2 nouveau: disable KMS for pre-NV50 even when specifically enabled 2008-06-22 19:31:55 +02:00
Ben Skeggs 01e8f0ea42 nv50: oops, keep VRAM allocations aligned at 64KiB - that's our page size.. 2008-06-23 02:42:15 +10:00
Ben Skeggs 89cf2ee2e5 nv50: use same dma object for fb/tt access
We depend on the VM fully now for memory protection, separate DMA objects
for VRAM and GART are unneccesary.  However, until the next interface break
(soon) a client can't depend on the objects being the same and must still
call NV_OBJ_SET_DMA_* methods appropriately.
2008-06-23 01:24:11 +10:00
Ben Skeggs b9ed0f9950 nouveau: allocate drm-use vram buffers from end of vram.
This avoids seeing garbage from engine setup etc before X gets around
to pointing the CRTCs at a new scanout buffer.  Not actually a noticable
problem before G80 as PRAMIN is forced to the end of VRAM by the hardware
already.
2008-06-23 01:00:42 +10:00
Maarten Maathuis 473a1997ac NV50: Initial import of kernel modesetting. 2008-06-22 16:29:00 +02:00
Alex Deucher 207f701e1a RADEON: 0x1002 0x5657 is actually an RV410
See bug 14289
2008-06-21 10:46:55 -04:00
Keith Packard a369bf0e57 [intel] Use IMR instead of IER to pend interrupts during ISR
Noting that the interrupt mask register was more reliable than the interrupt
enable register for managing interrupts in user_irq_on/user_irq_off, this
patch replaces the remaining IER frobbing with IMR instead.

The test which exposes IER related failures is:

$ glxgears & glxgears & glxgears
(reposition the glxgears windows away from the upper left corner)
$ while :; do x11perf -rect100 -reps 800 -repeat 1; sleep 1; done &
$ while :; do runoa; runet; done &
2008-06-21 00:33:07 -07:00
Keith Packard 33114e4a11 [intel] Count received interrupts
Another patch adds this to a /proc/dri file for debugging and monitoring.
2008-06-21 00:12:21 -07:00
Keith Packard 71b1623e22 [intel-gem] Add intel-specific /proc entries to help monitor gem operation
This adds gem_active, gem_flushing, gem_inactive, gem_request and gem_seqno
entries to monitor gem operation and help debug issues.
2008-06-20 21:07:46 -07:00
Keith Packard 918420deef [intel-gem] Use shmem_getpage instead of find_or_create_page
find_or_create_page doesn't quite set up pages correctly; any newly created
pages aren't hooked into the shmem object quite right; user space mmaps of
those pages end up mapping pages full of zeros which then get written to the
real pages inappropriately. This patch requires that the kernel export
shmem_getpage.
2008-06-20 00:21:57 -07:00
Keith Packard 52e5d24fae [intel-gem] Add DRM_IOCTL_I915_GEM_SW_FINISH to flag CPU writes
When a software fallback has completed, usermode must notify the kernel so
that any scanout buffers can be synchronized. This ioctl should be called
whenever a fallback completes to flush CPU and chipset caches.
2008-06-20 00:21:57 -07:00
Dave Airlie 9d79944a93 r300: fix warning 2008-06-20 15:35:16 +10:00
Jesse Barnes 86accbcb34 Merge commit 'origin/drm-gem' into modesetting-gem
Lots of conflicts, seems to load ok, but I'm sure some bugs snuck in.

Conflicts:

	linux-core/drmP.h
	linux-core/drm_lock.c
	linux-core/i915_gem.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-06-18 15:25:54 -07:00
Zhenyu Wang 00f549bd5f i915: Add support for Intel 4 series chipsets
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
2008-06-18 14:19:38 +08:00
Eric Anholt c847271179 [linux] Use the device's irq for handler setup instead of stale dev->irq.
This fixes registration when MSI is set up after the stub function fills in
dev->irq.  Otherwise /proc/interrupts would report attachment to the fasteoi
interrupt.  dev->irq is still exposed (and updated at IRQ setup)
for the drivers that use it for whatever reason.
2008-06-16 15:09:11 -07:00
Jerome Glisse 59112c9e52 radeon: *really* fix screen corruption thanks to Lukasz Krotowski 2008-06-15 20:18:29 +02:00