Commit graph

2259 commits

Author SHA1 Message Date
Dave Airlie
135f51306b drm: only call suspend/resume on control node 2008-01-09 16:21:56 +11:00
Ben Skeggs
fa5e18679f nv50: use dummy page in gart tables
Just to be safe, we don't really know exactly how the tables work yet, so
we can't be certain there's a way to say "page not present".
2008-01-07 17:09:00 +11:00
Pekka Paalanen
f5e5e5c0ea drm: One forgotten rename of 'mask' to 'proposed_flags'.
Due to commit d1187641d6.
2008-01-05 00:42:38 +02:00
Dave Airlie
d3da253adb drm: add initial support for a drm control device node 2008-01-04 17:49:40 +11:00
Dave Airlie
df9cfeff37 crtc: fixup allocation size 2008-01-04 17:48:42 +11:00
Dave Airlie
10937cf20b drm: move drm_head to drm_minor and fix up users 2008-01-04 16:12:24 +11:00
Márton Németh
9ab620d661 drm: cleanup DRM_DEBUG() parameters
As DRM_DEBUG macro already prints out the __FUNCTION__ string (see
drivers/char/drm/drmP.h), it is not worth doing this again. At some
other places the ending "\n" was added.

airlied:- I cleaned up a few that this patch missed also
2008-01-03 16:56:04 +10:00
Xiang, Haihao
b9417f4141 i915: return fence argument from i915_execbuffer ioctl32 routine 2007-12-26 17:13:58 +08:00
Xiang, Haihao
5d8d64ad38 i915: i915_execbuffer ioctl32 routine, fix #13732 2007-12-25 16:57:14 +08:00
Keith Packard
da3601e43a Change drm_bo_type_dc to drm_bo_type_device and comment usage of this value.
I couldn't figure out what drm_bo_type_dc was for; Dave Airlie finally clued
me in that it was the 'normal' buffer objects with kernel allocated pages
that could be mmapped from the drm device file.

I thought that 'drm_bo_type_device' was a more descriptive name.

I also added a bunch of comments describing the use of the type enum values and
the functions that use them.
2007-12-21 12:16:29 -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
Keith Packard
37fb2ac407 Use dummy_read_page for unpopulated kernel-allocated ttm pages.
Previously, dummy_read_page was used only for read-only user allocations; it
filled in pages that were not present in the user address map (presumably,
these were allocated but never written to pages).

