Robert Noland [Mon, 2 Jun 2008 17:12:59 +0000 (13:12 -0400)]
[FreeBSD] Go back to using vbl_lock and move init/destroy to load/unload.
Dennis Kasprzyk [Thu, 5 Jun 2008 15:08:44 +0000 (17:08 +0200)]
radeon: Restore software interrupt on resume.
Fixes performance drop after suspend/resume on some systems.
Michel Dänzer [Tue, 3 Jun 2008 09:28:10 +0000 (11:28 +0200)]
vblank: Don't wait or update the counter while the CRTC is supposedly disabled.
Without kernel modesetting, this requires cooperation of the userspace
modesetting driver. We may have to leave the vblank interrupt enabled otherwise
to avoid problems.
Michel Dänzer [Tue, 3 Jun 2008 09:28:10 +0000 (11:28 +0200)]
vblank: Clean up compensation for spurious wraparounds of driver counter.
Only compensate when the driver counter actually appears to have moved
backwards.
The compensation deltas need to be incremental instead of absolute; drop the
vblank_offset field and just use atomic_sub().
Michel Dänzer [Tue, 3 Jun 2008 09:28:09 +0000 (11:28 +0200)]
vblank: Special-case driver vblank counter going back by 1.
Turns out the radeon driver is affected by the same problem that prompted i915
to revert to less useful counter flipping at the end of the vblank interval. In
the long term, we can hopefully implement more reliable methods to achieve
counter flipping at the beginning of vblank, but otherwise this should be an
acceptable workaround.
Michel Dänzer [Tue, 3 Jun 2008 09:28:09 +0000 (11:28 +0200)]
vblank: Don't return current sequence number and time if interrupted by signal.
Michel Dänzer [Tue, 3 Jun 2008 09:27:39 +0000 (11:27 +0200)]
Revert "don't copy back if an error was returned."
This reverts commit
6671ad1917698b6174a1af314b63b3800d75248c.
The vblank ioctl needs to update the userspace parameters when interrupted by
a signal, which was prevented by this. Let's see if this breaks other ioctls...
Dave Airlie [Tue, 3 Jun 2008 02:42:49 +0000 (12:42 +1000)]
drm: sg alloc should write back the handle to userspace
Dave Airlie [Tue, 3 Jun 2008 02:40:54 +0000 (12:40 +1000)]
drm/ati_pcigart: use proper page mapping function
This should be pci_map_page not pci_map_single
Robert Noland [Sun, 1 Jun 2008 23:34:29 +0000 (19:34 -0400)]
[FreeBSD] Declare vblank_disable_fn callout MPSAFE.
Robert Noland [Sun, 1 Jun 2008 20:17:31 +0000 (16:17 -0400)]
[FreeBSD] Get rid of vbl_lock and re-use irq_lock.
Robert Noland [Sun, 1 Jun 2008 16:56:34 +0000 (12:56 -0400)]
[FreeBSD] Add symlink for radeon_microcode.h
Robert Noland [Sun, 1 Jun 2008 16:49:20 +0000 (12:49 -0400)]
[FreeBSD] Call drm_vblank_cleanup during irq uninstall
I needed to re-arrange some functions for this.
Also needed to call DRM_SPINUNINIT on the vbl_lock during cleanup.
Alex Deucher [Fri, 30 May 2008 22:20:01 +0000 (18:20 -0400)]
RADEON: fix typo in last commit
Dave Airlie [Fri, 30 May 2008 10:27:31 +0000 (20:27 +1000)]
r500: attempt to make AGP work by programming agp base in the MC correctly
Dave Airlie [Wed, 28 May 2008 01:12:57 +0000 (11:12 +1000)]
radeon: split microcode out into a separate header file.
Dave Airlie [Wed, 28 May 2008 00:28:13 +0000 (10:28 +1000)]
i915: fix BSD bh, DRI2 not uses anywhere else
Dave Airlie [Wed, 28 May 2008 00:02:20 +0000 (10:02 +1000)]
radeon: bump release date/version for r500 3D support
Alex Deucher [Tue, 27 May 2008 22:33:33 +0000 (18:33 -0400)]
RADEON: add get_param for number of GB pipes
Owain Ainsworth [Tue, 27 May 2008 22:12:35 +0000 (15:12 -0700)]
[BSD] Move unlock in drm_vm.c from accidental platform #ifdeffing.
Also remove an unreachable unlock.
Owain Ainsworth [Tue, 27 May 2008 22:11:25 +0000 (15:11 -0700)]
[BSD] Fix lock leak in drm_update_draw malloc failure path.
Owain Ainsworth [Tue, 27 May 2008 22:07:04 +0000 (15:07 -0700)]
[BSD] Fix lock leaks in error paths in drm_bufs.c.
Owain Ainsworth [Tue, 27 May 2008 21:59:38 +0000 (14:59 -0700)]
[BSD] Remove superfluous recursive locking in drm_add_magic.
Jie Luo [Tue, 27 May 2008 21:55:01 +0000 (14:55 -0700)]
[i915] Fix typo in (unused) START_ADDR definition.
Robert Noland [Fri, 23 May 2008 18:36:05 +0000 (14:36 -0400)]
[FreeBSD] Add vblank-rework support and get drivers building.
The i915 driver now works again.
Eric Anholt [Tue, 27 May 2008 21:12:51 +0000 (14:12 -0700)]
[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.
Dave Airlie [Thu, 22 May 2008 23:39:54 +0000 (09:39 +1000)]
r500: add two more register ranges for mesa driver to setup
Dave Airlie [Thu, 15 May 2008 01:13:03 +0000 (11:13 +1000)]
drm: fix nouveau warning
Dave Airlie [Wed, 21 May 2008 10:14:45 +0000 (20:14 +1000)]
rs690/r500: vblank support.
The new display controller has the vblank interrupts in a different place.
Add support for vbl interrupts for these chips
Dave Airlie [Sat, 17 May 2008 00:22:12 +0000 (10:22 +1000)]
r500: add more register ranges for Mesa driver
Dave Airlie [Wed, 14 May 2008 12:48:12 +0000 (22:48 +1000)]
ati_pcigart: oops wrong way around not that it actually mattered
Dave Airlie [Wed, 14 May 2008 12:44:22 +0000 (22:44 +1000)]
ati_pcigart: stop working in the evenings you mess up too often
Dave Airlie [Wed, 14 May 2008 12:43:28 +0000 (22:43 +1000)]
Revert "ati_pcigart: fixup properly this version might even work"
This reverts commit
bc0836e12a9790f1cc83f8bc29bc05043c4bc840.
tree has some kref hacks in it - oops
Dave Airlie [Wed, 14 May 2008 12:42:21 +0000 (22:42 +1000)]
ati_pcigart: fixup properly this version might even work
Dave Airlie [Wed, 14 May 2008 12:35:32 +0000 (22:35 +1000)]
ati_pcigart: fill out 40-bit gart table support properly
Thanks to Alex for supplying this info.
Alex Deucher [Wed, 14 May 2008 01:02:17 +0000 (21:02 -0400)]
RS4xx: separate out RS400 and RS480 IGP chips
RS400 (intel based IGP) and RS480 (AMD based IGP) have
different MC and GART setups. Currently we only support
RS480.
Alex Deucher [Mon, 12 May 2008 18:49:43 +0000 (14:49 -0400)]
RADEON: fix copy/pasto in last commit
Alex Deucher [Mon, 12 May 2008 13:44:20 +0000 (09:44 -0400)]
R3/4/5: init pipe setup in drm
Similar (broken) code in mesa needs to be removed
Alex Deucher [Mon, 12 May 2008 13:35:06 +0000 (09:35 -0400)]
RADEON: cleanup radeon_do_engine_reset()
Alex Deucher [Mon, 12 May 2008 13:30:47 +0000 (09:30 -0400)]
R300+: fixup pixcache flush
Alex Deucher [Mon, 12 May 2008 13:24:13 +0000 (09:24 -0400)]
RS4xx: fix MCIND index mask
Alex Deucher [Mon, 12 May 2008 13:21:45 +0000 (09:21 -0400)]
RADEON: write AGP_BASE_2 on chips that support it
Alex Deucher [Mon, 12 May 2008 13:18:28 +0000 (09:18 -0400)]
R300+: fixup PURGE/FLUSH macros
Alex Deucher [Mon, 12 May 2008 13:13:44 +0000 (09:13 -0400)]
Radeon IGP: merge RS4xx/RS6xx gart setup
Alex Deucher [Mon, 12 May 2008 13:00:40 +0000 (09:00 -0400)]
Radeon IGP: wrap MCIND access
first step in merging rs4xx/rs6xx gart setup
Alex Deucher [Mon, 12 May 2008 12:56:11 +0000 (08:56 -0400)]
Radeon IGP: clean up registers and magic numbers
Dave Airlie [Wed, 7 May 2008 05:10:23 +0000 (15:10 +1000)]
drm: nopage compat fixup for drm_vm
The kernel has removed nopage so move the old nopage codepaths into a compat vm file and switch to using the fault paths.
nopfn is on its way out in the future also, so we should switch to using fault
for that path as well soon
Dave Airlie [Mon, 5 May 2008 06:49:04 +0000 (16:49 +1000)]
r500: add allowed range for us config/pixsize
Ben Skeggs [Thu, 1 May 2008 15:36:30 +0000 (01:36 +1000)]
nv50: enable 0x400500 bit 0 after PGRAPH exception also
No solid idea about what these 2 bits do, but nv50 can now survive a few
PGRAPH exceptions just as nv40 does :)
Ben Skeggs [Thu, 1 May 2008 15:03:51 +0000 (01:03 +1000)]
nouveau: guard against channels potentially not having a context, fix nv50
Ben Skeggs [Thu, 1 May 2008 14:53:42 +0000 (00:53 +1000)]
nouveau: disable all card interrupts when unknown PFIFO IRQ occurs.
This is possibly temporary. I can trigger an unending IRQ storm on G8x
in some circumstances, and have no idea how to handle that particular PFIFO
exception correctly yet.
Ben Skeggs [Thu, 1 May 2008 14:52:21 +0000 (00:52 +1000)]
nouveau: restore original NV_PFIFO_CACHES_REASSIGN value in fifo handler
Doesn't fix any issue I've seen, but is a potential issue if a FIFO IRQ
occurs during channel creation/takedown.
Ben Skeggs [Thu, 1 May 2008 14:50:21 +0000 (00:50 +1000)]
nouveau: gather nsource in trap_info()
The IRQ handling stuff really is a mess.. On the TODO :)
Ben Skeggs [Thu, 1 May 2008 14:06:22 +0000 (00:06 +1000)]
nv50: PGRAPH exception handling completely different from earlier chips
Ben Skeggs [Thu, 1 May 2008 13:47:42 +0000 (23:47 +1000)]
nv50: I cave... Add nv84 initial context values.
I swore I'd actually do this properly and not go the horrible route
we did with nv4x, but I won't get around to it just yet with so many
*actually* interesting things to do first.. One day.
Since someone already added nv86, why not!
Jesse Barnes [Tue, 29 Apr 2008 19:36:04 +0000 (12:36 -0700)]
i915: fix off by one in VGA save/restore of AR & CR regs
Turns out it's important to save/restore AR14 in particular.
Maarten Maathuis [Tue, 29 Apr 2008 17:34:22 +0000 (19:34 +0200)]
nouveau: NV9x cards exist as well.
Jesse Barnes [Sun, 27 Apr 2008 16:42:17 +0000 (09:42 -0700)]
Use fixed sized types in new ioctls
Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat
issues.
Jesse Barnes [Sun, 27 Apr 2008 00:11:18 +0000 (17:11 -0700)]
Enum-ectomy of vblank modesetting ioctl
Enum can be of pretty much any size since C leaves the choice of size up to the implementation. So avoid using it in new interfaces like the vblank pre- & post-modeset ioctl. Thanks to hch for spotting this.
Thomas Hellstrom [Wed, 23 Apr 2008 15:33:09 +0000 (17:33 +0200)]
Don't disable IRQs, just tasklets, when taking the drm lock spinlock.
Jakob Bornecrantz [Wed, 23 Apr 2008 10:43:30 +0000 (12:43 +0200)]
Fixed unlock check on EAGAIN
Xiang, Haihao [Wed, 23 Apr 2008 09:17:16 +0000 (17:17 +0800)]
i915: fix for compatibility mode
Pekka Paalanen [Sun, 20 Apr 2008 17:47:38 +0000 (20:47 +0300)]
linux-core Makefile: add GIT_REVISION
This tries to automatically fetch a git revision string and if succeeds,
it #defines GIT_REVISION string macro. Packagers can override it by
'make GIT_REVISION=foo'.
Update Nouveau to use GIT_REVISION, if defined, instead of DRIVER_DATE
in struct drm_driver.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Dave Airlie [Tue, 22 Apr 2008 06:08:17 +0000 (16:08 +1000)]
i915: gfx hw and i945gme fixes from upstream
From Jesse and Zhenyu originally.
Keith Packard [Sun, 20 Apr 2008 23:10:05 +0000 (16:10 -0700)]
[I915] Handle tiled buffers in vblank tasklet
The vblank tasklet update code must build 2D blt commands with the
appropriate tiled flags.
Keith Packard [Sun, 20 Apr 2008 08:55:57 +0000 (01:55 -0700)]
On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank
The batchbuffer submission paths were fixed to use the 965-specific command,
but the vblank tasklet was not. When the older version is sent, the 965 will
lock up.
Thomas Hellstrom [Mon, 14 Apr 2008 11:52:33 +0000 (13:52 +0200)]
Fix buffer object map wait error.
Add some branch prediction hints.
Thomas Hellstrom [Mon, 14 Apr 2008 10:10:50 +0000 (12:10 +0200)]
Fix buffer object creation validation.
BO lock fixes.
Thomas Hellstrom [Sun, 13 Apr 2008 12:49:14 +0000 (14:49 +0200)]
Unlock the BO mutex while waiting for idle, unmapped, unfenced.
Move unfenced checking into idle checking.
Never time out while waiting for software events like unmapped or unfenced.
Thomas Hellstrom [Fri, 11 Apr 2008 07:36:12 +0000 (09:36 +0200)]
Fix up buffer manager locking.
Keith Packard [Thu, 27 Mar 2008 18:40:04 +0000 (11:40 -0700)]
Save and restore dsparb and d_state regs
Patrice Mandin [Mon, 7 Apr 2008 20:24:24 +0000 (22:24 +0200)]
Missing KERNEL_VERSION macro
Hasso Tepper [Mon, 7 Apr 2008 12:27:43 +0000 (15:27 +0300)]
Add DragonFly BSD support for device creation
DragonFly behaves just like FreeBSD in this regard.
Ben Skeggs [Mon, 7 Apr 2008 03:29:11 +0000 (13:29 +1000)]
nouveau: enable accelerated move to sysmem
Ben Skeggs [Mon, 7 Apr 2008 03:05:51 +0000 (13:05 +1000)]
nouveau: enable m2mf for tt<->vram moves, fix fence_poll
Thomas Hellstrom [Sun, 6 Apr 2008 09:21:22 +0000 (11:21 +0200)]
Place highmem pages last in the ttm page array.
Thomas Hellstrom [Sun, 6 Apr 2008 08:32:02 +0000 (10:32 +0200)]
Use clflush() when available for cache flushing.
Thomas Hellstrom [Sun, 6 Apr 2008 07:46:29 +0000 (09:46 +0200)]
[I915] Fix VRAM eviction.
Thomas Hellstrom [Sun, 6 Apr 2008 07:33:50 +0000 (09:33 +0200)]
Fix emergency allocation accounting.
Maarten Maathuis [Sat, 5 Apr 2008 19:02:00 +0000 (21:02 +0200)]
nv50: primitive i2c interrupt handler
Maarten Maathuis [Wed, 2 Apr 2008 23:13:31 +0000 (01:13 +0200)]
nv50: primitive display interrupt handler.
Dave Airlie [Mon, 31 Mar 2008 01:34:48 +0000 (11:34 +1000)]
nouveau: fix return from function..
dude kernel moduless use kernel errors :)
this fixes an oops on init when this codepath hits.
Thomas Hellstrom [Sun, 30 Mar 2008 19:30:43 +0000 (21:30 +0200)]
Initialize the fence::error member.
Thomas Hellstrom [Sun, 30 Mar 2008 13:14:45 +0000 (15:14 +0200)]
[i915] Report buffer state _after_ fence submission to user-space.
This fixes a problem where the wrong bo->fence_type was reported, and
also saves some memory space.
[bo core] export the drm_bo_fill_rep_arg function.
Thomas Hellström [Thu, 6 Mar 2008 16:35:56 +0000 (17:35 +0100)]
Don't call fence::poll during irq if there are no waiters.
Maarten Maathuis [Sun, 30 Mar 2008 12:50:41 +0000 (14:50 +0200)]
nouveau: forgot to add a break
Maarten Maathuis [Sun, 30 Mar 2008 12:46:45 +0000 (14:46 +0200)]
nouveau: Add ctx values for nv86.
- Note that this may not work for all nv86.
Dave Airlie [Sat, 29 Mar 2008 21:33:39 +0000 (07:33 +1000)]
drm/r300: fix wait interface mixup
This interface was defined completely wrong, however userspace has only
ever used 4 values from it (0x1, 0x2, 0x3 and 0x6), so fix the interface to do what userspace actually expected but define new defines for new users to use
it properly.
Oliver McFadden [Sat, 29 Mar 2008 17:25:44 +0000 (17:25 +0000)]
r300: Correctly translate the value for the R300_CMD_WAIT command.
Previously, the R300_CMD_WAIT command would write the passed directly to the
hardware. However this is incorrect because the R300_WAIT_* values used are
internal interface values that do not map directly to the hardware.
The new function I have added translates the R300_WAIT_* values into appropriate
values for the hardware before writing the register.
Thanks to John Bridgman for pointing this out. :-)
Stuart Bennett [Tue, 25 Mar 2008 18:30:05 +0000 (18:30 +0000)]
nouveau: nv20 bios does not initialise PTIMER
The wait functions depend on PTIMER, so write the old (incorrect, but working) values for uninitialised hw
Dave Airlie [Mon, 24 Mar 2008 08:52:26 +0000 (18:52 +1000)]
i915: fix oops on agp=off
Kernel bug 10289.
Dave Airlie [Mon, 24 Mar 2008 08:47:50 +0000 (18:47 +1000)]
Merge branch 'r500-fp'
Ben Skeggs [Sun, 23 Mar 2008 16:22:42 +0000 (03:22 +1100)]
nouveau: silence warning
Ben Skeggs [Sun, 23 Mar 2008 16:20:59 +0000 (03:20 +1100)]
nv40: voodoo - not quite.
Ben Skeggs [Sun, 23 Mar 2008 16:13:05 +0000 (03:13 +1100)]
nv40: allocate massive amount of PRAMIN for grctx on all chipsets.
More or less a workaround for issues on some chipsets where a context
switch results in critical data in PRAMIN being overwritten by the GPU.
The correct fix is known, but may take some time before it's a feasible
option.
Dave Airlie [Fri, 21 Mar 2008 06:59:52 +0000 (16:59 +1000)]
r500: fragment program upload is also used to upload constants.
Limit frag address to 8 bits
Dave Airlie [Thu, 20 Mar 2008 04:20:53 +0000 (14:20 +1000)]
drm: fixup r500fp submission
Stuart Bennett [Tue, 18 Mar 2008 23:12:28 +0000 (23:12 +0000)]
nouveau: do not set on-board timer's numerator/denominator to bad values
Alex Deucher [Wed, 19 Mar 2008 19:37:56 +0000 (15:37 -0400)]
RADEON: switch over to new production microcode
This needs to be tested thoroughly before pushing to the
kernel.
Alex Deucher [Wed, 19 Mar 2008 18:57:42 +0000 (14:57 -0400)]
RADEON: production microcode for all radeons, r1xx-r6xx
This updated microcode is not in use yet.