Dave Airlie
09f99dc5fe
drm: remove stray debug code
2008-10-16 10:51:56 +10:00
Dave Airlie
11320fd6b1
drm: add discardable flag.
...
This discards memory contents on suspend/resume with the
hope the upper layers know something we don't.
2008-10-16 10:50:31 +10:00
Dave Airlie
fc33686ef0
drm/radeon: initial suspend/resume fix.
...
This enables the evict code and also sets radeon up
to allow evict from VRAM to LOCAL
2008-10-16 10:49:58 +10:00
Dave Airlie
a981a68603
drm/radeon: fixup clean flag handling
2008-10-06 16:39:25 +10:00
Dave Airlie
2a6dad31d8
radeon: add initial suspend/resume support
...
plus a bunch of fixes
2008-09-18 10:11:23 +10:00
Dave Airlie
c72a4e20e8
drm/ttm: export drm_bo_add_ttm
2008-08-26 17:42:36 +10:00
Dave Airlie
4c8e8e0d0b
drm: add memory clean flag.
...
When the mapping is clean this flag will be set. This can be used
by a driver to save migrating and allocating pages for an object
that will first be used in VRAM.
2008-08-26 17:33:46 +10:00
Dave Airlie
2d4420c666
Merge branch 'radeon-gem-cs' into modesetting-gem
...
Conflicts:
libdrm/xf86drm.c
linux-core/Makefile.kernel
linux-core/drmP.h
linux-core/drm_compat.h
linux-core/drm_drv.c
linux-core/drm_stub.c
linux-core/drm_vm.c
shared-core/i915_dma.c
shared-core/r300_cmdbuf.c
shared-core/radeon_drv.h
2008-08-14 09:36:34 +10:00
Kristian Høgsberg
086716c8e2
Merge commit 'origin/drm-gem' into modesetting-gem
...
Conflicts:
linux-core/Makefile.kernel
linux-core/drmP.h
linux-core/drm_mm.c
linux-core/drm_stub.c
linux-core/i915_gem.c
linux-core/i915_opregion.c
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-08-01 13:35:56 -04:00
Dave Airlie
d2d7f3069d
drm: userspace rip out TTM API
2008-07-31 13:31:30 +10:00
Dave Airlie
9b8d71b5eb
TTM: remove API and userspace objects.
...
This removes all the TTM userspace API and all userspace objects.
It also removes the drm_bo_lock.c code
2008-07-31 12:54:48 +10:00
Eric Anholt
33c8e03787
Revert "Rename drm_mm.c and its fuctions to drm_memrange."
...
This reverts commit 3ad8db2071
.
We ended up not needing that namespace, and I'd rather not have the churn
for producing diffs.
2008-07-30 11:25:34 -07:00
Dave Airlie
df9871064e
radeon: add initial atombios modesetting and GEM -> TTM translation layer.
...
This is an initial import of the atom bios parser with modesetting support
for r500 hw using atombios. It also includes a simple memory manager
layer that translates a radeon GEM style interface onto TTM internally.
So far this memory manager has only been used for pinned object allocation
for the DDX to test modesetting.
2008-07-26 08:56:23 +10:00
Jesse Barnes
a1d9600724
Merge commit 'origin/drm-gem' into modesetting-gem
...
Passed the compile test; it's ready to ship.
Conflicts:
libdrm/Makefile.am
linux-core/Makefile.kernel
linux-core/drmP.h
linux-core/drm_memrange.c
linux-core/drm_stub.c
shared-core/drm.h
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-06-10 17:31:54 -07:00
Hong Liu
1cde3cc1ac
i915: check dummy page before freeing
...
The dummy read page will point to NULL if drm_bo_driver_init failed at
firstopen (modeset is not enabled), and will cause kernel oops at
subsequent drm_lastclose call, so be sure to check it.
2008-05-22 10:35:55 -07:00
Hong Liu
b2dee13f5d
free dummy read page if fail to init mm
...
Since drm_bo_driver_init will be called in driver_load, we need to free
what it alloced when error to avoid memory leak.
2008-05-12 12:07:27 -07:00
Eric Anholt
3ad8db2071
Rename drm_mm.c and its fuctions to drm_memrange.
...
It's not really a graphics memory allocator, just something to track ranges
of address space. It doesn't involve actual allocation, and was consuming
some desired namespace.
2008-04-28 16:54:53 -07: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
Thomas Hellstrom
1ad1bd5bd9
Fix buffer object map wait error.
...
Add some branch prediction hints.
2008-04-14 13:52:33 +02:00
Thomas Hellstrom
c5955c6523
Fix buffer object creation validation.
...
BO lock fixes.
2008-04-14 12:14:20 +02:00
Thomas Hellstrom
c9b73ef6da
Unlock the BO mutex while waiting for idle, unmapped, unfenced.
...
Move unfenced checking into idle checking.
Never time out while waiting for software events like unmapped or unfenced.
2008-04-14 12:13:33 +02:00
Thomas Hellstrom
65dd0e68ff
Fix up buffer manager locking.
2008-04-14 12:13:17 +02:00
Thomas Hellstrom
1f4ba62567
[i915] Report buffer state _after_ fence submission to user-space.
...
This fixes a problem where the wrong bo->fence_type was reported, and
also saves some memory space.
[bo core] export the drm_bo_fill_rep_arg function.
2008-03-30 15:14:45 +02:00
Alan Hourihane
b6dc381fab
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
...
Conflicts:
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-03-12 10:18:33 +00:00
Thomas Hellstrom
5bebcd7a0b
Dont allow !sysadmin clients to alter the memory type of
...
NO_EVICT buffers.
2008-03-12 10:19:36 +01:00
Thomas Hellstrom
7bcce66a1d
Fix kernel crash when we hit OOM conditions.
...
(Alan Hourihane)
2008-03-12 10:07:56 +01:00
Thomas Hellstrom
f1a681ebe5
Avoid duplicate calls to drm_ttm_bind in some cases.
2008-03-12 10:02:09 +01:00
Dave Airlie
f96baf1e1e
Merge branch 'master' of ../../drm into modesetting-101
2008-03-07 11:59:21 +11:00
Dave Airlie
92a30dd608
drm/bo: allow non-suser priv to add kernel BOs.
...
modprobe can be run with dropped capabilities we still want the kernel bos
to work.
2008-03-06 14:43:23 +10:00
Dave Airlie
e00dea812d
Merge branch 'master' of ../../drm into modesetting-101
...
Conflicts:
linux-core/drmP.h
linux-core/drm_drv.c
linux-core/drm_proc.c
linux-core/drm_stub.c
linux-core/drm_sysfs.c
2008-03-06 05:26:23 +10:00
Dave Airlie
12574590cd
drm: reorganise minor number handling using code from modesetting branch
...
Rip out the whole head thing and replace it with an idr and drm_minor
structure.
2008-03-06 05:21:50 +10:00
Dave Airlie
d5c0101252
ttm: make sure userspace can't destroy kernel create memory managers
...
this adds something to say the kernel initialised the memory region not
the userspace. and blocks userspace from deallocating kernel areas
2008-03-06 05:37:54 +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
Xiang, Haihao
638353103d
i915: Evict if relocatee buffer is CACHED_MAPPED before
...
writting relocations, otherwise the GPU probably sees some
inconsistent data. Fix fd.o bug#14656
2008-03-05 15:09:17 +08:00
Alan Hourihane
a72399da2a
silence warning
2008-02-22 11:39:21 +00: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
Dave Airlie
2c409f9a07
ttm: make sure userspace can't destroy kernel create memory managers
2008-02-20 11:27:22 +10:00
Alan Hourihane
f24ed2ad6c
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
...
Conflicts:
linux-core/i915_fence.c
linux-core/via_fence.c
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-02-18 22:35:46 +00:00
Thomas Hellstrom
f1edb7ad91
Simplify the fencing code and differentiate between flushes and
...
waiting types.
Add a "command_stream_barrier" method to the bo driver.
2008-01-30 22:06:02 +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
Dave Airlie
10937cf20b
drm: move drm_head to drm_minor and fix up users
2008-01-04 16:12:24 +11: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
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
629231c626
Merge branch 'modesetting-airlied' into modesetting-101
2007-12-18 19:18:21 +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
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