This patch allows them to be used for read-only ttms allocated from the
kernel, so that applications can over-allocate buffers without forcing every
page to be allocated.
2007-12-21 12:16:29 -08:00
Keith Packard
881ee70ab7 Move dummy_read_page from drm_ttm_set_user to drm_ttm_create.
I'm hoping to use the dummy_read_page for kernel allocated buffers to avoid
allocating extra pages for read-only buffers (like vertex and batch buffers).
This also eliminates the 'write' parameter to drm_ttm_set_user and just
has DRM_TTM_PAGE_WRITE passed into drm_ttm_create.
2007-12-21 12:16:29 -08:00
Keith Packard
6d44f48002 Clean up and document drm_ttm.c APIs. drm_bind_ttm -> drm_ttm_bind.
Aside from changing drm_bind_ttm to drm_ttm_bind, this patch
adds only documentation and fixes the functions inside drm_ttm.c
to all be prefixed with drm_ttm_.
2007-12-21 12:16:29 -08:00
Dave Airlie
219ba5cd9a s/TRUE/true 2007-12-21 18:38:55 +10: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
a19e0efb0e lockdep warned about a possible locking dependency 2007-12-18 19:17:11 +11:00
Dave Airlie
01f905c177 we should not be unlocking this here 2007-12-18 19:16:51 +11:00
Dave Airlie
b13dc383df remove output names 2007-12-18 17:41:20 +11:00
Jakob Bornecrantz
bdbc34e297 Fix and cleanup of Hotplug 2007-12-18 02:21:08 +01:00
Jakob Bornecrantz
e239882b1e Modesetting Hotplug 2007-12-18 02:21:08 +01:00
Keith Packard
0b031dbd63 Document drm_ttm_set_user.
Add a comment explaining the parameters for this function
2007-12-15 12:10:42 -08:00
Keith Packard
9d17373ffb Document drm_buffer_object_validate function.
Just add documentation for this function, no code changes.
2007-12-15 12:10:42 -08:00
Keith Packard
7461519fed Document fence_class mess in drm_bo_setstatus_ioctl
drmBOSetStatus does not bother to set the fence_class parameter.
Fortunately, drm_bo_setstatus_ioctl doesn't end up using it as it
calls drm_bo_handle_validate with use_old_fence_class = 1.
2007-12-15 12:10:42 -08:00
Keith Packard
5f23519b14 Document drm_bo_handle_validate. Match drm_bo_do_validate parameter order.
Document parameters and usage for drm_bo_handle_validate. Change parameter
order to match drm_bo_do_validate (fence_class has been moved to after
flags, hint and mask values). Existing users of this function have been
changed, but out-of-tree users must be modified separately.
2007-12-15 12:10:42 -08: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
Keith Packard
b0bc5f1ae5 Make ttm create/destroy APIs consistent. Pass page_flags in create.
Creating a ttm was done with drm_ttm_init while destruction was done with
drm_destroy_ttm. Renaming these to drm_ttm_create and drm_ttm_destroy makes
their use clearer. Passing page_flags to the create function will allow that
to know whether user or kernel pages are needed, with the goal of allowing
kernel ttms to be saved for later reuse.
2007-12-15 12:10:41 -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
Alan Hourihane
35a8b61317 catch an out of memory condition 2007-12-13 10:40:36 +00: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
cfa21b22b4 drm: move agp include outside CONFIG_AGP as it isn't dependant on agp in kernel 2007-12-10 10:13:52 +10:00
Jerome Glisse
a693e8ab12 radeon_ms: fix fbcon by fixing palette 2007-12-06 23:36:58 +01:00
Jerome Glisse
a39560e767 radeon_ms: update to lastest fb change 2007-12-06 23:19:52 +01:00
Jerome Glisse
931b4a84a0 Merge commit 'origin/modesetting-101' into modesetting-radeon 2007-12-06 22:42:17 +01:00
Dave Airlie
f1a99ddc14 take down stuff after asking driver to unload 2007-12-06 16:03:28 +10:00
Dave Airlie
9814e87016 retab intelfb code 2007-12-06 11:47:29 +10:00
Dave Airlie
8020724615 check previous mode first 2007-12-06 11:46:54 +10:00
Dave Airlie
1ba2bb3a7e oops initialise variable to false 2007-12-06 11:35:37 +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
Jesse Barnes
f7432d187e Don't free driver mapped locks
This fix is actually a bit of a cleanup too--it moves lock freeing to
drm_rmmap_locked and out of drm_lastclose.  This makes it symmetrical with
addmap and also prevents the lock from being incorrectly freed from driver
mappings.
2007-12-04 14:38:00 -08:00
Jerome Glisse
34797ff67c radeon_ms: radeon modesetting first commit.
This should work on all radeon but there is still many things todo:
    - add crtc2
    - tmds
    - lvds
    - add bios data table so we don't need to hardcode dac/crtc infos
    - separate clock control to make power saving easier & cleaner
    - tiling (warning tiling shouldn't be enable in double scan or interlace)
    - surface reg manager (this goes along with tiling)
    - suspend/resume hook
    - avivo & r500 family support
    - atom bios support (for posting card mostly)
    - finish superioctl skeleton
    - what else ? :)
2007-12-04 23:03:12 +01:00
Dave Airlie
2f6e533421 patch from -mm kernel to use upper_32_bits 2007-12-05 04:56:54 +10:00
Dave Airlie
1a07dd5ffd hooks up sync and flags and also clocks to get mode matching better 2007-12-03 15:30:05 +10:00
Dave Airlie
9a843d3bc7 add flags to mode debug print 2007-12-03 15:30:05 +10:00
Dave Airlie
96df9b11ad finish of mode add/remove, just have attach/detach modes 2007-12-03 15:30:05 +10:00