Commit Graph

49 Commits (db85ed25afc616acfaadb21facf6066354f9d490)

Author SHA1 Message Date
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
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 89231953d1 Add support for user defined modes
This allows userspace to specify modes and add them to the modesetting
system and attach modes to outputs
2007-05-01 13:16:29 +10:00
Dave Airlie ceb44021ad drm: make mode numbers no change by comparing probed modes
The mode list sets all the output modes to UNVERIFIED, then probes a new list,
If a mode is on the new list and not on the old, it adds it to the old,
if a mode is on the new list and old, it just updates the status to the new
mode status.
If a mode is on the old list and not on the new, prune invalid modes should
remove all UNVERIFIED modes
2007-04-23 11:42:29 +10:00
Jesse Barnes 97b5599982 Oops, edid data should just be a char *, as edid.h is private to edid.c
(we can just recombine them now).
2007-04-20 18:00:44 -07: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 9ca4932054 Add a mode name generation wrapper to make name format changes easier. 2007-04-20 16:32:58 -07:00
Jesse Barnes 5587961cfe Document main drm_crtc.c functions, and rename drm_crtc_mode_create to
drm_mode_create to be consistent with the other functions.  Also document
where we need locking fixes and what the locks are for.
2007-04-18 11:49:42 -07:00
Jesse Barnes 1c7f895fa6 Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:

	shared-core/i915_init.c - reconcile with airlied's new code
2007-04-17 10:14:18 -07:00
Jesse Barnes 4e4d9cbeb3 Move initial framebuffer allocation and configuration to drm_initial_config,
remove i915_driver_load fb related stuff.  Add a small helper for setting up
outputs.
2007-04-17 10:00:37 -07:00
Dave Airlie 79aa1d5474 another large overhaul of interactions with userspace...
We need to keep a list of user created fbs to nuke on master exit.
We also need to use the bo properly.
2007-04-17 18:16:38 +10:00
Dave Airlie a81558d8b3 add getfb ioctl 2007-04-12 08:45:40 +10: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
Dave Airlie 32f6a58db2 add initial drm_fb framebuffer
So far I can load fbcon, once I use my miniglx to add a framebuffer.
fbcon doesn't show anything on screen but baby steps and all that.
2007-04-11 16:33:03 +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 65f465ed5a fixup numerous issues with adding framebuffer support
This still isn't perfect but it fixes a few oopses and cleans up
some of the tabs and bugs in the original fb limit code
2007-04-10 14:49:49 +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
Jakob Bornecrantz b50bda002b add addfb/rmfb ioctls
Originally from Jakob, cleaned up by airlied.
2007-04-10 18:44:47 +10:00
Jesse Barnes a35ba455b2 make drmP.h include drm_crtc.h for CRTC related stuff.
fixup drm_crtc.c so it matches VGA and other outputs properly.
make drm_crtc.c less verbose.
add function declarations in drm_crtc.h for other files.
2007-04-07 19:22:39 -07:00
Dave Airlie b4094864f1 checkpoint commit: implement SetCrtc so modes can in theory be set from user
This hooks up the userspace mode set it "seems" to work.
2007-04-05 18:01:02 +10:00
Dave Airlie 7bb112feca checkpoint commit: added getresources, crtc and output
This adds the user interfaces from Jakob and hooks them up for 3 ioctls
GetResources, GetCrtc and GetOutput.

I've made the ids for everything fbs, crtcs, outputs and modes go via idr as
per krh's suggestion on irc as it make the code nice and consistent.
2007-04-05 17:06:42 +10:00
Dave Airlie 5bffbd6e27 initial userspace interface to get modes 2007-04-05 13:34:50 +10:00
Dave Airlie 52f9028c84 Initial import of modesetting for intel driver in DRM 2007-04-05 11:21:06 +10:00