Commit Graph

234 Commits (c9915d695dad8e4f75b4f551f9f78ff3d64dc666)

Author SHA1 Message Date
Maarten Maathuis c9915d695d modesetting-101: Move some defines used for enumeration into the public header.
- Otherwise userspace has no idea of the meaning.
2008-07-04 17:28:04 +02:00
Dave Airlie 142a309604 modesetting: rip out all of the generation code.
not needed, hotplug will work just as well hopefully.
2008-07-04 09:34:24 +10:00
Dave Airlie 382aa3ceeb drm: introduce generation counter to interface.
Idea being if you want to add new crtc/output/encoder dynamically later,
you just increase the generation counter and userspace should re-read
all the resources
2008-06-04 13:50:51 +10:00
Dave Airlie 4e7b246398 drm: add functions to get/set gamma ramps 2008-06-02 14:04:41 +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 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 fae2c17b31 drm: add more encoder interfaces 2008-05-30 12:14:44 +10:00
Dave Airlie ed072ed075 drm_mode: initial replacefb implemenation 2008-05-08 14:02:05 +10: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 7f8e406085 Use fixed sized types in new ioctls
Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat
issues.
2008-04-27 09:42:17 -07:00
Jesse Barnes b45fe49bcd Enum-ectomy of vblank modesetting ioctl
Enum can be of pretty much any size since C leaves the choice of size up to the implementation.  So avoid using it in new interfaces like the vblank pre- & post-modeset ioctl.  Thanks to hch for spotting this.
2008-04-26 17:11:18 -07: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
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 ccae12a837 I really screwed up that merge somehow 2008-03-07 08:58:24 +10:00
Dave Airlie 48a166af14 woah somehow got these upstream 2008-03-07 08:49:27 +10:00
Dave Airlie 44a2209790 Merge branch 'master' of ../../drm into modesetting-101
Conflicts:

	shared-core/drm.h
2008-03-06 05:39:07 +10:00
Dave Airlie 180c9188f4 drm/ttm: add ioctl to get back memory managed area sized
taken from modesetting branch but could be useful outside it.
2008-03-06 05:31:50 +10:00
Dave Airlie 43891ff2d0 Merge remote branch 'origin/master' into modesetting-101
Conflicts:

	linux-core/drm_compat.c
2008-03-05 10:37:02 +10:00
Eric Anholt a6a2f2c8c4 Clarify when WAIT_LAZY is relevant to users. 2008-03-04 13:45:41 -08:00
Eric Anholt 3332a0add6 Remove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS. 2008-03-04 13:41:30 -08:00
Dave Airlie cdad850ebc add ioctl to get back memory managed area sized - used for kernel inited areas 2008-02-22 13:49:51 +10:00
Jakob Bornecrantz 34b76e0fac Added hotplug ioctl 2008-02-07 19:23:27 +01:00
Jakob Bornecrantz a2254c5a96 Added cursor support 2008-01-28 03:14:56 +01: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 bfdddd218e Fixup modeset ioctl number & typedef usage
Should be 0x08 rather than 0xa0, and shouldn't use typedefs.
2008-01-24 21:13:33 -08: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
Eric Anholt 44a9fa8cc6 Add additional explanation of DRM_BO_FLAG_CACHED_MAPPED before I forget again. 2008-01-17 16:55:43 -08:00
Keith Packard d1187641d6 Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
Flags pending validation were stored in a misleadingly named field, 'mask'.
As 'mask' is already used to indicate pieces of a flags field which are
changing, it seems better to use a name reflecting the actual purpose of
this field. I chose 'proposed_flags' as they may not actually end up in
'flags', and in an case will be modified when they are moved over.

This affects the API, but not ABI of the user-mode interface.
2007-12-21 12:16:29 -08:00
Dave Airlie b13dc383df remove output names 2007-12-18 17:41:20 +11:00
Keith Packard b5181d2506 Document drm_bo_do_validate. Remove spurious 'do_wait' parameter.
Add comments about the parameters to drm_bo_do_validate, along
with comments for the DRM_BO_HINT options. Remove the 'do_wait'
parameter as it is duplicated by DRM_BO_HINT_DONT_BLOCK.
2007-12-15 12:10:42 -08:00
Alan Hourihane f62a300547 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101 2007-12-13 10:41:23 +00:00
Keith Packard 57b9a54eb6 Allow relocation to be skipped when buffers don't move.
One of the costs of superioctl has been the need to perform relocations
inside the kernel. The cost of mapping the buffers to the CPU and writing
data is fairly high, especially if those buffers have been mapped and read
by the GPU.

If we assume that buffers don't move around very often, we can have the
client compute the relocations itself using the previous GPU address. When
that object doesn't move, the kernel can skip computing and writing the
updated data.

Here's a patch which adds a new field to struct drm_bo_info_req called
'presumed_offset', and a new DRM_BO_HINT_PRESUMED_OFFSET that is set when
this field has been filled in by the client.

There are two separate optimizations performed when the presumed_offset is
correct:

 1. i915_exec_reloc checks to see if all previous buffer offsets were guessed
    correctly. If so, there's no need for it to look at *any* of the
    relocations for a buffer. When this happens, it skips the whole
    relocation process, simply returning success.

 2. i915_apply_reloc checks to see if the target buffer offset was guessed
    correctly. If so, it skips mapping the relocatee, computing the
    relocation and writing the value. If no relocations are needed, the
    relocatee should never be mapped to the CPU, and so the kernel shouldn't
    need to wait for any fences to pass.
2007-12-11 20:23:00 -08: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 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 c9cda51af5 more WIP on blobs..
I'm going to pass back a list of blob ids and lengths in the getproperty.
will need another ioctl to return the blob data as it is variable length.
2007-12-05 16:31:35 +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 91cd3e3c09 modesetting API change for removing mode ids and making modes per output.
so really want to get a list of modes per output not the global hammer list.
also we remove the mode ids and let the user pass back the full mode description

need to fix up add/remove mode for user modes now
2007-12-03 15:30:05 +10:00
Robert Noland d6295cc9ff drm: Add _DRM_DRIVER map flag.
This flag indicates that the driver is responsible for the map.
2007-12-01 02:40:13 -05: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 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 2520d3fd99 modes: pass type to userspace for preferred showing 2007-11-15 16:52:04 +11: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 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +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