Commit Graph

35 Commits (88f668a0b91a9961d599c46392f3acbb5573ed9d)

Author SHA1 Message Date
Maarten Maathuis 6738e7b00b modesetting-101: Rename DPMS modes to avoid compatibility issues with xorg definitions. 2008-07-06 11:08:49 +02:00
Jesse Barnes 03bf1fba67 sysfs registration/teardown fixups
A check in drm_sysfs_connector_remove was supposed to allow it to be called
even with unregistered objects, to make cleanup paths a little simpler.
However, device_is_regsitered didn't always seem to return what we thought it
would, so we'd sometimes end up leaving objects lying around rather than
unregistering them.

Fix this situation up by requiring devices to be registered before being
removed.  Any problems resulting from this change should be easier to track
down than the alternative (which is leaving kobjects registered after unload).
2008-06-05 15:58:43 -07:00
Jesse Barnes e90716671d i915: use kzalloc to allocate intel_output for lvds
Better to initialize all the struct fields to 0.  Also more consistent with
other output init routines.
2008-06-04 12:50:03 -07:00
Dave Airlie 58aca7485a drm: remove sysfs in driver for now.. should probably be in helper 2008-06-04 13:03:23 +10:00
Dave Airlie 46c78a2223 drm/modesetting: add best encoder finding for modesetting
This asks the driver to suggest the best encoder for the connector
during the pick crtcs stage.

Need to also do this during mode setting stages
2008-06-02 11:44:35 +10:00
Dave Airlie 0dd000b578 drm/modesetting: move some connector functions to helper.
Migrated the output mode collection into the helper.
2008-06-02 11:12:28 +10:00
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 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 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 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
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 fa116081a9 Fixup sysfs output registration
Put off registering new outputs with sysfs until they're properly configured,
or we may get duplicates if the type hasn't been set yet (as is the case with
SDVO initialization).  This also means moving de-registration into the cleanup
function instead of output destroy, since the latter occurs during the normal
course of setup when an output isn't found (and therefore not registered with
sysfs yet.
2008-04-09 11:30:15 -07:00
Dave Airlie b13dc383df remove output names 2007-12-18 17:41:20 +11:00
Dave Airlie f99dea7db0 modesetting: fixup property setting and add connector property 2007-12-11 15:56:48 +10:00
Jesse Barnes 617cbeed2a Don't use panel fitter if we're programming a native mode
Fix from the DDX driver.
2007-11-27 12:41:05 -08: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
root 5ce8aaae72 Large changes for fbdev support.
Change from DIRECTCOLOR to TRUECOLOR, and enable
support for PSEUDOCOLOR. DIRECTCOLOR support needs more work.

Add the ability to change the mode on the fbdev device.

Support depth 8, 15, 16 and 24 (and 32).

Add a /dev/fbX device per CRTC, but there's some code which
doesn't allocate the fbX device unless the output is actually
enabled. Read the code on this as it impacts the fbcon map flags.

Pick CRTC's based on the available outputs. More work could
be done here to match modes, so cloning could be achieved on
outputs. This fits more inline with what the X code does.
2007-05-17 12:46:36 +01:00
Jesse Barnes eb892fb09d Add a monitor information structure separate from the EDID data for tracking
monitor limits, etc.
2007-04-20 17:59:30 -07:00
Jesse Barnes 4f0841a31c Just use drm_output_destroy to cleanup LVDS failures. It'll call our cleanup
routine, which will take care of freeing our dev_priv and i2c ddc bus.
2007-04-17 18:03:14 -07:00
Jakob Bornecrantz a45fa264f2 Lvds now power up backlight on commit
Now saves previous power level in prepare and sets
that power level in commit, should power level
be 0 it will set maximum level.
2007-04-17 22:27:46 +02:00
David Airlie a890d596fc revert LVDS destroy - this oops on sysfs on sdvo init of i2c bus 2007-04-13 14:50:31 +10:00
Jesse Barnes 9a39cb9b9a Use crtc_from_pipe call in intel_lvds.c and add get_mode panel mode detection. Also fix up error case for when LVDS mode can't be determined. Leave placeholder code in place for BIOS mode probing and platform quirks. 2007-04-12 12:43:47 -07:00
Jesse Barnes c2fce380c2 Move i2c init back to where it belongs and add i2c unregistration in *_destroy. 2007-04-12 08:57:58 -07:00
Jesse Barnes 63d4d40463 Fix i2c unregistration, cleanup panel_fixed_mode assignment. 2007-04-11 11:46:37 -07:00
Jesse Barnes cc7faa4de8 fix modeset cleanup for LVDS and reenable it in i915. 2007-04-11 07:21:24 -07:00
Jesse Barnes 78598fdaa8 Various changes for in-kernel modesetting:
- allow drm_buffer_object_create to be called w/o dev_mapping
  - fixup i915 init code to allocate memory, fb and set modes right
  - pass fb to drm_initial_config for setup
  - change some debug output to make it easier to spot
  - fixup lvds code to use DDC probing correctly
2007-04-11 07:07:54 -07:00
Jesse Barnes 44a8761302 Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:

	linux-core/drm_crtc.c - trivial merge
	linux-core/drm_crtc.h - trivial merge
	linux-core/intel_display.c - crtc_config -> mode_config
	shared-core/i915_dma.c - accommodate new init code in i915_init.c
2007-04-10 10:45:55 -07:00
Jesse Barnes 183cbd92dd Finish bringing in LVDS code, re-add to Makefile. Needed other changes too:
- move EDID structures to drm_edid.h
  - add EDID info structure to drm_output
  - add a few routines to intel_display for getting current mode info
  - add some prototypes to intel_drv.h and drm_crtc.h
2007-04-10 09:47:37 -07:00
Jesse Barnes c446bf50e3 Slam in most of X.Org's i830_lvds (not quite done yet so removed from Makefile.kernel too). 2007-04-09 20:46:38 -07:00
Jesse Barnes ab7ee9c1af remove a printk to make things less verbose 2007-04-07 19:26:55 -07:00
Eric Anholt 1c9ba24c2f Add required permission notices for code copied from X.Org source. 2007-04-05 11:34:11 -07:00
Jesse Barnes 6f3534a13a Add copyrights before I forget 2007-04-05 09:21:31 -07:00
Dave Airlie 52f9028c84 Initial import of modesetting for intel driver in DRM 2007-04-05 11:21:06 +10:00