Commit Graph

1389 Commits (514c05cebe31a62f827a76f348d35596bef97811)

Author SHA1 Message Date
Stefan Becker 514c05cebe radeon: Add suspend/resume hooks for saving/clearing/restoring interrupts.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16799 .
2008-07-26 16:49:14 +02:00
Dave Airlie 50db5aefa1 drm: don't set the signal blocker on the master process.
this lets us debug the X server through xkb startup.

Not sure what the correct answer is, probably X needs to drop
the lock when execing stuff, with input hotplug it can get
xkb stuff at any time I believe.
2008-07-25 13:30:08 +10:00
Michel Dänzer 4be367b84b Reinstate dev->vblank_enabled[].
I incorrectly thought it was obsolete.
2008-07-21 11:48:04 +02:00
Michel Dänzer f529a510d2 Drop workaround for driver vblank counter going backwards.
The driver code that caused this is no longer necessary and has been dropped.
2008-07-21 08:16:59 +02:00
Michel Dänzer 205aff6a5c vblank-rework rework cleanups.
Remove some dead/obsolete code and make drm_update_vblank_count() static.
2008-07-21 08:16:55 +02:00
Michel Dänzer 014935b680 Remove obsolete dev->vblank_suspend[crtc] tests.
Caused drm_update_vblank_count() not to do its thing when called from
drm_modeset_ctl() -> drm_vblank_get().

The vblank functionality no longer needs to be suspended during a modeset, so
rename the field to vblank_inmodeset.
2008-07-21 08:13:45 +02:00
Jesse Barnes 6ac1f8a760 Update vblank code to new API
In my last push I forgot to convert users of drm_update_vblank_count
over to drm_vblank_get/put, since that's where any interrupt off->on
update accounting is done now.  Since the modeset ioctl did something
similar (an open coded update of the counter) convert it over to using
get/put too, which saves us from having to deal with every combination
of interrupt off & on between calls.
2008-07-19 13:21:38 -04:00
Jesse Barnes 2204f926ab Avoid incorrect vblank wakeups
The current code uses the hw vblank counter exclusively, which can lead
to wakeups during the active period rather than during the vblank period
if the hw counter counts displayed frames rather than vblank periods.

This change coverts the code over to using the counter while interrupts
are enabled, fixing that issue.  It also includes a couple of related
changes:  one to not enable the new enable/disable behavior until the
modeset ioctl is called (to preserve old client behavior) and another to
account for lost events due to mode setting with the new counter scheme.

BSD will require similar changes to its drm_irq.c code, but they should
be straightforward.
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 764573f3b8 drm: fix missing symbol export 2008-07-15 20:27:14 +10:00
Dave Airlie abdd523c75 drm: add fix for PAT on radeon with 2.6.26 2008-07-15 16:18:22 +10:00
Dave Airlie 76c8e19a29 drm/pcigart: fix warning 2008-07-15 16:18:04 +10:00
martin capitanio eac0933be7 xgi: use true/false instead of TRUE/FALSE 2008-07-08 17:58:10 +10:00
Jesse Barnes 94dcc83ad2 Revert "i915: only use tiled blits on 965+"
This reverts commit 727d4f1d16, somehow git
deleted the symlink and replaced it with the file.
2008-07-01 16:09:02 -07:00
Jesse Barnes 727d4f1d16 i915: only use tiled blits on 965+
When scheduled swaps occur, we need to blit between front & back buffers.  If
the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit, but
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 12:25:16 -07:00
Jie Luo e935925cd7 i915: enable bus mastering on i915 at resume time
On 9xx chips, bus mastering needs to be enabled at resume time for much of the
chip to function.  With this patch, vblank interrupts will work as expected
on resume, along with other chip functions.   Fixes kernel bugzilla #10844.

