Commit Graph

73 Commits (dba95ec34315d62934ff0e493e085aa6a03cde7c)

Author SHA1 Message Date
Dave Airlie e439e74776 drm/modesetting: another re-org of some internals.
Move dpms into the helper functions.
Move crtc into the encoder.
Move disable unused functions into the helper.
2008-06-02 10:05:54 +10:00
Dave Airlie 5d47185eb6 drm: switch possible crtc/clones over to encoders 2008-05-30 15:32:58 +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
Dave Airlie 6aeef92c0c drm: attach an encoder.
Time to do some renaming on the connectors I think
2008-05-30 13:57:27 +10:00
Dave Airlie 9239cf511f drm: add encoder attach/detach 2008-05-30 13:31:16 +10:00
Dave Airlie b72419a8f7 drm: add encoder ids to the output handling 2008-05-30 12:19:13 +10:00
Dave Airlie 8ae82f3a2f drm: add encoder / get encoder to the modesetting resources interface 2008-05-30 12:03:36 +10:00
Dave Airlie 6b970f193b drm: remove unused init func from outputs 2008-05-30 11:48:41 +10:00
Dave Airlie 9654c776fd drm/modesetting: add initial encoder structures and setup functions 2008-05-30 11:47:57 +10:00
Dave Airlie 98c5cf7f6f modesetting: reorganise out crtc/outputs are allocated.
Use subclassing from the drivers to allocate the objects. This saves
two objects being allocated for each crtc/output and generally makes
exit paths cleaner.
2008-05-30 11:25:41 +10:00
Dave Airlie df8cd54286 modesetting: reorganise code into core and helper functions.
This splits a lot of the core modesetting code out into a file of
helper functions, that are only called from themselves and/or the driver.

The driver gets called into more often or can call these functions from itself
if it is a helper using driver.

I've broken framebuffer resize doing this but I didn't like the API for that
in any case.
2008-05-29 14:02:14 +10:00
Jesse Barnes b4d8cda8e6 drm_mode_debug_printmodeline doesn't need struct drm_device *
Makes printing modelines from some routines easier.
2008-05-23 18:41:58 -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
Jakob Bornecrantz ba36d54ad4 drm: Made set_config use drm_mode_set as a argument 2008-05-08 15:03:57 +02:00
Dave Airlie ed072ed075 drm_mode: initial replacefb implemenation 2008-05-08 14:02:05 +10:00
Jesse Barnes 83c3acb7da Split TV property creation into its own routine
It needs to take arguments from the caller about supported TV formats,
so declare it in drm_crtc.h and export it.
2008-04-10 20:30:12 -07:00
Jesse Barnes bee546ad69 Remove structure fields & code
Cleanup some random cruft left over from the initial port.
2008-04-10 19:02:53 -07:00
Jesse Barnes 0a6e301e6d Keep display info in struct display_info
Some fields had snuck into the drm_output structure.  Put them back and
fill in more stuff from the EDID block.
2008-04-10 11:23:55 -07:00
Jesse Barnes 6c92689dcc Port pipe reservation code for load detection
TV out needs to do load detection, which means we have to find an
available pipe to use for the detection.  Port over the pipe reservation
code for this purpose.
2008-04-09 14:13:38 -07: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
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
Dave Airlie 0d1cb1e840 hopefully shit works now without this... 2008-02-22 13:49:51 +10:00
Dave Airlie 8844245cfc drm/fb: get rid of offset from structure use bo offset 2008-02-20 11:27:22 +10:00
Jesse Barnes 2b1c9cd696 i915: initial (and untested) TV out support
Ported from xf86-video-intel.  Still need to tie in TV modes somehow, though
preferably w/o using the properties mechanism.
2008-02-15 16:13:21 -08:00
Jakob Bornecrantz 0618ac8a07 Added kernel part of hotplug ioctl 2008-02-07 19:24:58 +01:00
Alan Hourihane f2c706e247 Fix function declaration 2008-02-05 10:11:01 +00:00
Alan Hourihane c9772f8c03 consistency 2008-02-05 09:28:51 +00:00
Jakob Bornecrantz a2254c5a96 Added cursor support 2008-01-28 03:14:56 +01:00
Jakob Bornecrantz f07942f74a Panning now works without modeset 2008-01-11 17:13:48 +01:00
Dave Airlie 629231c626 Merge branch 'modesetting-airlied' into modesetting-101 2007-12-18 19:18:21 +11:00
Dave Airlie 6d03411e5f HERE BEZ HACKZ.. magic variable to make shit work 2007-12-18 19:18:05 +11:00
Dave Airlie b13dc383df remove output names 2007-12-18 17:41:20 +11:00
Jakob Bornecrantz e239882b1e Modesetting Hotplug 2007-12-18 02:21:08 +01:00
Dave Airlie f99dea7db0 modesetting: fixup property setting and add connector property 2007-12-11 15:56:48 +10:00
Dave Airlie 3b6786e3e6 modesetting: add dpms property and initial settable property ioctl 2007-12-11 14:46:51 +10:00
Dave Airlie 67f6eb1eb8 add property blobs and edid reporting support 2007-12-06 10:44:51 +10:00
Dave Airlie 1a6c95ef71 arrgggh.. make all ioctl structs 32/64-bit compatible hopefully.
This also starts to add blob property support.

