Commit Graph

387 Commits (9f28da80f6cc8e45670b217a2483983f2838095d)

Author SHA1 Message Date
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
Dave Airlie 149b17311a drm: initial mode object groups.
This creates a default group attached to the legacy drm minor nodes.

It covers all the objects in the set. make set resources only return
objects for this set. Need to fix up other functions to only work on
objects in their allowed set.
2008-06-02 16:45:44 +10:00
Dave Airlie 9d38448ed3 modesetting: the great renaming.
Okay we have crtc, encoder and connectors.

No more outputs exposed beyond driver internals

I've broken intel tv connector stuff.
Really for TV we should have one TV connector, with a sub property for the
type of signal been driven over it
2008-05-30 15:10:04 +10:00
Hong Liu a51e38548c fix kernel oops when removing fb
drm_crtc->fb may point to NULL, f.e X server will allocate a new fb
and assign it to the CRTC at startup, when X server exits, it will destroy
the allocated fb, making drm_crtc->fb points to NULL.
2008-05-12 12:31:56 -07:00
Jakob Bornecrantz 7bcbc443f4 i915: Changed intel_fb to use the new drm_crtc_set_config interface 2008-05-08 20:10:18 +02: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
Jesse Barnes 5a3ce06f3a Improved DRM sysfs support
This patch ties outputs, output properties and hotplug events into the
DRM core.  Each output has a corresponding directory under the primary
DRM device (usually card0) containing dpms, edid, modes, and connection
status files.

New hotplug change events occur when outputs are added or hotplug events
are detected.
2008-04-08 12:42:23 -07:00
Dave Airlie acb6c9ef97 drm: remove authentication on master exit.
using contexts for this is bad for multiple masters
2008-03-27 15:55:49 +10:00
Dave Airlie 607964ed9e drm: add master set/drop protocol
this may not survive long - just need something for testing
2008-03-17 16:38:20 +10:00
Dave Airlie 1f96e9a982 drm/pcigart: fix the pci gart to use the drm_pci wrapper.
This is the correct fix for the RS690 and hopefully the dma coherent work.

For now we limit everybody to a 32-bit DMA mask but it is possible for
RS690 to use a 40-bit DMA mask for the GART table itself,
and the PCIE cards can use 40-bits for the table entries.

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

	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-03-12 10:18:33 +00:00
Thomas Hellstrom c0a1cd052a Add an emergency pinnable memory quota for root-only processes. 2008-03-12 10:10:03 +01:00
Alan Hourihane 903d9231d6 Add support for monitor hotplug signals/waits
Also adjust i915 irq handling as it follows the 16bit'ism's
of the i8xx series.
2008-03-11 20:30:25 +00:00
Dave Airlie e00dea812d Merge branch 'master' of ../../drm into modesetting-101
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_proc.c
	linux-core/drm_stub.c
	linux-core/drm_sysfs.c
2008-03-06 05:26:23 +10:00
Dave Airlie 12574590cd drm: reorganise minor number handling using code from modesetting branch
Rip out the whole head thing and replace it with an idr and drm_minor
structure.
2008-03-06 05:21:50 +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
Jerome Glisse 75c9e0d346 radeon: remove TTM from an earlier merge 2008-02-26 23:30:45 +01:00
Alan Hourihane 2476cb209e Implement short circuit for base change only
Allow mode to be set with fb_id set to -1, meaning set
the mode with the current fb (if we have one bound).

Allow intelfb to hook back up it's fb if modesetting
clears it (maybe temporary).

Move any crtc->fb related register changes to set_base
in intel_fb.