Signed-off-by: Jie Luo <clotho67@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-07-01 12:22:54 -07:00
Jesse Barnes d726eb2e5e i915: remove unused variable
Leftover dev_priv from the move of the suspend/resume code into shared-core.
2008-06-24 12:57:21 -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
Dave Airlie 11f2a2ed6f agp: use true/false instead of TRUE/FALSE 2008-06-22 18:25:22 +10:00
Dave Airlie 1915de2c56 drm: only use kernel ioctl cmd when doing a core ioctl.
Need to overhaul the mess that is driver ioctls
2008-06-20 15:35:47 +10:00
Dave Airlie 8712f0a17b drm: fix the ioctl to not believe userspace.
believing userspace causes oopses
2008-06-20 12:03:41 +10:00
Ian Romanick 5d99e79c3e xgi: Bump kernel version
This should have been bumped when the fence interface was changed the
other day.  Better late than never, I suppose.
2008-06-12 15:36:48 -07:00
Ian Romanick b535567ee9 xgixp: Remove dependency on TTM fences 2008-06-10 22:18:14 -07:00
Ian Romanick 4f3da2f200 xgi: Fix 64-bit kernel / 32-bit user issue. 2008-06-10 11:29:15 -07:00
Dave Airlie cdd0cb0ab3 ati_pcigart: split out the page insert function 2008-06-10 16:27:50 +10:00
Robert Noland 116870a908 I915 suspend/resume for FreeBSD 2008-06-08 13:56:14 -04:00
Michel Dänzer ba7263b8c2 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.
2008-06-03 11:28:10 +02:00
Michel Dänzer 237172b767 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().
2008-06-03 11:28:10 +02:00
Michel Dänzer d1dcb2b32e 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.
2008-06-03 11:28:09 +02:00
Michel Dänzer 0144ebeb8a vblank: Don't return current sequence number and time if interrupted by signal. 2008-06-03 11:28:09 +02:00
Michel Dänzer 6b520005c6 Revert "don't copy back if an error was returned."
This reverts commit 6671ad1917.

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...
2008-06-03 11:27:39 +02:00
Dave Airlie f1e12d40af drm/ati_pcigart: use proper page mapping function
This should be pci_map_page not pci_map_single
2008-06-03 12:44:06 +10:00
Dave Airlie 5b86823fa3 radeon: split microcode out into a separate header file. 2008-05-28 11:12:57 +10:00
Dave Airlie a09c0bbe11 ati_pcigart: oops wrong way around not that it actually mattered 2008-05-14 22:48:12 +10:00
Dave Airlie 4c6ec02eb8 ati_pcigart: stop working in the evenings you mess up too often 2008-05-14 22:44:22 +10:00
Dave Airlie 2712cdeec3 Revert "ati_pcigart: fixup properly this version might even work"
This reverts commit bc0836e12a.

tree has some kref hacks in it - oops
2008-05-14 22:43:28 +10:00
Dave Airlie bc0836e12a ati_pcigart: fixup properly this version might even work 2008-05-14 22:42:21 +10:00
Dave Airlie dd1f33f83c ati_pcigart: fill out 40-bit gart table support properly
Thanks to Alex for supplying this info.
2008-05-14 22:35:32 +10:00
Dave Airlie b44f2da380 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
2008-05-07 15:10:23 +10:00
Jesse Barnes cb33133ef3 i915: fix off by one in VGA save/restore of AR & CR regs
Turns out it's important to save/restore AR14 in particular.
2008-04-29 12:39:38 -07:00
Jesse Barnes 7f8e406085 Use fixed sized types in new ioctls
Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat
issues.
2008-04-27 09:42:17 -07:00
Thomas Hellstrom 10b9a116a7 Don't disable IRQs, just tasklets, when taking the drm lock spinlock. 2008-04-23 17:34:21 +02:00
Jakob Bornecrantz 9ba3aaaa1a Fixed unlock check on EAGAIN 2008-04-23 12:43:45 +02:00
Pekka Paalanen b3967765c0 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>
2008-04-22 22:07:21 +03:00
Thomas Hellstrom 1ad1bd5bd9 Fix buffer object map wait error.
Add some branch prediction hints.
2008-04-14 13:52:33 +02:00
Thomas Hellstrom c5955c6523 Fix buffer object creation validation.
BO lock fixes.
2008-04-14 12:14:20 +02:00
Thomas Hellstrom c9b73ef6da 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.
2008-04-14 12:13:33 +02:00
Thomas Hellstrom 65dd0e68ff Fix up buffer manager locking. 2008-04-14 12:13:17 +02:00
Keith Packard b986d7d2c9 Save and restore dsparb and d_state regs 2008-04-11 20:31:07 -07:00
Patrice Mandin db61f02bd7 Missing KERNEL_VERSION macro 2008-04-07 22:24:24 +02:00