Thomas Hellstrom
609e3b0375
Implement a policy for selecting memory types.
2007-02-06 14:20:33 +01:00
Stephane Marchesin
17985f07d6
nouveau: more work on the nv04 context switch code.
2007-02-06 01:17:32 +01:00
Stephane Marchesin
8c663b4e56
nouveau: and of course, I was missing the last nv04 piece.
2007-02-03 06:13:27 +01:00
Stephane Marchesin
0c13657c33
nouveau: plugin the nv04 graph init function.
2007-02-03 06:00:29 +01:00
Stephane Marchesin
7ab9e7f36f
nouveau: cleanup the nv04 pgraph save/restore mechanism.
2007-02-03 05:56:42 +01:00
Stephane Marchesin
d69902db3b
nouveau: fix nv04 graph routines for new register names.
2007-02-03 05:25:36 +01:00
Stephane Marchesin
5a072f32c8
nouveau: rename registers to their proper names.
2007-02-03 04:57:06 +01:00
Stephane Marchesin
e64dbef911
nouveau: add NV04 registers required for PGRAPH context switching.
2007-02-03 04:23:09 +01:00
Matthieu Castet
55f7859a25
nouveau: nv ctx switch opps the size of array was wrong
2007-02-02 23:01:03 +01:00
Matthieu Castet
63cf3b3da7
nouveau: nv10 ctx switch, some regs are nv17+ only
2007-02-02 20:08:33 +01:00
Thomas Hellstrom
6c04185857
via: Try to improve command-buffer chaining.
...
Bump driver date and patchlevel.
2007-02-02 09:22:30 +01:00
Thomas Hellstrom
70bba11bc7
Disable AGP DMA for chips with the new 3D engine.
2007-02-02 09:22:15 +01:00
Thomas Hellstrom
3024f23c65
memory manager: Make device driver aware of different memory types.
...
Memory types are either fixed (on-card or pre-bound AGP) or not fixed
(dynamically bound) to an aperture. They also carry information about:
1) Whether they can be mapped cached.
2) Whether they are at all mappable.
3) Whether they need an ioremap to be accessible from kernel space.
In this way VRAM memory and, for example, pre-bound AGP appear
identical to the memory manager.
This also makes support for unmappable VRAM simple to implement.
2007-01-31 14:50:57 +01:00
Ben Skeggs
ee4ac5c897
nouveau: determine chipset type at startup, instead of every time we use it.
2007-01-28 23:48:33 +11:00
Matthieu Castet
c744bfde2d
make works ctx switch on nv10.
2007-01-26 21:57:44 +01:00
Patrice Mandin
9c03ca81e7
nouveau: oops, wrong indexing in nv17 regs
2007-01-26 21:05:59 +01:00
Patrice Mandin
5534c90ff3
nouveau: read gpu type once
2007-01-26 19:54:35 +01:00
Patrice Mandin
05d3ed472e
nouveau: only save/restore nv17 regs on nv17,18 hw
2007-01-26 19:25:49 +01:00
Patrice Mandin
e7ba15a003
nouveau: add extra pgraph registers
2007-01-26 19:24:34 +01:00
Patrice Mandin
d4c9f135b5
nouveau: add some nv10 pgraph defines
2007-01-26 18:10:31 +01:00
Patrice Mandin
6d9ef1a960
nouveau: simplify and fix BIG_ENDIAN flags
2007-01-25 23:06:48 +01:00
Ben Skeggs
90ae39d2f0
nouveau: nv4c default context
2007-01-25 11:11:01 +11:00
Ben Skeggs
aa7266385e
nouveau: always print nsource/nstatus regs on PGRAPH errors
2007-01-25 08:16:23 +11:00
Zou Nan hai
7d4e6b1445
vblank interrupt fix
2007-01-24 16:33:21 +08:00
Ben Skeggs
19ba074938
nouveau: fix getparam from 32-bit client on 64-bit kernel
2007-01-19 15:41:51 +11:00
Ben Skeggs
4291df69bd
nouveau: re-add 6150 Go pciid (0x0244)
2007-01-19 15:16:18 +11:00
Jeremy Kolb
a40de938fa
nouveau: cleanup nv30_graph.c
2007-01-18 21:40:21 -05:00
Jeremy Kolb
ab72a7714e
nouveau: Remove write to CTX_SIZE. This gives us proper nv3x PGRAPH switching.
2007-01-18 21:40:21 -05:00
Dave Jones
bd0418cb01
add missing quadro id
2007-01-18 17:35:28 +11:00
Jeremy Kolb
78a4f5c1bc
nouveau: Try to get nv35 pgraph switching working. Doesn't quite yet.
...
Hook into nv20 pgraph switching functions (they're identical for nv3x).
Actually call nv30_pgraph_context_init so the ctx_table is allocated.
Thanks to Carlos Martin for the help.
2007-01-17 08:46:59 -05:00
Matthieu Castet
fdbc34fab0
nouveau: opps nv20 ctx ramin size was wrong
2007-01-14 20:04:20 +01:00
Matthieu Castet
06cd155595
nouveau: opps restored the wrong channel
2007-01-13 23:30:43 +01:00
Matthieu Castet
f04347f371
nouveau: nv20 graph ctx switch.
...
Untested...
2007-01-13 23:19:41 +01:00
Matthieu Castet
cd5f543b2f
nouveau: first step to make graph ctx works
...
It is still not working, but now we could use some 3D commands
without needed to run nvidia blob before.
2007-01-13 21:44:50 +01:00
Matthieu Castet
4ae64a1b58
nouveau: add and indent pgraph regs
2007-01-13 21:44:50 +01:00
Stephane Marchesin
1967aa82cf
nouveau: Oops, fix the nv04 RAMFC_DMA_FETCH value.
2007-01-13 12:32:50 +01:00
Matthieu Castet
1bad7e0d02
nouveau : remove useless init : we clear RAMIN before
2007-01-12 20:31:18 +01:00
Haihao Xiang
9d3deddc4a
Delay for a usec while spinning waiting for ring buffer space.
...
This means the loop will wait up to ~10ms for ring buffer space to become
available, rather than just however long it takes to check the space 10000
times. This matches other drivers' behavior when waiting for ring buffer/fifo
space.
2007-01-12 11:24:50 -08:00
Jeremy Kolb
4297a83b48
nouveau: get nv30 context switching to work.
...
* Pulled in some registers from nv10reg.h. Needed for context switching.
* Filled in nv30 graphics context (based on nv40_graph.c).
* Figure out nv30 context table, set up on context creation. Allows the cards automatic switching to work.
2007-01-12 00:14:54 -05:00
Michel Dänzer
8ff026723c
radeon: Fix u32 overflows when determining AGP base address in card space.
...
The overflows could lead to the AGP aperture overlapping the framebuffer area
in the card's address space when the latter is located at the very end of the
32 bit address space, which would result in a freeze on X server startup,
probably because the card read commands from the framebuffer instead of from
AGP.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392915 .
2007-01-11 09:02:07 +01:00
Dave Airlie
a70aedd5fc
novueau: try resource 3 if resource 2 is 0 length
...
This happens on my NV43 PPC
2007-01-09 13:48:38 +11:00
Stephane Marchesin
deba42ef32
nouveau: fix nv4a context size.
2007-01-08 20:55:57 +01:00
Stephane Marchesin
d0080d71b9
nouveau: nv4a context support.
2007-01-08 05:02:40 +01:00
Stephane Marchesin
6eaa1272b4
Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm
2007-01-08 03:50:34 +01:00
Ben Skeggs
26bf6d9b5b
nouveau: oops
2007-01-08 12:50:44 +11:00
Ben Skeggs
128d87a3dd
nouveau: nv43 context stuff
2007-01-08 12:47:51 +11:00
Stephane Marchesin
1f0f7d7a18
nouveau: fix a stupid bug from me.
2007-01-08 00:11:39 +01:00
Ben Skeggs
faa4612299
nouveau: avoid allocating vram that's used as instance memory.
2007-01-08 00:44:02 +11:00
Ben Skeggs
cd3711455e
nouveau: map pci resource 2 on >=nv40
2007-01-08 00:44:02 +11:00
Keith Packard
31daf66962
Revert i915 drm driver name to i915; miniglx doesn't work otherwise
...
Yes, this driver supports the new memory manager, that is indicated by the
version number being >= 1.7.
2007-01-06 17:40:50 -08:00
Wang Zhenyu
2851c9f5c6
Bump i915 minor for ARB_OC ioctl
2007-01-06 16:26:54 -08:00
Zou Nan hai
f7180349fd
i915: ARB_Occlusion_query(MMIO ioctl) support.
...
This adds a new ioctl for passing counter information from the chip back to
applications, these counters include the data needed to perform OC.
2007-01-06 16:22:08 -08:00
Ben Skeggs
1f1714cf3d
nouveau: get c51 doing glxgears without the binary driver's help.
2007-01-06 18:05:21 +11:00
Ben Skeggs
dbb0d979cc
nouveau: Use PMC_BOOT_0 to determine which ctx_voodoo to load.
2007-01-06 17:50:00 +11:00
Stephane Marchesin
528ab8ce40
nouveau: oops, we don't need OS_HAS_MTRR actually.
2007-01-05 20:59:45 +01:00
Stephane Marchesin
d99c7c27e2
Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm
2007-01-05 20:50:46 +01:00
Stephane Marchesin
025f281bbf
nouveau: Add an mtrr over the whole FB
2007-01-05 20:49:34 +01:00
Matthieu Castet
0f95ddc428
Merge branch 'master' of git+ssh://matc@git.freedesktop.org/git/mesa/drm/
2007-01-05 19:41:12 +01:00
Matthieu Castet
9d167f1f4b
Add basic pgraph context for nv10.
...
It only fake a context switch : pgraph state are not save/restored.
2007-01-05 19:40:11 +01:00
Stephane Marchesin
f80659bc29
Cleanup the nv04 fifo code a bit.
2007-01-05 19:37:06 +01:00
Michel Dänzer
4fe2858f53
i915: Fix a DRM_ERROR that should be DRM_DEBUG.
...
It would clutter up the kernel output in a situation which is legitimate before
X.org 7.2 and handled correctly by the 3D driver.
2007-01-02 10:05:48 +01:00
Ben Skeggs
91855bb254
nouveau: oops, forgot to free RAMIN..
2007-01-02 16:35:00 +11:00
Ben Skeggs
861017e6d5
nouveau: Hookup nv40_graph_init.
...
Now I can get 3D + working grctx switching on my NV40 without
the binary driver initialising the card first. However, this
change also breaks 3D on my C51 even *with* the binary driver's
help. So, it's likely that the weird voodoo is card-specific.
2007-01-02 15:56:10 +11:00
Ben Skeggs
41da9fd2e5
nouveau: Hook up grctx code for NV4x.
...
This is enough to get grctx switching going on my NV40 and C51 after
the binary driver has initialised the card first.
Bumping the drm patchlevel because the ddx needs some modifications to
have NV4x work at all with these changes.
2007-01-02 15:08:04 +11:00
Ben Skeggs
0e0d954584
nouveau: Add nv40-specific PGRAPH code, not hooked up yet.
2007-01-02 14:52:43 +11:00
Ben Skeggs
2c3bc69ba2
nouveau: Only clobber PFIFO if no channels are already alloc'd
...
With this change the GPU is responsible for doing the channel switch
itself. This is needed for the upcoming NV4x PGRAPH context work as
we don't yet know enough to manually swap PGRAPH contexts.
2007-01-02 14:41:34 +11:00
Thomas Hellstrom
a16a8a47cd
Add some new via chipsets.
...
Disable 3D functionality and AGP DMA for chipsets with the DX9 3D engine.
2006-12-28 22:17:08 +01:00
Thomas Hellstrom
7859bd61d3
Leftover from previous commit.
2006-12-27 19:46:46 +01:00
Thomas Hellstrom
2980ec22a1
Allow for non-power-of-two texture pitch alignment.
2006-12-27 19:38:33 +01:00
Ben Skeggs
c38ede0667
nouveau: return the *actual* type of memory alloc'd to userspace
2006-12-27 01:58:57 +11:00
Ben Skeggs
9e019df757
nouveau: Alloc cmdbuf for each channel individually
2006-12-26 23:30:26 +11:00
Ben Skeggs
b7586ab539
nouveau: save/restore endianness flag on FIFO switch
...
This makes my G5 survive glxinfo and nouveau_demo - airlied
2006-12-21 17:47:10 +11:00
Thomas Hellstrom
3b47b27558
Some via PCI posting flushes.
2006-12-20 13:04:21 +01:00
Dave Airlie
e5c4a26a29
Merge branch 'nouveau-1'
2006-12-20 10:30:16 +11:00
Dave Airlie
7458909bea
fixup i915 return values from kernel
2006-12-19 21:48:18 +11:00
Dave Airlie
07635f26a9
fix comment in r128
2006-12-19 17:58:20 +11:00
Dave Airlie
c52dea9a7d
fix some sizes in sis_drv.h
2006-12-19 17:58:16 +11:00
Dave Airlie
8cc82c5033
remove inline from large function
2006-12-19 17:58:12 +11:00
Dave Airlie
13659357ad
make a savage function static from kernel
2006-12-19 17:58:09 +11:00
Dave Airlie
cb280ad3c0
fix missing DRM_ERR from kernel
2006-12-19 17:58:03 +11:00
Michel Dänzer
aefc7a3443
Unify radeon offset checking.
...
Replace r300_check_offset() with generic radeon_check_offset(), which doesn't
reject valid offsets when the framebuffer area is at the very end of the card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697 .
2006-12-14 19:31:56 +01:00
Ben Skeggs
1a40f3318c
Port remaining NV4 RAMIN access from the ddx into the drm.
...
Should fix lockups seen on NV4 cards.
2006-12-12 00:11:42 +11:00
Stephane Marchesin
30acb90a60
Merge the pciid work.
...
Add getparams for AGP and FB physical adresses.
Fix the MEM_ALLOC issue properly.
Fix context switches for nv44.
Change the DRM version to 0.0.1.
2006-12-03 10:02:54 +01:00
Michel Dänzer
a97bb85c2a
Unshare drm_drawable.c again for now.
...
The current version didn't build on BSD, where the new functionality isn't used
yet anyway. Whoever changes that will hopefully be able to make the OSes share
this file as well.
2006-12-01 10:46:21 +01:00
Ben Skeggs
80d75cf695
Use nouveau_mem.c to allocate RAMIN.
2006-11-30 10:31:42 +11:00
Ben Skeggs
b1a9a76971
Wrap access to objects in RAMIN.
...
This will make it easier to support extra RAMIN in vram at a later point.
2006-11-30 08:35:42 +11:00
Matthieu Castet
f48a7685bd
For nv10, bit 16 of RAMFC need to be set for 64 bytes fifo context.
...
When cleaning a fifo, we shouldn't assume everybody use nv40 ;)
Fill DMA_SUBROUTINE fill correct value.
2006-11-28 21:32:03 +01:00
Michel Dänzer
ddcb994c3e
i915_vblank_tasklet: Try harder to avoid tearing.
...
Previously, if there were several buffer swaps scheduled for the same vertical
blank, all but the first blit emitted stood a chance of exhibiting tearing. In
order to avoid this, split the blits along slices of each output top to bottom.
2006-11-27 11:32:33 +01:00
Stephane Marchesin
0a364be289
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
2006-11-21 23:32:58 +01:00
Ben Skeggs
adf71cb29b
Don't spam dmesg if PMC_INTSTAT is 0
2006-11-21 11:41:46 +11:00
Ben Skeggs
9ac7a8b0b4
Only return FIFO number if the FIFO is marked as in use..
2006-11-18 10:09:29 +11:00
Ben Skeggs
e9194dd1b0
Check some return vals, fixes a couple of oopses.
2006-11-18 10:03:45 +11:00
Ben Skeggs
18bba3fa29
Dump some useful info when a PGRAPH error occurs.
...
The "channel" detect doesn't work on my nv40, but the rest
seems to produce sane info.
2006-11-17 08:05:23 +11:00
Stephane Marchesin
5e7f58474d
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
2006-11-16 14:47:52 +01:00
Ben Skeggs
2fd812f8ef
Completely untested NV10/20/30 FIFO context switching changes.
2006-11-14 09:00:31 +11:00
Ben Skeggs
7002082944
Restructure initialisation a bit.
...
- Do important card init in firstopen
- Give each channel it's own cmdbuf dma object
- Move RAMHT config state to the same place as RAMRO/RAMFC
- Make sure instance mem for objects is *after* RAM{FC,HT,RO}
2006-11-14 08:11:49 +11:00
Ben Skeggs
35bf8fb5cf
Merge branch 'nouveau-1' of git+ssh://git.freedesktop.org/git/mesa/drm into nouveau-1
2006-11-14 04:52:08 +11:00
Ben Skeggs
9ef4bbc66c
Hack around yet another "X restart borkage without nouveau.ko reload" problem.
...
On X init, PFIFO and PGRAPH are reset to defaults. This causes the GPU to
loose the configuration done by the drm. Perhaps a CARD_INIT ioctl a proper
solution to having this problem again in the future..
2006-11-14 04:51:13 +11:00
Stephane Marchesin
5a0cdf7db3
Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
2006-11-11 01:57:05 +01:00
Stephane Marchesin
1123ab0890
Fix memory detection on TNT2 M64/TNT2 vanta.
2006-11-10 02:18:38 +01:00
Eric Anholt
584acab6d6
Add drm_u64_t typedef on non-linux to fix libdrm build.
2006-11-07 09:36:40 -08:00
Dave Airlie
f7affda35b
drm: fixup page alignment on SAREA map on ppc64
2006-11-06 11:44:36 +11:00
Dave Airlie
2dd3c039fd
fixup fifo size so it is page aligned
2006-11-06 11:42:15 +11:00
Dave Airlie
5e55594061
use a uint64_t for this not a pointer
2006-11-06 11:41:51 +11:00
Dave Airlie
1e90b7ee8c
Merge branch 'master' into nouveau-1
...
Conflicts:
linux-core/Makefile.kernel
2006-11-06 08:03:18 +11:00
Ben Skeggs
0c34d0f31a
Leave the bottom 64kb of RAMIN untouched.
...
The binary driver will screw up either it's init or shutdown, leaving the
screen(s) in an unusable state without this. Something important in there?
2006-11-06 05:46:03 +11:00
Dave Airlie
94ab96c4d8
nouveau: add compat ioc32 support
2006-11-05 20:39:13 +11:00
Dave Airlie
665c8385c7
add powerpc mmio swapper to NV_READ/WRITE macros
2006-11-05 19:46:53 +11:00
Stephane Marchesin
06639801ce
Add some getparams.
2006-11-04 20:39:59 +01:00
Stephane Marchesin
3ea0500be1
Move the context object creation flag handling to the drm.
2006-11-04 16:56:10 +01:00
Thomas Hellstrom
decacb2e64
Reserve the new IOCTLs also for *bsd.
...
Bump libdrm version number to 2.2.0
2006-10-27 13:08:31 +02:00
Thomas Hellstrom
f6d5fecdd2
Last minute changes to support multi-page size buffer offset alignments.
...
This will come in very handy for tiled buffers on intel hardware.
Also add some padding to interface structures to allow future binary backwards
compatible changes.
2006-10-27 11:28:37 +02:00
Thomas Hellstrom
d70347bfc0
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm
2006-10-19 17:07:26 +02:00
Thomas Hellstrom
e22b04f807
Merging drm-ttm-0-2-branch
...
Conflicts:
linux-core/drmP.h
linux-core/drm_drv.c
linux-core/drm_irq.c
linux-core/drm_stub.c
shared-core/drm.h
shared-core/i915_drv.h
shared-core/i915_irq.c
2006-10-18 17:33:19 +02:00
Thomas Hellstrom
c34faf224b
Remove max number of locked pages check and call, since
...
that is now handled by the memory accounting.
2006-10-17 20:03:26 +02:00
Ben Skeggs
b5cf0d635c
Remove hack which delays activation of a additional channel. The previously active channel's state is saved to RAMFC before PFIFO gets clobbered.
2006-10-18 02:37:19 +11:00
Ben Skeggs
725984364b
Oops, we have more than 4 subchannels..
2006-10-18 01:07:48 +11:00
Ben Skeggs
55de3f763f
Useful output on a FIFO error interrupt.
2006-10-17 23:44:05 +11:00
Ben Skeggs
07059f4278
typo
2006-10-17 23:08:03 +11:00
Thomas Hellstrom
5881ce1b91
Extend generality for more memory types.
...
Fix up init and destruction code.
2006-10-17 11:05:37 +02:00
Michael Karcher
561e23a7c2
dev->agp_buffer_map is not initialized for AGP DMA on savages
...
bug 8662
2006-10-16 22:06:58 -04:00
Ben Skeggs
4b43ee63f9
NV40: *Now* fifo ctx switching works for me..
...
Ok, I lied before.. it was a fluke it worked and required magic to repeat it..
It actually helps to fill in RAMFC entries in the correct place.
The code also clears RAMIN entirely instead of just the hash-table.
2006-10-17 12:33:49 +11:00
Ben Skeggs
98e718d48f
NV40: FIFO context switching now WorksForMe(tm)
2006-10-17 07:29:31 +11:00
Ben Skeggs
1943f39d8c
Setup NV40 RAMFC (in wrong location.. but anyway), rearrange the RAMFC setup code a bit.
2006-10-17 06:37:40 +11:00
Ben Skeggs
95486bbde0
Some info on NV40's RAMFC
2006-10-17 06:12:18 +11:00
Stephane Marchesin
93fee5cf22
Merge branch 'master' of git://anongit.freedesktop.org/git/mesa/drm into nouveau-1
2006-10-15 00:12:13 +02:00
Stephane Marchesin
2c5b91aecf
Again more work on context switches. They work, sometimes. And when they do they seem to screw up the PGRAPH state.
2006-10-14 16:36:11 +02:00
Dave Airlie
1bab514c0a
remove config.h from build no longer exists kbuild does it
2006-10-14 23:38:20 +10:00
Stephane Marchesin
3a0cd7c7e2
Add the missing breaks.
2006-10-14 01:21:31 +02:00
Stephane Marchesin
b509abe413
Fix the fifo context size on nv10, nv20 and nv30.
2006-10-13 22:35:22 +02:00
Ben Skeggs
4988074794
Fix some randomness in activating a second channel on NV40 (odd GET/PUT vals). Ch 1 GET now advances, but no ctx_switch.
2006-10-14 06:57:49 +11:00
Stephane Marchesin
a9c6c3f21d
Oops.
2006-10-12 21:18:55 +02:00
Stephane Marchesin
7ef44b2b8d
Still more work on the context switching code.
2006-10-12 17:31:49 +02:00
Thomas Hellstrom
10150df02b
Simplify the AGP backend interface somewhat.
...
Fix buffer bound caching policy changing, Allow
on-the-fly changing of caching policy on bound buffers if the hardware
supports it.
Allow drivers to use driver-specific AGP memory types for TTM AGP pages.
Will make AGP drivers much easier to migrate.
2006-10-12 12:09:16 +02:00
Stephane Marchesin
a749d9d5b4
More work on the context switch code. Still doesn't work. I'm mostly convinced it's an initialization issue.
2006-10-12 01:08:15 +02:00
Thomas Hellstrom
f2db76e2f2
Big update:
...
Adapt for new functions in the 2.6.19 kernel.
Remove the ability to have multiple regions in one TTM.
This simplifies a lot of code.
Remove the ability to access TTMs from user space.
We don't need it anymore without ttm regions.
Don't change caching policy for evicted buffers. Instead change it only
when the buffer is accessed by the CPU (on the first page fault).
This tremendously speeds up eviction rates.
Current code is safe for kernels <= 2.6.14.
Should also be OK with 2.6.19 and above.
2006-10-11 13:40:35 +02:00
Stephane Marchesin
dd473411f8
Context switching work.
...
Added preliminary support for context switches (triggers the interrupts, but hangs after the switch ; something's not quite right yet).
Removed the PFIFO_REINIT ioctl. I hope it's that a good idea...
Requires the upcoming commit to the DDX.
2006-10-11 00:28:15 +02:00
Roland Scheidegger
a9f57a2b9c
only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither.
2006-10-10 02:24:19 +02:00
George Sapountzis
c9e3aa961e
Bug 6242: [mach64] Use private DMA buffers, part #4 .
...
mach64_state.c: convert the DRM_MACH64_BLIT ioctl to submit a pointer to
user-space memory rather than a DMA buffer index, similar to DRM_MACH64_VERTEX.
This change allows the DDX to map the DMA buffers read-only and eliminate a
security problem where a client can alter the contents of the DMA buffer after
submission to the DRM.
This change also affects the DRI/DRM interface. Performace-wise, it basically
affects PCI mode where I get a ~12% speedup for some Mesa demos I tested.
This is mainly due to eliminating an ioctl for allocating the DMA buffer.
mach64_dma.c: move the responsibility for allocating memory for the DMA ring
in PCI mode to the DDX.
This change affects the DDX/DRM interface and unifies a couple of PCI/AGP code
paths for ring memory in the DRM.
Bump the mach64 DRM version major and date.
2006-10-02 22:47:26 +03:00
George Sapountzis
f3deef730d
Bug 6242: [mach64] Use private DMA buffers, part #3 .
...
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.
2006-10-02 22:47:23 +03:00
George Sapountzis
25760c30d4
Bug 6242: [mach64] Use private DMA buffers, part #2 .
...
Factor out from mach64_dma_dispatch_vertex() the code to reclaim an unsed
buffer, in preperation for using it in mach64_dma_dispatch_blit() also.
2006-10-02 22:47:19 +03:00
George Sapountzis
eea150e776
Bug 6242: [mach64] Use private DMA buffers, part #1 .
...
Factor out from mach64_freelist_get() the code to reclaim a completed buffer,
this is to improve readability for me.
2006-10-02 22:47:14 +03:00
George Sapountzis
d1b31a228b
Bug 6209: [mach64] AGP DMA buffers not mapped correctly.
...
Map the DMA buffers from the same linear address as the vertex bufs. If
dev->agp_buffer_token is not set, mach64 drm maps the DMA buffers from
linear address 0x0.
2006-10-02 22:46:54 +03:00
Michel Dänzer
16be6ba63a
Fix type of second argument to spin_lock_irqsave().
...
(cherry picked from f6238cf624
commit)
2006-10-02 15:42:07 +02:00
Michel Dänzer
f6238cf624
Fix type of second argument to spin_lock_irqsave().
2006-10-02 15:33:19 +02:00
Felix Kühling
58a23d193f
drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
...
(cherry picked from d583899681
commit)
2006-10-02 11:21:10 +02:00
Felix Kühling
d583899681
drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
2006-10-02 10:50:40 +02:00
Thomas Hellstrom
8e908eaf50
Bump driver date.
2006-09-29 14:21:51 +02:00
Michel Dänzer
17a640419a
i915: Only schedule vblank tasklet if there are scheduled swaps pending.
...
This fixes issues on X server startup with versions of xf86-video-intel that
enable the IRQ before they have a context ID.
(cherry picked from 7af93dd984
commit)
2006-09-29 12:55:09 +02:00
Michel Dänzer
48367fdfe6
i915: Only initialize IRQ fields in postinstall, not the PIPE_SET ioctl.
...
Some other minor changes in preparation for actually disabling user interrupts.
2006-09-29 12:55:09 +02:00