Commit graph

2259 commits

Author SHA1 Message Date
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
Maarten Maathuis
2b9c5719c0 NV50: switch to fixed point scale factor calculations 2008-07-01 16:00:09 +02:00
Maarten Maathuis
bc32d1798a NV50: some i2c cleanup 2008-07-01 15:14:30 +02:00
Maarten Maathuis
91c742663a NV50: use list_head item instead of list_head head to avoid confusion 2008-06-27 18:58:13 +02:00
Maarten Maathuis
9f28da80f6 Change some obviously wrong things about property blobs, still broken though.
- I do not fully understand these blobs, so i'm leaving it at this for the moment.
2008-06-27 18:45:08 +02:00
Maarten Maathuis
71906e86e8 [modesetting-101] Actually store properties when being changed. 2008-06-27 16:30:25 +02:00
Maarten Maathuis
01ee5eda9a NV50: A minor change. 2008-06-27 01:29:30 +02:00
Maarten Maathuis
701011224c NV50: Implement DPMS. 2008-06-27 01:16:36 +02:00
Maarten Maathuis
d88616555d [modesetting-101] tab-cleanup 2008-06-26 23:21:01 +02:00
Maarten Maathuis
087e3f577d Revert "modesetting-101: Make dpms property optional + misc cleanup."
This reverts commit 13943fe582.
2008-06-26 23:12:04 +02:00
Maarten Maathuis
13943fe582 modesetting-101: Make dpms property optional + misc cleanup.
- intel_crt seems the only one to provide it, so init it there.
2008-06-26 21:28:29 +02:00
Maarten Maathuis
4d85d5d251 NV50: i misunderstood NOUVEAU_MEM_INTERNAL, so remove it 2008-06-25 15:27:07 +02:00
Maarten Maathuis
09b67dda0b NV50: Some cleanup and fixes. 2008-06-25 15:16:38 +02:00
root
d55629a13d silence warning 2008-06-24 23:18:29 +01: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
Maarten Maathuis
5dbcb7551f NV50: minor change 2008-06-24 20:29:08 +02:00
Keith Packard
2c6feb7a5a [intel-gem] Include drm_compat.h to get kmap_atomic_prot_pfn 2008-06-24 09:52:43 -07:00
Keith Packard
c0043155ad drm_compat: it's CONFIG_HIGHMEM, not CONFIG_HIMEM
A mis-spelled config option (was it spelled that way in the past?)
eliminated kmap_atomic_prot_pfn from core DRM.
2008-06-24 09:52:33 -07:00
Keith Packard
ed73651d47 [intel-gem] Recover resources from wedged hardware.
Clean up queues, free objects. On the next entervt, unmark the hardware to
let the user try again (presumably after resetting the chip). Someday we'll
automatically recover...
2008-06-24 09:52:14 -07:00
Keith Packard
71d975072c [intel-gem] pwrite through GTT
Pin/copy_from_user/unpin through the GTT to eliminate clflush costs.
Benchmarks say this helps quite a bit.
2008-06-24 09:52:05 -07:00
Maarten Maathuis
14522b3e1b NV50: fix a few misc things 2008-06-24 12:38:57 +02:00
Maarten Maathuis
315fef7ee4 NV50: fix cursor hide/show 2008-06-24 10:16:52 +02:00
Maarten Maathuis
e7582cfff6 NV50: These are actually errors. 2008-06-24 09:41:13 +02:00
Maarten Maathuis
5072a2911e NV50: fix some misc bugs 2008-06-24 00:00:02 +02:00
Maarten Maathuis
246b41fea4 [modesetting-101] update mode count after fill_modes.
- This avoids returning with a mode count of 0, thus not allocating space for the 2nd ioctl.
2008-06-23 22:59:17 +02:00
Maarten Maathuis
0a45f15066 NV50: Improve set_config and fix some minor bugs. 2008-06-23 20:33:32 +02:00
Maarten Maathuis
b0b0f37443 NV50: Fix a few more possible leaks. 2008-06-22 19:04:22 +02:00
Maarten Maathuis
7c9551a464 fix typo 2008-06-22 18:58:04 +02:00
Maarten Maathuis
e67cd7dda9 NV50: A few minor added safeties + cleanup. 2008-06-22 18:47:51 +02:00
Maarten Maathuis
3809209349 Undo something i didn't want to change.
- I made it consistent with recent kernel fb code (maybe this is older bugged code?)
- Still i don't use this and i should leave it to others.
2008-06-22 17:01:30 +02:00
Maarten Maathuis
473a1997ac NV50: Initial import of kernel modesetting. 2008-06-22 16:29:00 +02:00
Dave Airlie
11f2a2ed6f agp: use true/false instead of TRUE/FALSE 2008-06-22 18:25:22 +10:00
Keith Packard
8be6ec491f [intel-gem] Add /proc/dri/*/i915_gem_interrupt
This tracks most of the interrupt-related status, including the
interrupt registers in the chip and the sequence number variables.
2008-06-21 00:13:18 -07:00
Keith Packard
f4bd566e0b [intel-gem] Remove unused variable. 2008-06-21 00:10:10 -07:00
Keith Packard
54817317e9 [intel-gem] Use polling in i915_gem_idle instead of interrupts.
While waiting for the hardware to idle on leavevt or lastclose, poll
for the sync sequence number instead of waiting for an interrupt. This
allows the code to bail if the hardware hangs for some reason. Also, this
avoids issues with signals as the exisiting wait function is interruptible.
2008-06-20 21:10:42 -07:00
Keith Packard
71b1623e22 [intel-gem] Add intel-specific /proc entries to help monitor gem operation
This adds gem_active, gem_flushing, gem_inactive, gem_request and gem_seqno
entries to monitor gem operation and help debug issues.
2008-06-20 21:07:46 -07:00
Keith Packard
2bd9799e4c Add device-specific proc_init and proc_cleanup hooks
This allows device drivers to add proc files
2008-06-20 16:40:14 -07:00
Keith Packard
918420deef [intel-gem] Use shmem_getpage instead of find_or_create_page
find_or_create_page doesn't quite set up pages correctly; any newly created
pages aren't hooked into the shmem object quite right; user space mmaps of
those pages end up mapping pages full of zeros which then get written to the
real pages inappropriately. This patch requires that the kernel export
shmem_getpage.
2008-06-20 00:21:57 -07:00
Keith Packard
52e5d24fae [intel-gem] Add DRM_IOCTL_I915_GEM_SW_FINISH to flag CPU writes
When a software fallback has completed, usermode must notify the kernel so
that any scanout buffers can be synchronized. This ioctl should be called
whenever a fallback completes to flush CPU and chipset caches.
2008-06-20 00:21:57 -07: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
Jesse Barnes
f58e21c7d0 i915: add blanking support to intelfb
Got tired of not having my LCD actually turn off when I left the machine at the
console.
2008-06-18 16:49:51 -07:00
Jesse Barnes
57b8837b4e i915: cleanup PCI state before disabling MSI
Core MSI code will BUG() if an interrupt handler is still registered when
pci_disable_msi() is called.
2008-06-18 15:31:48 -07:00
Jesse Barnes
86accbcb34 Merge commit 'origin/drm-gem' into modesetting-gem
Lots of conflicts, seems to load ok, but I'm sure some bugs snuck in.

Conflicts:

	linux-core/drmP.h
	linux-core/drm_lock.c
	linux-core/i915_gem.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-06-18 15:25:54 -07:00
Jesse Barnes
c843d47b90 i915: use WC mapping for framebuffer screen_base 2008-06-18 14:51:46 -07:00
Jesse Barnes
241ff808b0 Merge branch 'modesetting-101' into modesetting-gem 2008-06-18 14:01:47 -07:00
Jesse Barnes
7010d50007 i915: switch back to fbcon on panic
Normally when X is running, panic messages will be invisible and the machine
will just appear to hard hang.  This patch adds support for switching back to
the fbcon framebuffer on panic (through the use of a panic notifier
registration) so we can see what happened.

Note that in order to be really useful, X will have to run its VT in something
other than KD_GRAPHICS mode.  Also, not all kernel errors result in panics,
some go through BUG() which may trigger another type of event, not resulting in
a switch.
2008-06-18 13:57:39 -07:00