Commit Graph

753 Commits (0467ad41188031073cbbad1139a916e2439af2f1)

Author SHA1 Message Date
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
Michel Dänzer 3620a3ec85 i915: Bump minor again to differentiate from vsync changes. 2006-09-29 12:55:09 +02:00
Michel Dänzer 390184df92 i915: Avoid mis-counting vblank interrupts when they're only enabled for pipe A.
It looks like 'after a while', I915REG_INT_IDENTITY_R for some reason always has
VSYNC_PIPEB_FLAG set in the interrupt handler, even though pipe B is disabled.
So we only increase dev->vbl_received if the corresponding bit is also set in
dev->vblank_pipe.
(cherry picked from 881ba56992 commit)
2006-09-29 12:55:09 +02:00
Michel Dänzer c0bff9f9cd i915: Bump minor for swap scheduling ioctl and secondary vblank support.
(cherry picked from 2627131e5d commit)
2006-09-29 12:55:09 +02:00
Michel Dänzer 0a7d9edcfb i915_vblank_swap: Add support for DRM_VBLANK_NEXTONMISS.
(cherry picked from 0356fe260d commit)
2006-09-29 12:55:09 +02:00
Michel Dänzer c47ebd9707 Only return EBUSY after we've established we need to schedule a new swap.
(cherry picked from 50a0284a61 commit)
2006-09-29 12:55:09 +02:00
Michel Dänzer ed82172378 Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.
(cherry picked from 89e323e490 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer c4c47a7eac Fix 'sequence has passed' condition in i915_vblank_swap().
(cherry picked from 7f09f957d9 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer f9aa4f5973 Add SAREA fileds for determining which pipe to sync window buffer swaps to.
(cherry picked from c2bdb76814 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 4a3d270862 Make handling of dev_priv->vblank_pipe more robust.
Initialize it to default value if it hasn't been set by the X server yet.

In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call
i915_enable_interrupt() if the argument passed from userspace is valid to avoid
corrupting dev_priv->vblank_pipe on invalid arguments.
(cherry picked from 87c57cba1a commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 1f3493f65b DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead of pipe number.
Handle relative as well as absolute target sequence numbers.

Return error if target sequence has already passed, so userspace can deal with
this situation as it sees fit.

On success, return the sequence number of the vertical blank when the buffer
swap is expected to take place.

Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want
to use ioctl() instead of drmCommandWriteRead().
(cherry picked from d5a0f10751 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 00531cecad Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.

Also free drawable information memory when it's no longer needed.
(cherry picked from df7551ef73 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 7d487602a3 Add copyright notice.
(cherry picked from d04751face commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer da75d59cd6 i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.
(cherry picked from 257771fa29 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer d7389a9758 Locking and memory management fixes.
(cherry picked from 23d2833aaa commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer f93e482269 Export drm_get_drawable_info symbol from core.
(cherry picked from 43f8675534 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer baa26c5faa Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.
(cherry picked from af48be1096 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 9810ec2737 Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
(cherry picked from 29598e5253 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 596d7e9984 Add support for secondary vertical blank interrupt to i915 driver.
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.
(cherry picked from 0c7d7f4361 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 2735f9e290 Add support for secondary vertical blank interrupt to DRM core.
(cherry picked from ab351505f3 commit)
2006-09-29 12:55:08 +02:00
Thomas Hellstrom ae96e26419 Add a new buffer flag.
Fix up some comments.
2006-09-29 11:46:45 +02:00
Michel Dänzer 7af93dd984 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.
2006-09-29 10:27:29 +02:00
Michel Dänzer 881ba56992 i915: Avoid mis-counting vblank interrupts when they're only enabled for pipe A.
It looks like 'after a while', I915REG_INT_IDENTITY_R for some reason always has
VSYNC_PIPEB_FLAG set in the interrupt handler, even though pipe B is disabled.
So we only increase dev->vbl_received if the corresponding bit is also set in
dev->vblank_pipe.
2006-09-28 15:41:36 +02:00
Michel Dänzer 2627131e5d i915: Bump minor for swap scheduling ioctl and secondary vblank support. 2006-09-28 15:41:36 +02:00
Michel Dänzer 0356fe260d i915_vblank_swap: Add support for DRM_VBLANK_NEXTONMISS. 2006-09-28 15:41:36 +02:00
Michel Dänzer 50a0284a61 Only return EBUSY after we've established we need to schedule a new swap. 2006-09-28 15:41:36 +02:00
Michel Dänzer 89e323e490 Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.
2006-09-28 15:41:36 +02:00
Michel Dänzer 7f09f957d9 Fix 'sequence has passed' condition in i915_vblank_swap(). 2006-09-28 15:41:36 +02:00
Michel Dänzer c2bdb76814 Add SAREA fileds for determining which pipe to sync window buffer swaps to. 2006-09-28 15:41:36 +02:00
Michel Dänzer 87c57cba1a Make handling of dev_priv->vblank_pipe more robust.
Initialize it to default value if it hasn't been set by the X server yet.

In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call
i915_enable_interrupt() if the argument passed from userspace is valid to avoid
corrupting dev_priv->vblank_pipe on invalid arguments.
2006-09-28 15:41:36 +02:00
Michel Dänzer d5a0f10751 DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead of pipe number.
Handle relative as well as absolute target sequence numbers.

Return error if target sequence has already passed, so userspace can deal with
this situation as it sees fit.

On success, return the sequence number of the vertical blank when the buffer
swap is expected to take place.

Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want
to use ioctl() instead of drmCommandWriteRead().
2006-09-28 15:41:36 +02:00
Michel Dänzer df7551ef73 Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.

Also free drawable information memory when it's no longer needed.
2006-09-28 15:41:36 +02:00
Michel Dänzer d04751face Add copyright notice. 2006-09-28 15:41:36 +02:00
Michel Dänzer 257771fa29 i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.
2006-09-28 15:41:36 +02:00
Michel Dänzer 23d2833aaa Locking and memory management fixes. 2006-09-28 15:41:36 +02:00
Michel Dänzer 43f8675534 Export drm_get_drawable_info symbol from core. 2006-09-28 15:41:35 +02:00
Michel Dänzer af48be1096 Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.
2006-09-28 15:41:35 +02:00
Michel Dänzer 29598e5253 Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
2006-09-28 15:41:35 +02:00
Michel Dänzer 0c7d7f4361 Add support for secondary vertical blank interrupt to i915 driver.
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.
2006-09-28 15:41:35 +02:00
Michel Dänzer ab351505f3 Add support for secondary vertical blank interrupt to DRM core. 2006-09-28 15:41:35 +02:00
Thomas Hellstrom c52fafa628 Don't enable fence / buffer objects on non-linux systems.
Bump driver minor and date.
2006-09-28 11:33:03 +02:00
Thomas Hellstrom 273eb7833d Add /proc filesystem buffer / fence object accounting.
Check for NULL pointer in the i915 flush handler.
Remove i915_sync_flush declaration.
2006-09-25 11:51:08 +02:00
Anish Mistry 255f3e6f76 bug 7092 : add pci ids for mach64 in Dell poweredge 4200 2006-09-22 03:43:34 +10:00
Roland Scheidegger 1f71b8d7a4 do a TCL state flush before accessing VAP_CNTL to prevent lockups on r200 when enabling/disabling vertex programs 2006-09-20 19:44:57 +02:00
Thomas Hellstrom fa511a3ff5 Allow for 64-bit map handles of ttms and buffer objects. 2006-09-20 16:31:15 +02:00
Ben Skeggs 22382bd8c5 Add pciid for GeForce Go 6150 (0x0244). 2006-09-17 13:00:27 +10:00
Michel Dänzer 6ba9127753 Use register writes instead of BITBLT_MULTI packets for buffer swap blits.
This takes up two more ring buffer entries per rectangle blitted but makes sure
the blit is performed top to bottom, reducing the likelyhood of tearing.
2006-09-15 16:55:40 +02:00