General intelfb cleanups.
2008-02-26 15:19:34 +00: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
Dave Airlie 75b01cf996 switch naming to new proposed scheme 2008-02-15 10:04:28 +10:00
Dave Airlie f2f8ace3e1 remove drm_minors_limit 2008-02-15 09:57:30 +10:00
Dave Airlie a4fc1d7ac6 start moving over to proper hierarchy wrt master accesses 2008-02-13 16:30:15 +10:00
Dave Airlie 0fbee62ec1 major port of multi-master ideas into modesetting 2008-02-13 15:19:42 +10:00
Dave Airlie f276c845bd drm: re-write minor number allocation to use an idr.
Fixup the minor number allocation scheme to use an idr and move the control
nodes up higher.
2008-02-13 12:12:52 +10:00
Jesse Barnes 79d6928520 Fix vblank enable/disable callbacks
There were two problems with the existing callback code:  the vblank
enable callback happened multiple times per disable, making drivers more
complex than they had to be, and there was a race between the final
decrement of the vblank usage counter and the next enable call, which
could have resulted in a put->schedule disable->get->enable->disable
sequence, which would be bad.

So add a new vblank_enabled array to track vblank enable on per-pipe
basis, and add a lock to protect it along with the refcount +
enable/disable calls to fix the race.
2008-02-07 10:40:06 -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
Dave Airlie ebbc2e0a2e add control ioctls 2008-01-09 16:31:37 +11:00
Dave Airlie d3da253adb drm: add initial support for a drm control device node 2008-01-04 17:49:40 +11:00
Dave Airlie 10937cf20b drm: move drm_head to drm_minor and fix up users 2008-01-04 16:12:24 +11:00
Jakob Bornecrantz e239882b1e Modesetting Hotplug 2007-12-18 02:21:08 +01:00
Dave Airlie 8d2da20233 Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_drv.c
	shared-core/drm.h
	shared-core/i915_dma.c
2007-12-11 16:58:00 +10:00
Dave Airlie cfa21b22b4 drm: move agp include outside CONFIG_AGP as it isn't dependant on agp in kernel 2007-12-10 10:13:52 +10:00
Dave Airlie a20587e395 Merge branch 'origin' into modesetting-101
Conflicts:

	linux-core/drmP.h
	shared-core/i915_dma.c
	shared-core/i915_drm.h
	shared-core/radeon_drv.h
2007-11-22 17:17:06 +11:00
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10: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
Kristian Høgsberg 68cdcda1ea Add new shared header file drm_internal.h.
This header file is shared across linux and bsd, but is not installed
for user space to access.  It's the place to put prototypes and data
types that aren't platform or chipset specific, but still internal to
the drm.
2007-11-14 14:28:34 -05: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 3664de7395 drm: move some of the OS stuff into the OS header 2007-11-05 12:11:39 +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
Dave Airlie 17f0882d50 drm: add chipset flushing via agp support 2007-10-31 11:33:34 +11: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
Kristian Høgsberg ff5889f831 Move struct drm_drawable_info out of public header file. 2007-10-29 19:32:46 -04:00
Jerome Glisse 90d8f79279 Merge branch 'radeon-ttm' of git://people.freedesktop.org/~airlied/drm into modesetting-101
Conflicts:

	linux-core/Makefile.kernel
	linux-core/drmP.h
	shared-core/radeon_cp.c
	shared-core/radeon_drv.h
	shared-core/radeon_irq.c

	modified:   linux-core/Makefile.kernel
	modified:   linux-core/ati_pcigart.c
	modified:   linux-core/drmP.h
	new file:   linux-core/radeon_buffer.c
	modified:   linux-core/radeon_drv.c
	new file:   linux-core/radeon_fence.c
	modified:   shared-core/radeon_cp.c
	modified:   shared-core/radeon_drm.h
	modified:   shared-core/radeon_drv.h
	modified:   shared-core/radeon_irq.c
	modified:   tests/ttmtest/src/ttmtest.c
2007-10-28 00:55:27 +02:00
Jesse Barnes 6707ab8626 update DRM sysfs support
Make DRM devices use real Linux devices instead of class devices, which are
going away.  While we're at it, clean up some of the interfaces to take
struct drm_device * or struct device * and use the global drm_class where
needed instead of passing it around.
2007-10-26 16:08:54 -07:00
Alan Hourihane 90bfc8e611 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_bo.c
	linux-core/drm_objects.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
2007-10-16 15:28:33 +01:00