someone needs to check this work for other things like ppc/x86 alignment diffs
2007-12-05 16:03:05 +10:00
Dave Airlie 96df9b11ad finish of mode add/remove, just have attach/detach modes 2007-12-03 15:30:05 +10:00
Dave Airlie b3af2b59a7 drm/modesetting: add initial gettable properites code.
This allow the user to retrieve a list of properties for an output.
Properties can either be 32-bit values or an enum with an associated name.
Range properties are to be supported.

This API is probably not all correct, I may make properties part of the general
resource get when I think about it some more.

So basically you can create properties and attached them to whatever outputs you want,
so it should be possible to create some generics and just attach them to every output.
2007-11-27 14:31:02 +10:00
Dave Airlie f9ac54b031 fb: make fb interface use user mode attach/detach for adding modes 2007-11-26 15:06:42 +11:00
Dave Airlie 362f428320 add _ioctl to the end of two more ioctls 2007-11-26 14:28:48 +11:00
Dave Airlie 53b4e0cb78 drm: make fb modes use usermode add/remove interface
this stops usermode from getting a mode in the crtc it can't make sense off.
2007-11-26 14:05:49 +11:00
Jesse Barnes e0ab2034c3 Fix connection status ABI
Userspace expects a 1 based enum for connection status so fix up the kernel
definition.
2007-11-16 13:58:43 -08:00
Dave Airlie 2520d3fd99 modes: pass type to userspace for preferred showing 2007-11-15 16:52:04 +11:00
Jerome Glisse ffb89d4c3b drm: split edid handling in get_edid & add_edid_mode
This way driver can get_edid in output status detection
(using all workaround which are in get_edid) and then provide
this edid data in get_mode callback of output.
2007-11-09 15:47:24 +01: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
Jakob Bornecrantz 9ccb8440f3 Changed mode config spinlock to mutex 2007-07-20 11:36:57 +02:00
Jesse Barnes a4929b921e Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:

	linux-core/drm_crtc.c - reconcile with locking changes
2007-05-18 09:42:51 -07:00
Jesse Barnes f894587221 Add locking. The main lock is dev->mode_config.config_lock. It should be
held across any operations that modify mode lists, crtc config, output
config, etc.  It should be taken at high level entry points (currently just
initial config and user IOCTL).

Seems to work ok on my system, but needs more testing (with lockdep) and
review from some fresh eyes.
2007-05-18 09:40:01 -07:00
Alan Hourihane 0c33a2cd2e Move fbo creation to the specified fb driver which gives
it a chance to allocate the memory from whichever buffer it wants to.
2007-05-18 14:16:10 +01:00