Commit Graph

49 Commits (0dd000b578adec6ff101c957bce7dc9a32b76713)

Author SHA1 Message Date
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 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 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
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 74a49aea61 intel: set correct limits on screen width/height from DDX 2008-05-08 16:10:06 +10:00
Hong Liu 21a93915d8 Porting DVO stuff
Ported from Xorg intel 2d driver. Changed interfaces definitions, which needed
to be changed later if other device wants to use these DVO stuff.
2008-04-17 11:43:28 -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 ebd1544973 Fix masking in get_load_detect_pipe
Start i at -1 so that the masking works right.
2008-04-10 11:27:39 -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
Dave Airlie 52748d1792 drm: hopefully fix cursors on 965 2008-03-11 13:23:33 +10:00
Alan Hourihane 73cb02b543 DRM_INFO -> DRM_DEBUG 2008-02-26 15:21:44 +00: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 088b383829 fb: fixup the offset by getting it from the right place 2008-02-15 16:42:44 +10:00
Dave Airlie 0fbee62ec1 major port of multi-master ideas into modesetting 2008-02-13 15:19:42 +10:00
Jakob Bornecrantz abed099558 Fix for cursor off 2008-01-30 16:16:10 +01:00
Jakob Bornecrantz a2254c5a96 Added cursor support 2008-01-28 03:14:56 +01:00
Jakob Bornecrantz e6fc47129f Fix for X axis panning problem 2008-01-11 17:33:00 +01:00
Jakob Bornecrantz f07942f74a Panning now works without modeset 2008-01-11 17:13:48 +01:00
Dave Airlie 10937cf20b drm: move drm_head to drm_minor and fix up users 2008-01-04 16:12:24 +11:00
Dave Airlie 219ba5cd9a s/TRUE/true 2007-12-21 18:38:55 +10:00
Alan Hourihane d69721a14a Set the fb_base, so userspace applications can actually work
now instead of locking up.
2007-09-28 09:21:09 +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
Jesse Barnes b7bf317f42 Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:

	linux-core/drm_crtc.c
	linux-core/drm_fb.c

Lots of changes to merge with alanh's latest stuff:
  o fix use of fb->pitch now that it has the right value
  o add new helper for finding the CRTC given an FB
  o fix new fb_probe/fb_remove functions to take a CRTC
  o fixup callers of new FB routines
  o port drm_fb changes to intel_fb
  o check for errors after creating fb buffer object
  o go back to using cfb_imageblit since the accel stubs aren't ready
2007-05-17 10:35:07 -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
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
Dave Airlie 34be91fe4e i915: fix vblank pipe setup 2007-04-26 14:50:00 +10:00
Jesse Barnes 9ca4932054 Add a mode name generation wrapper to make name format changes easier. 2007-04-20 16:32:58 -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
Jakob Bornecrantz cd5769c3b5 Fix offset should from pci device address 2007-04-16 20:54:24 +02:00
Jesse Barnes 6b229c1e59 Add new function for getting a CRTC pointer given a pipe number. 2007-04-12 12:41:56 -07:00
Dave Airlie b49b3ba4c1 set bracing style like Linux 2007-04-12 11:43:13 +10:00
Jesse Barnes 425da42e95 Whitespace cleanups. 2007-04-11 11:44:54 -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
David Airlie 3e994a56be use fb pitch and fix up some whitespace 2007-04-11 13:26:21 +10: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
David Airlie b9c7fa55e2 fixup sarea writes for set pipe base and dpms 2007-04-10 16:32:17 +10:00
David Airlie f1476e4e5c re-tab and fixup the i915GM get core clock function to actually work 2007-04-10 16:25:52 +10:00
David Airlie 40bd6dcd86 set the base address of the CRTC correctly 2007-04-10 15:20:50 +10:00
David Airlie eb9bdc2787 mode: fixup problems with framebuffer add function 2007-04-10 11:51:31 +10:00
Dave Airlie ed0ebd9d3d make crtc_config be named mode_config
X.org calls this crtc_config but this is a bad name and will confuse ppl later
(and me now :-)
2007-04-10 18:56:02 +10: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