Commit Graph

91 Commits (94cf07bff1bf9a42ba6360f8feaa441b763b337f)

Author SHA1 Message Date
Dave Airlie b31adb005a drm/modesetting: more fb interface cleanups 2008-06-05 15:55:03 +10:00
Dave Airlie f73e54bbf0 drm: modesetting unify the hotplug init paths a lot.
remove fb callbacks, just probe into the driver to sort it out
2008-06-05 13:40:08 +10:00
Dave Airlie 967bd21911 modesetting: initial attempt at debonging fb 2008-06-05 11:11:22 +10:00
Dave Airlie 76a44f14d6 drm/modesetting: overhaul the fb create/delete.
Move TTM code into the driver
2008-06-04 11:59:28 +10:00
Jesse Barnes 9fc4ea5c00 i915: do a better job of parsing VBIOS data
Add code to get panel modes from the VBIOS if present and check whether certain
outputs exist.  Should make our display detection code a little more robust.
2008-05-23 18:42:47 -07:00
Jesse Barnes ee631e1b86 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-05-13 14:44:17 -07:00
Dave Airlie ef204fb5c2 Merge remote branch 'origin/master' into modesetting-101
Conflicts:

	linux-core/Makefile.kernel
	shared-core/i915_drv.h
2008-05-08 10:25:01 +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
Thomas Hellstrom 7f269bec7e Merge branch 'master' into modesetting-101
Conflicts:

	linux-core/Makefile.kernel
	linux-core/drm_compat.c
	linux-core/drm_fops.c
	linux-core/drm_lock.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-04-28 12:10:44 +02:00
Keith Packard b986d7d2c9 Save and restore dsparb and d_state regs 2008-04-11 20:31:07 -07:00
Dave Airlie 4dbf447f43 drm: fixup compat with old x.org drivers 2008-03-05 15:28:38 +10:00
Dave Airlie 01dcc47d89 drm: add modesetting as a driver feature.
This change adds a driver feature that for i915 is controlled by a module
parameter. You now need to do insmod i915.ko modeset=1 to enable it the
modesetting paths.

It also fixes up lots of X paths. I can run my new DDX driver on this code
with and without modesetting enabled
2008-02-28 16:24:17 +10:00
Alan Hourihane 1e66322633 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	shared-core/i915_dma.c
2008-02-26 15:42:41 +00:00
Jesse Barnes 20d0e53916 i915: put ARX back into index mode before doing restore
Fixes resume from hibernate in some configurations.
2008-02-22 13:57:38 -08:00
Alan Hourihane ea3de6daa4 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_sysfs.c
2008-02-21 11:37:07 +00:00
Dave Airlie 6c41e5381f drm: add support for passing state into the suspend hooks.
fix i915 driver to use state for hibernate save avoidance.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:02:20 +10:00
Alan Hourihane f24ed2ad6c Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/i915_fence.c
	linux-core/via_fence.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-02-18 22:35:46 +00:00
Keith Packard 5d8c754bc2 [915]: more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
Failing to preserve the MI_ARB_STATE register was causing FIFO underruns on
the VGA output on my HP 2510p after resume.
2008-02-16 20:14:49 -08:00
Dave Airlie 0fbee62ec1 major port of multi-master ideas into modesetting 2008-02-13 15:19:42 +10:00
Jesse Barnes d63b57749f Restore pipeconf regs unconditionally
On many chipsets, the checks for DPLL enable or VGA mode will prevent the
pipeconf regs from being restored, which could result in a blank display or X
failing to come back after resume.  So restore them unconditionally along with
actually restoring pipe B's palette correctly.
2008-02-07 17:33:28 -08:00
Jesse Barnes 8b6c96dedd i915: save/restore interrupt state
On resume, if the interrupt state isn't restored correctly, we may end
up with a flood of unexpected or ill-timed interrupts, which could cause
the kernel to disable the interrupt or vblank events to happen at the
wrong time.  So save/restore them properly.
2008-02-07 10:48:08 -08:00
Thomas Hellstrom f1edb7ad91 Simplify the fencing code and differentiate between flushes and
waiting types.
Add a "command_stream_barrier" method to the bo driver.
2008-01-30 22:06:02 +01:00
Jesse Barnes 01f6afcfea Fix hibernate save/restore of VGA attribute regs
In hibernate, we may end up calling the VGA save regs function twice, so we
need to make sure it's idempotent.  That means leaving ARX in index mode after
the first save operation.  Fixes hibernate on 965.
2008-01-28 21:05:22 -08:00
Dave Airlie e7a41d7f5b Merge remote branch 'origin/master' into modesetting-101
Conflicts:

	linux-core/drm_bo.c
	linux-core/drm_drv.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/radeon_irq.c
2008-01-25 15:27:53 +10:00
Jesse Barnes 0cd4cbc9a6 Merge branch 'master' into vblank-rework, including mach64 support
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/mga_irq.c
	shared-core/radeon_irq.c
	shared-core/via_irq.c

Mostly trivial conflicts.

