Alan Hourihane [Fri, 29 Jun 2007 19:09:44 +0000 (20:09 +0100)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:
linux-core/drm_drv.c
linux-core/drm_fops.c
linux-core/drm_objects.h
linux-core/drm_stub.c
shared-core/i915_dma.c
Thomas Hellstrom [Fri, 29 Jun 2007 13:22:28 +0000 (15:22 +0200)]
Avoid hitting BUG() for kernel-only fence objects.
Thomas Hellstrom [Fri, 29 Jun 2007 10:50:12 +0000 (12:50 +0200)]
Fence object reference / dereference cleanup.
Buffer object dereference cleanup.
Add a struct drm_device member to fence objects:
This can simplify code, particularly in drivers.
Ben Skeggs [Fri, 29 Jun 2007 03:52:55 +0000 (13:52 +1000)]
nouveau: small RAMFC cleanups
Alan Hourihane [Thu, 28 Jun 2007 20:25:13 +0000 (21:25 +0100)]
Fix type/flags usage problem to check for preferred modes.
Add more debugging to help diagnose problems.
Ben Skeggs [Thu, 28 Jun 2007 11:01:17 +0000 (21:01 +1000)]
nouveau: Hack around possible Xv blit adaptor breakage
Ben Skeggs [Wed, 27 Jun 2007 18:23:17 +0000 (04:23 +1000)]
nouveau/nv10: Fix earlier NV1x chips
Can't use nv04 code for them, since an extra field was inserted into
RAMFC after DMA_PUT/GET.
Ben Skeggs [Mon, 25 Jun 2007 05:42:55 +0000 (15:42 +1000)]
nouveau: never touch PRAMIN with NV_WRITE, cleanup RAMHT code a bit
Ben Skeggs [Mon, 25 Jun 2007 05:16:19 +0000 (15:16 +1000)]
nouveau: simplify PRAMIN access
Ben Skeggs [Sun, 24 Jun 2007 17:52:06 +0000 (03:52 +1000)]
nouveau: name some regs
Ben Skeggs [Sun, 24 Jun 2007 10:49:19 +0000 (20:49 +1000)]
nouveau/nv50: skeletal backend
Ben Skeggs [Sun, 24 Jun 2007 09:03:35 +0000 (19:03 +1000)]
nouveau: Nuke DMA_OBJECT_INIT ioctl (bumps interface to 0.0.7)
For various reasons, this ioctl was a bad idea.
At channel creation we now automatically create DMA objects covering
available VRAM and GART memory, where the client used to do this themselves.
However, there is still a need to be able to create DMA objects pointing at
specific areas of memory (ie. notifiers). Each channel is now allocated a
small amount of memory from which a client can suballocate things (such as
notifiers), and have a DMA object created which covers the suballocated area.
The NOTIFIER_ALLOC ioctl exposes this functionality.
Ben Skeggs [Wed, 27 Jun 2007 16:56:30 +0000 (02:56 +1000)]
nouveau/nv04: Set NV_PFIFO_CACHE1_PUSH1 correctly + small tweaks
Ian Romanick [Tue, 26 Jun 2007 16:51:55 +0000 (09:51 -0700)]
Add support SiS based XGI chips to SiS DRM.
Ben Skeggs [Sun, 24 Jun 2007 15:57:57 +0000 (01:57 +1000)]
nouveau: NV49/NV4B PGRAPH setup from jb17bsome and stephan_2303
Ben Skeggs [Sun, 24 Jun 2007 09:00:44 +0000 (19:00 +1000)]
nouveau: kill some dead code
Ben Skeggs [Sun, 24 Jun 2007 09:00:26 +0000 (19:00 +1000)]
nouveau: NV04/NV10/NV20 PGRAPH engtab functions
NV04/NV10 load_context()/save_context() are stubs. I don't know enough about
how they work to implement them sanely. The "old" context_switch() code
remains hooked up, so it shouldn't break anything.
NV20 will probably break if load_context() works. No inital context values
are filled in, so when the first channel is created PGRAPH will probably end
up having its state zeroed. Some setup from nv20_graph_init() will probably
need to be moved to the per-channel context setup.
Ben Skeggs [Sun, 24 Jun 2007 08:58:38 +0000 (18:58 +1000)]
nouveau: NV3X PGRAPH engtab functions
Ben Skeggs [Sun, 24 Jun 2007 08:58:14 +0000 (18:58 +1000)]
nouveau: NV1X/2X/3X PFIFO engtab functions
Earlier NV1X chips use the NV04 code, see previous commits about NV10 RAMFC
entry size.
Ben Skeggs [Sun, 24 Jun 2007 08:57:09 +0000 (18:57 +1000)]
nouveau: NV04 PFIFO engtab functions
Ben Skeggs [Sun, 24 Jun 2007 08:56:40 +0000 (18:56 +1000)]
nouveau: NV4X PGRAPH engtab functions
Ben Skeggs [Sun, 24 Jun 2007 08:56:01 +0000 (18:56 +1000)]
nouveau: NV4X PFIFO engtab functions
Ben Skeggs [Sun, 24 Jun 2007 08:55:23 +0000 (18:55 +1000)]
nouveau: split PFIFO/PGRAPH context creation
Ben Skeggs [Sun, 24 Jun 2007 08:55:06 +0000 (18:55 +1000)]
nouveau: (mostly) hook up put_base again
Ben Skeggs [Sun, 24 Jun 2007 08:54:51 +0000 (18:54 +1000)]
nouveau: prototype PFIFO/PGRAPH engtab API
Ben Skeggs [Sun, 24 Jun 2007 08:54:36 +0000 (18:54 +1000)]
nouveau: rename engtab functions
Michel Dänzer [Fri, 22 Jun 2007 09:55:26 +0000 (11:55 +0200)]
radeon: Acknowledge all interrupts we're interested in.
Failure to do so was probably the root cause of fd.o bug 11287.
Oliver McFadden [Thu, 21 Jun 2007 14:35:11 +0000 (14:35 +0000)]
r300: Synchronized the register defines file; documentation changes.
Oliver McFadden [Thu, 21 Jun 2007 14:32:58 +0000 (14:32 +0000)]
r300: Allow writes to R300_VAP_PVS_WAITIDLE.
Oliver McFadden [Mon, 18 Jun 2007 08:42:46 +0000 (08:42 +0000)]
r300: Registers 0x2220-0x2230 are known as R300_VAP_CLIP_X_0-R300_VAP_CLIP_Y_1.
Oliver McFadden [Mon, 18 Jun 2007 08:36:50 +0000 (08:36 +0000)]
r300: Synchronized the register defines file again.
David Woodhouse [Mon, 18 Jun 2007 02:45:20 +0000 (12:45 +1000)]
fix radeon setparam on 32/64 systems, harder.
Commit
9b01bd5b284bbf519b726b39f1352023cb5e9e69 introduced a
compat_ioctl handler for RADEON_SETPARAM, the sole purpose of which was
to handle the fact that on i386, alignof(uint64_t)==4.
Unfortunately, this handler was installed for _all_ 64-bit
architectures, instead of only x86_64 and ia64. And thus it breaks
32-bit compatibility on every other arch, where 64-bit integers are
aligned to 8 bytes in 32-bit mode just the same as in 64-bit mode.
Arnd has a cunning plan to use 'compat_u64' with appropriate alignment
attributes according to the 32-bit ABI, but for now let's just make the
compat_radeon_cp_setparam routine entirely disappear on 64-bit machines
whose 32-bit compat support isn't for i386. It would be a no-op with
compat_u64 anyway.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Michel Dänzer [Fri, 15 Jun 2007 15:13:11 +0000 (17:13 +0200)]
i915: Fix handling of breadcrumb counter wraparounds.
Thomas Hellstrom [Fri, 15 Jun 2007 08:35:52 +0000 (10:35 +0200)]
Fix i915 sequence mask.
Thomas Hellstrom [Fri, 15 Jun 2007 08:31:32 +0000 (10:31 +0200)]
Indentation fixes.
Thomas Hellstrom [Fri, 15 Jun 2007 08:21:31 +0000 (10:21 +0200)]
Fix refcounting / lock race.
Reported by Steve Wilkins / Michel Dänzer.
Thomas Hellstrom [Thu, 14 Jun 2007 09:52:38 +0000 (11:52 +0200)]
Locking fixes and instrumentation.
Thomas Hellstrom [Wed, 13 Jun 2007 13:59:28 +0000 (15:59 +0200)]
Fix drmMMUnlock / drmMMLock return values.
Thomas Hellstrom [Wed, 13 Jun 2007 13:38:59 +0000 (15:38 +0200)]
Make sure we read fence->signaled while spinlocked.
Thomas Hellstrom [Wed, 13 Jun 2007 13:19:30 +0000 (15:19 +0200)]
Fix fence object deref race.
Dave Airlie [Sun, 10 Jun 2007 05:40:10 +0000 (15:40 +1000)]
use krh's idr mods to remove lists from idr code
Oliver McFadden [Fri, 8 Jun 2007 19:40:57 +0000 (19:40 +0000)]
r300: Added the CP maximum fetch size and ring rptr update variables.
Dave Airlie [Thu, 7 Jun 2007 08:45:00 +0000 (18:45 +1000)]
oops must fix this properly at some point
Dave Airlie [Thu, 7 Jun 2007 08:40:41 +0000 (18:40 +1000)]
drm: fix radeon setparam alignment issues on 32/64-bit
Oliver McFadden [Tue, 5 Jun 2007 19:19:42 +0000 (19:19 +0000)]
r300: Small correction to the previous commit.
Alex Deucher [Tue, 5 Jun 2007 19:05:49 +0000 (19:05 +0000)]
r300: Document more of the RADEON_RBBM_STATUS register.
Wang Zhenyu [Tue, 5 Jun 2007 18:15:29 +0000 (11:15 -0700)]
Add support for the G33, Q33, and Q35 chipsets.
These require that the status page be referenced by a pointer in GTT, rather
than phsyical memory. So, we have the X Server allocate that memory and tell
us the address, instead.
Dave Airlie [Tue, 5 Jun 2007 08:14:54 +0000 (18:14 +1000)]
remove include of linux ioctl32.h from drm drivers
Maurice van der Pot [Mon, 4 Jun 2007 00:49:30 +0000 (10:49 +1000)]
nouveau: fix RAMHT wrapping
Dave Airlie [Sun, 3 Jun 2007 08:30:52 +0000 (18:30 +1000)]
radeon: refine irq acking for vbl on crtc 2
root [Sun, 3 Jun 2007 08:12:28 +0000 (18:12 +1000)]
Revert "drm: add new drm_wait_on function to replace macro"
This reverts commit
6e860d08d0f5b1e9a2d711aaf9fd6b982aa8039e.
As I said not a good plan - this macro will have to stay for now,
trying to do the vbl code with the inline was a bit messy - may need specialised
drm wait on functions
root [Sun, 3 Jun 2007 08:11:44 +0000 (18:11 +1000)]
Revert "move i915 to new drm_wait_on function"
This reverts commit
feb68037784ac09e333a321d294fdb2d8c57a4c8.
This was a bad idea, the macro is actually a bit harder to convert
to a static for the other use cases
Dave Airlie [Sun, 3 Jun 2007 06:28:21 +0000 (16:28 +1000)]
radeon: add support for vblank on crtc2
This add support for CRTC2 vblank on radeon similiar to the i915 support
Dave Airlie [Fri, 1 Jun 2007 09:00:24 +0000 (19:00 +1000)]
drm: fixup initialisation of list heads and idr
Wang Zhenyu [Wed, 30 May 2007 08:25:49 +0000 (16:25 +0800)]
i915: Add support for 945GME chip
Wang Zhenyu [Wed, 30 May 2007 08:24:42 +0000 (16:24 +0800)]
i915: Add support for 965GME/GLE chip.
Jung-uk Kim [Tue, 15 May 2007 20:35:33 +0000 (13:35 -0700)]
Update a bunch of FreeBSD port code.
Tested on r200/r300. i915 updates still remain to be done.
Brian [Tue, 29 May 2007 20:56:17 +0000 (14:56 -0600)]
reformatting, clean-ups
Brian [Tue, 29 May 2007 20:54:00 +0000 (14:54 -0600)]
Clean-ups and reformatting.
Use 4-space indentation consistently.
Replace occurances of:
if (cond) code;
with:
if (cond)
code;
to facilitate putting breakpoints on code.
Dave Airlie [Sat, 26 May 2007 22:44:38 +0000 (08:44 +1000)]
drm: move context handling code to use linux idr
Dave Airlie [Sat, 26 May 2007 21:26:52 +0000 (07:26 +1000)]
drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Thomas Gleixner [Fri, 25 May 2007 19:20:59 +0000 (05:20 +1000)]
drm: spinlock initializer cleanup
Michel Dänzer [Fri, 25 May 2007 18:35:54 +0000 (04:35 +1000)]
drm: make sure the drawable code doesn't call malloc(0).
Signed-off-by: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Dave Airlie [Fri, 25 May 2007 18:02:55 +0000 (04:02 +1000)]
radeon: add other IGP chipsets
Dave Airlie [Fri, 25 May 2007 17:48:08 +0000 (03:48 +1000)]
Revert "drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls."
This reverts commit
3fdef0dc2000308b16907b95f637c60acde80a74.
ditto not on master yet
Dave Airlie [Fri, 25 May 2007 17:47:48 +0000 (03:47 +1000)]
Revert "drm/ttm: cleanup most of fence ioctl split out"
This reverts commit
3dfc1400e9fc58c69292d7cf7c2e1653fa5e6991.
this shouldn't have gone on master yet
Dave Airlie [Tue, 8 May 2007 05:43:29 +0000 (15:43 +1000)]
whitespace fixups from kernel
Dave Airlie [Tue, 8 May 2007 05:09:48 +0000 (15:09 +1000)]
ati_pcigart: cut to 80 chars
Dave Airlie [Sun, 6 May 2007 01:35:11 +0000 (11:35 +1000)]
drm/ttm: cleanup most of fence ioctl split out
Dave Airlie [Sun, 6 May 2007 01:17:30 +0000 (11:17 +1000)]
drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls.
This is the first bunch of ioctls
Dave Airlie [Fri, 25 May 2007 18:26:24 +0000 (04:26 +1000)]
drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
Jesse Barnes [Fri, 25 May 2007 01:41:44 +0000 (18:41 -0700)]
Suspend/resume shouldn't call drm_initial_config (seems to work ok for me now),
also we should fail if we can't enable the device at resume time.
Jesse Barnes [Wed, 23 May 2007 00:49:04 +0000 (17:49 -0700)]
Suspend/resume support (incomplete).
Jesse Barnes [Tue, 22 May 2007 20:38:58 +0000 (13:38 -0700)]
Call preallocated space VRAM instead of PRIV0 to be more consistent with
other drivers.
Jesse Barnes [Fri, 18 May 2007 16:42:51 +0000 (09:42 -0700)]
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:
linux-core/drm_crtc.c - reconcile with locking changes
Jesse Barnes [Fri, 18 May 2007 16:40:01 +0000 (09:40 -0700)]
Add locking. The main lock is dev->mode_config.config_lock. It should be
held across any operations that modify mode lists, crtc config, output
config, etc. It should be taken at high level entry points (currently just
initial config and user IOCTL).
Seems to work ok on my system, but needs more testing (with lockdep) and
review from some fresh eyes.
Alan Hourihane [Fri, 18 May 2007 13:16:27 +0000 (14:16 +0100)]
Change some printk's to DRM_DEBUG's
Alan Hourihane [Fri, 18 May 2007 13:16:10 +0000 (14:16 +0100)]
Move fbo creation to the specified fb driver which gives
it a chance to allocate the memory from whichever buffer it wants to.
Alan Hourihane [Fri, 18 May 2007 12:59:46 +0000 (13:59 +0100)]
Fix merge problem.
Alan Hourihane [Fri, 18 May 2007 12:48:56 +0000 (13:48 +0100)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:
shared-core/i915_dma.c
Alan Hourihane [Thu, 17 May 2007 22:33:48 +0000 (23:33 +0100)]
Set crtcinfo on temporary mode
Jesse Barnes [Thu, 17 May 2007 20:48:46 +0000 (13:48 -0700)]
Remove unused edid.h header from X.Org.
Alan Hourihane [Thu, 17 May 2007 18:32:46 +0000 (19:32 +0100)]
bring in change from drm_fb.c
Alan Hourihane [Thu, 17 May 2007 18:28:03 +0000 (19:28 +0100)]
Move destruction of crtc as intelfb_remove uses the crtc to locate the fb.
Jesse Barnes [Thu, 17 May 2007 17:35:07 +0000 (10:35 -0700)]
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:
linux-core/drm_crtc.c
linux-core/drm_fb.c
Lots of changes to merge with alanh's latest stuff:
o fix use of fb->pitch now that it has the right value
o add new helper for finding the CRTC given an FB
o fix new fb_probe/fb_remove functions to take a CRTC
o fixup callers of new FB routines
o port drm_fb changes to intel_fb
o check for errors after creating fb buffer object
o go back to using cfb_imageblit since the accel stubs aren't ready
Alan Hourihane [Thu, 17 May 2007 16:00:11 +0000 (17:00 +0100)]
Grab the default mode if the preferred mode isn't available.
Fix an overflow problem.
Jesse Barnes [Thu, 17 May 2007 16:00:06 +0000 (09:00 -0700)]
Fix FB pitch value (we had it wrong and were working around it in a few
places).
Add new FB hooks to the drm driver structure and make i915 use them for an
Intel specific FB driver. This will allow acceleration and better handling
of the command stream.
Stephane Marchesin [Thu, 17 May 2007 15:35:14 +0000 (17:35 +0200)]
nouveau: don't build the module by default
Alan Hourihane [Thu, 17 May 2007 12:19:56 +0000 (13:19 +0100)]
Fix build problem
root [Thu, 17 May 2007 11:46:36 +0000 (12:46 +0100)]
Large changes for fbdev support.
Change from DIRECTCOLOR to TRUECOLOR, and enable
support for PSEUDOCOLOR. DIRECTCOLOR support needs more work.
Add the ability to change the mode on the fbdev device.
Support depth 8, 15, 16 and 24 (and 32).
Add a /dev/fbX device per CRTC, but there's some code which
doesn't allocate the fbX device unless the output is actually
enabled. Read the code on this as it impacts the fbcon map flags.
Pick CRTC's based on the available outputs. More work could
be done here to match modes, so cloning could be achieved on
outputs. This fits more inline with what the X code does.
Oliver McFadden [Sun, 13 May 2007 16:18:54 +0000 (16:18 +0000)]
r300: Added my comments into r300_reg.h.
Oliver McFadden [Sun, 13 May 2007 07:53:40 +0000 (07:53 +0000)]
r300: Synchronized R300 register defines file.
Just moved the indent control comments so that indent doesn't try to change
anything.
Matthieu Castet [Sat, 12 May 2007 13:35:39 +0000 (15:35 +0200)]
nouveau : nv10 graph move clipping value to per channel init
Matthieu Castet [Sat, 12 May 2007 13:16:37 +0000 (15:16 +0200)]
nouveau : nv10 graph clipping values were forgoten in ddx to drm commit
Keith Packard [Mon, 7 May 2007 13:07:48 +0000 (09:07 -0400)]
Allow vblank interrupts to remain disabled across VT switch.
i915_driver_irq_postinstall was forcing vblank interrupts to pipe A when
called with vblank interrupts disabled. This caused vblank interrupts to be
accidentally re-enabled when VT switching the X server. Instead, start the
driver with vblank interrupts enabled on pipe A to support older X servers,
but then leave control over the state to the X server if it is able to do so.
Alan Hourihane [Thu, 10 May 2007 12:16:05 +0000 (13:16 +0100)]
Just some minor cleanups.
Oliver McFadden [Wed, 9 May 2007 18:31:31 +0000 (18:31 +0000)]
r300: Synchronized R300 register defines file.
Oliver McFadden [Wed, 9 May 2007 15:22:09 +0000 (15:22 +0000)]
r300: Synchronized R300 register defines file.
Matthieu Castet [Tue, 8 May 2007 19:18:02 +0000 (21:18 +0200)]
nouveau : fix fifo context size for nv10
Dave Airlie [Tue, 8 May 2007 07:51:21 +0000 (17:51 +1000)]
libdrm: fix typo on ttm fence interface