mach64 support from Mathieu Bérard.
2008-01-22 09:42:37 -08:00
Zhenyu Wang ac6b3780c8 i915: Add chipset id for Intel Integrated Graphics Device
This adds new chipset id in drm.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
2008-01-15 13:06:09 -05:00
Keith Packard d1187641d6 Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
Flags pending validation were stored in a misleadingly named field, 'mask'.
As 'mask' is already used to indicate pieces of a flags field which are
changing, it seems better to use a name reflecting the actual purpose of
this field. I chose 'proposed_flags' as they may not actually end up in
'flags', and in an case will be modified when they are moved over.

This affects the API, but not ABI of the user-mode interface.
2007-12-21 12:16:29 -08:00
Jakob Bornecrantz e239882b1e Modesetting Hotplug 2007-12-18 02:21:08 +01:00
Dave Airlie f0fe478c15 Merge branch 'master' into modesetting-101
Conflicts:

	shared-core/i915_dma.c
	tests/ttmtest/src/ttmtest.c
2007-11-15 15:04:19 +11:00
Jesse Barnes 793cd1dad5 Make sure PLLs are enabled before writing pipe configuration regs
Fix from the X driver.  Make sure the PLLs are enabled and not in VGA mode
before writing PIPE(A|B)CONF regs to avoid hangs or crashes.
2007-11-10 14:39:36 -08:00
Thomas Hellstrom 5ce43a346c Merge branch 'master' into modesetting-101
Conflicts:

	linux-core/drm_bufs.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2007-11-05 13:46:06 +01:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Jesse Barnes 629c8b0dbf Merge branch 'master' into modesetting-101
Conflicts:

	linux-core/Makefile.kernel
	linux-core/drm_stub.c
	linux-core/i915_drv.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h

Fixup suspend/resume conflicts (basically use what's in DRM master for now).
Also fix up a few other conflicts that snuck in (i915_dma changes etc.).
2007-11-01 15:27:55 -07:00
Jesse Barnes 91aae7e683 Merge branch 'master' into vblank-rework, fixup remaining drivers
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_irq.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/mga_drv.h
	shared-core/mga_irq.c
	shared-core/radeon_drv.h
	shared-core/radeon_irq.c

Merge in the latest master bits and update the remaining drivers (except
mach64 which math_b is working on).  Also remove the 9xx hack from the i915
driver; it seems to be correct.
2007-10-30 12:52:46 -07:00
Dave Airlie 50dec29c80 drm/i915: add driver cache flush entry point
Use clflush on Intel hardware to flush cached objects.
2007-10-30 17:52:13 +10:00
Jesse Barnes 1e2a2babab i915: suspend/resume support
Add suspend/resume support to the i915 driver.  Moves some of the
initialization into the driver load routine, and fixes up places where we
assumed no dev_private existed in some of the cleanup paths.  This allows
us to suspend/resume properly even if X isn't running.
2007-10-26 16:10:02 -07:00
Jesse Barnes 5cc3083179 Merge branch 'master' into modesetting-101 - TTM & typedef removal
Conflicts:

	linux-core/drmP.h
	linux-core/drm_bo.c
	linux-core/drm_drv.c
	linux-core/drm_objects.h
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c

Mostly removing typedefs that snuck into the modesetting code and
updating to the latest TTM APIs.  As of today, the i915 driver builds,
but there are likely to be problems, so debugging and bugfixes will
come next.
2007-09-24 14:41:46 -07:00
Dave Airlie be85ad0333 drm: detypedef ttm/bo/fence code 2007-07-16 13:37:02 +10:00
Alan Hourihane 8a78dead29 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
2007-06-29 20:09:44 +01:00
Michel Dänzer 3d5d41fa98 i915: Fix handling of breadcrumb counter wraparounds. 2007-06-15 17:13:11 +02:00
Michel Dänzer 0f5334be2b Remove DRIVER_IRQ_VBL(2).
If the driver doesn't support vertical blank interrupts, it won't call
drm_vblank_init(), and dev->num_crtcs will be 0.

Also fix an off-by-one test against dev->num_crtcs.
2007-06-15 11:01:51 +02:00
Thomas Hellstrom 84bea38353 Fix i915 sequence mask. 2007-06-15 10:35:52 +02:00
Jesse Barnes db689c7b95 Initial checkin of vblank rework. Code attempts to reduce the number
of vblank interrupt in order to save power.
2007-06-12 10:44:21 -07:00
Jesse Barnes fa92e1f2ec 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.
2007-05-24 18:41:44 -07:00
Jesse Barnes 462d5a0dfc Suspend/resume support (incomplete). 2007-05-22 17:49:04 -07:00
Jesse Barnes e918d2b781 Call preallocated space VRAM instead of PRIV0 to be more consistent with
other drivers.
2007-05-22 13:38:58 -07:00
Jesse Barnes a18b4befb9 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.
2007-05-17 09:00:06 -07:00
David Airlie cc471a361f i915/drm: clean up a lot of the i915/drm startup/teardown sequences
When the kernel driver is loaded it sets up a lot of stuff..
it tears down the same stuff on unload.

This add a new map type called DRM_DRIVER which means the driver will clean the mapping up
and fix up the map cleaner
2007-04-13 14:51:16 +10:00
Dave Airlie 52f9028c84 Initial import of modesetting for intel driver in DRM 2007-04-05 11:21:06 +10:00
Dave Airlie 81b811da37 drm/i915: set the bo up at firstopen time not after DMA init
This is required to use TTM to allocate the ring buffer.
2007-03-27 18:01:31 +10:00