platform/upstream/libdrm.git
17 years agoi915: compat code doesn't work in i8xx hw.
Dave Airlie [Tue, 6 Nov 2007 07:00:10 +0000 (18:00 +1100)]
i915: compat code doesn't work in i8xx hw.

17 years ago[PATCH] i915: fix missing G33 detect in IS_I9XX
Zhenyu Wang [Tue, 6 Nov 2007 06:59:14 +0000 (17:59 +1100)]
[PATCH] i915: fix missing G33 detect in IS_I9XX

G33 detect seems missing with Jesse's suspend/resume patch.

17 years agodrm/agp: kernel style fixes
Dave Airlie [Tue, 6 Nov 2007 02:12:10 +0000 (12:12 +1000)]
drm/agp: kernel style fixes

17 years agoi915: cleanup most of the whitespace
Dave Airlie [Tue, 6 Nov 2007 01:32:58 +0000 (11:32 +1000)]
i915: cleanup most of the whitespace

17 years agoExport a symbol.
Thomas Hellstrom [Mon, 5 Nov 2007 12:22:00 +0000 (13:22 +0100)]
Export a symbol.

17 years agoFix a user-buffer check.
Thomas Hellstrom [Mon, 5 Nov 2007 12:20:16 +0000 (13:20 +0100)]
Fix a user-buffer check.

17 years agodrm: more kernel coding style cleanups
Dave Airlie [Mon, 5 Nov 2007 09:14:23 +0000 (19:14 +1000)]
drm: more kernel coding style cleanups

17 years agodrm/ttm: apply linux kernel coding style to bo_lock/move/object/ttm.c
Dave Airlie [Mon, 5 Nov 2007 09:09:18 +0000 (19:09 +1000)]
drm/ttm: apply linux kernel coding style to bo_lock/move/object/ttm.c

17 years agodrm/ttm: kernel coding style for bo.c and objects.h
Dave Airlie [Mon, 5 Nov 2007 09:05:32 +0000 (19:05 +1000)]
drm/ttm: kernel coding style for bo.c and objects.h

17 years agodrm: fix the the typo
Dave Airlie [Mon, 5 Nov 2007 08:56:46 +0000 (18:56 +1000)]
drm: fix the the typo

17 years agodrm: fix memset size error
Li Zefan [Mon, 5 Nov 2007 08:48:27 +0000 (18:48 +1000)]
drm: fix memset size error

The size passing to memset is wrong.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
17 years agodrm: update kernel generator script using v4l script
Dave Airlie [Mon, 5 Nov 2007 02:56:55 +0000 (12:56 +1000)]
drm: update kernel generator script using v4l script

17 years agodrm: remove lots of spurious whitespace.
Dave Airlie [Mon, 5 Nov 2007 02:42:22 +0000 (12:42 +1000)]
drm: remove lots of spurious whitespace.

Kernel "cleanfile" script run.

17 years agodrm: move some of the OS stuff into the OS header
Dave Airlie [Mon, 5 Nov 2007 02:10:52 +0000 (12:10 +1000)]
drm: move some of the OS stuff into the OS header

17 years agonouveau: more nv20_graph_init.
Pekka Paalanen [Thu, 25 Oct 2007 19:34:45 +0000 (22:34 +0300)]
nouveau: more nv20_graph_init.

This patch is originally from malc0_, but since it used some NV40_*
regs, I edited them into hex values with a comment.
This seems to correspond quite well with my own mmio-trace,
for the parts I cared to check.

17 years agonouveau: Use a sw method instead of notify interrupt to signal fence completion.
Ben Skeggs [Sun, 4 Nov 2007 18:42:08 +0000 (05:42 +1100)]
nouveau: Use a sw method instead of notify interrupt to signal fence completion.

17 years agonouveau: disable m2mf buffer move for the moment
Ben Skeggs [Sun, 4 Nov 2007 18:15:32 +0000 (05:15 +1100)]
nouveau: disable m2mf buffer move for the moment

17 years agoFill fence sequence after emit ioctl.
Ben Skeggs [Sun, 4 Nov 2007 17:44:40 +0000 (04:44 +1100)]
Fill fence sequence after emit ioctl.

17 years agonouveau: cleanups
Ben Skeggs [Sun, 4 Nov 2007 16:53:46 +0000 (03:53 +1100)]
nouveau: cleanups

17 years agonouveau: only pass annoying messages if irq isn't handled fully.
Ben Skeggs [Sun, 4 Nov 2007 15:35:56 +0000 (02:35 +1100)]
nouveau: only pass annoying messages if irq isn't handled fully.

17 years agonouveau: vram is bar1
Ben Skeggs [Sun, 4 Nov 2007 15:32:46 +0000 (02:32 +1100)]
nouveau: vram is bar1

17 years agonouveau: hook up an inital fence irq handler
Ben Skeggs [Sun, 4 Nov 2007 15:20:35 +0000 (02:20 +1100)]
nouveau: hook up an inital fence irq handler

17 years agonouveau: crappy ttm mm init, disabled for now.
Ben Skeggs [Sun, 4 Nov 2007 13:01:38 +0000 (00:01 +1100)]
nouveau: crappy ttm mm init, disabled for now.

17 years agodrm: fix oops since user objects..
Dave Airlie [Sun, 4 Nov 2007 00:01:27 +0000 (11:01 +1100)]
drm: fix oops since user objects..

17 years agonouveau: add darktama's email address to authors section.
Jeremy Kolb [Fri, 2 Nov 2007 23:46:27 +0000 (19:46 -0400)]
nouveau: add darktama's email address to authors section.

17 years agonouveau: put it all together.
Jeremy Kolb [Fri, 2 Nov 2007 23:44:30 +0000 (19:44 -0400)]
nouveau: put it all together.

17 years agonouveau: Add darktama's fencing code. Restructure some stuff.
Jeremy Kolb [Fri, 2 Nov 2007 23:43:53 +0000 (19:43 -0400)]
nouveau:  Add darktama's fencing code.  Restructure some stuff.

17 years agonouveau: incorporate darktama's buffer object work.
Jeremy Kolb [Fri, 2 Nov 2007 03:35:46 +0000 (23:35 -0400)]
nouveau: incorporate darktama's buffer object work.

17 years agonouveau: more filling in for ttm. Change copyright since it's based off of radeon...
Jeremy Kolb [Thu, 1 Nov 2007 23:04:38 +0000 (19:04 -0400)]
nouveau: more filling in for ttm.  Change copyright since it's based off of radeon code.

17 years agoUser buffer support.
Thomas Hellstrom [Fri, 2 Nov 2007 15:03:41 +0000 (16:03 +0100)]
User buffer support.

17 years agoReturn fence errors.
Thomas Hellstrom [Fri, 2 Nov 2007 14:52:00 +0000 (15:52 +0100)]
Return fence errors.
Time out properly in the presence of signals.

17 years agoradeon: set the address to access the aperture on the CPU side correctly
Dave Airlie [Fri, 2 Nov 2007 14:39:44 +0000 (00:39 +1000)]
radeon: set the address to access the aperture on the CPU side correctly

This code relied on the CPU and GPU address for the aperture being the same,
On some r5xx hardware I was playing with I noticed that this isn't always true.
I wonder if this will fix some of those r4xx DRI issues we've seen in the past.

17 years agonouveau: don't use AGP on PPC. It's a hopeless case.
Stephane Marchesin [Thu, 1 Nov 2007 14:48:46 +0000 (15:48 +0100)]
nouveau: don't use AGP on PPC. It's a hopeless case.

17 years agonouveau: add missing file.
Jeremy Kolb [Thu, 1 Nov 2007 01:27:00 +0000 (21:27 -0400)]
nouveau: add missing file.

17 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm
Jeremy Kolb [Thu, 1 Nov 2007 00:14:48 +0000 (20:14 -0400)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm

17 years agonouveau: ttm stubs
Jeremy Kolb [Thu, 1 Nov 2007 00:13:01 +0000 (20:13 -0400)]
nouveau: ttm stubs

17 years agodrm/ttm: add support for cached un-snooped mappings.
Dave Airlie [Wed, 31 Oct 2007 23:34:11 +0000 (10:34 +1100)]
drm/ttm: add support for cached un-snooped mappings.

This mapping allows cached objects to be mapped in/out of the TT space
with the appropriate flushing calls.

It should put back the old CACHED functionality for snooped mappings

17 years agoi915: fix compat code on 965/g33
Dave Airlie [Wed, 31 Oct 2007 16:00:36 +0000 (02:00 +1000)]
i915: fix compat code on 965/g33

17 years agodrm: add chipset flushing via agp support
Dave Airlie [Wed, 31 Oct 2007 00:33:34 +0000 (11:33 +1100)]
drm: add chipset flushing via agp support

17 years agoi915: add backwards compat chipset flushing code
Dave Airlie [Wed, 31 Oct 2007 00:27:44 +0000 (11:27 +1100)]
i915: add backwards compat chipset flushing code

17 years agodrm: call driver load after initing agp subsystem
Dave Airlie [Wed, 31 Oct 2007 00:21:05 +0000 (11:21 +1100)]
drm: call driver load after initing agp subsystem

17 years agoNouveau: add a comment about SKIPS for next API breakage.
Stephane Marchesin [Tue, 30 Oct 2007 15:55:17 +0000 (16:55 +0100)]
Nouveau: add a comment about SKIPS for next API breakage.

17 years agoNouveau: fold some loops.
Stephane Marchesin [Tue, 30 Oct 2007 15:54:57 +0000 (16:54 +0100)]
Nouveau: fold some loops.

17 years agodrm/i915: add driver cache flush entry point
Dave Airlie [Tue, 30 Oct 2007 07:51:59 +0000 (17:51 +1000)]
drm/i915: add driver cache flush entry point

Use clflush on Intel hardware to flush cached objects.

17 years agoMove struct drm_drawable_info out of public header file.
Kristian Høgsberg [Mon, 29 Oct 2007 23:32:32 +0000 (19:32 -0400)]
Move struct drm_drawable_info out of public header file.

17 years agoRemove unused memory save areas
Jesse Barnes [Mon, 29 Oct 2007 17:51:11 +0000 (10:51 -0700)]
Remove unused memory save areas

These need to be kmalloc'd separately anyway or we may hit kmalloc size
limits.

17 years agonouveau: don't touch PMC_BOOT_1 on x86, it seems to be undefined on some early cards.
Stephane Marchesin [Sat, 27 Oct 2007 23:59:11 +0000 (01:59 +0200)]
nouveau: don't touch PMC_BOOT_1 on x86, it seems to be undefined on some early cards.

17 years agoi915: suspend/resume support
Jesse Barnes [Fri, 26 Oct 2007 23:10:02 +0000 (16:10 -0700)]
i915:  suspend/resume support

Add suspend/resume support to the i915 driver.  Moves some of the
initialization into the driver load routine, and fixes up places where we
assumed no dev_private existed in some of the cleanup paths.  This allows
us to suspend/resume properly even if X isn't running.

17 years agoupdate DRM sysfs support
Jesse Barnes [Fri, 26 Oct 2007 23:08:54 +0000 (16:08 -0700)]
update DRM sysfs support

Make DRM devices use real Linux devices instead of class devices, which are
going away.  While we're at it, clean up some of the interfaces to take
struct drm_device * or struct device * and use the global drm_class where
needed instead of passing it around.

17 years agonouveau: flip the CHECK_STATE bit off on nv30. This lets you do 8-bit surface destina...
Stephane Marchesin [Fri, 26 Oct 2007 13:11:38 +0000 (15:11 +0200)]
nouveau: flip the CHECK_STATE bit off on nv30. This lets you do 8-bit surface destination.

17 years agoMinor libdrm fixes.
Thomas Hellstrom [Fri, 26 Oct 2007 08:31:14 +0000 (10:31 +0200)]
Minor libdrm fixes.

17 years agoBuffer flags and masks are 64-bit.
Thomas Hellstrom [Fri, 26 Oct 2007 08:25:57 +0000 (10:25 +0200)]
Buffer flags and masks are 64-bit.

don't mask off the high dword.
Signed-off-by: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
17 years agoTighten permissions on some buffer manager ioctls.
Thomas Hellstrom [Thu, 25 Oct 2007 08:29:15 +0000 (10:29 +0200)]
Tighten permissions on some buffer manager ioctls.
Set bo init minor to 0.
Add the version function to header.

17 years agoBuffer manager:
Thomas Hellstrom [Thu, 25 Oct 2007 08:12:21 +0000 (10:12 +0200)]
Buffer manager:
Implement a version check IOCTL for drivers that don't use
drmMMInit from user-space.
Remove the minor check from the kernel code. That's really up
to the driver.
Bump major.

17 years agoFix buffer object flag / mask checking.
Thomas Hellstrom [Thu, 25 Oct 2007 07:49:33 +0000 (09:49 +0200)]
Fix buffer object flag / mask checking.

17 years agoMerge branch 'master' into drm-ttm-finalize
Thomas Hellstrom [Thu, 25 Oct 2007 07:24:45 +0000 (09:24 +0200)]
Merge branch 'master' into drm-ttm-finalize

17 years agoi915: relocate buffers before validation add memory barrier between two
Dave Airlie [Thu, 25 Oct 2007 06:53:18 +0000 (16:53 +1000)]
i915: relocate buffers before validation add memory barrier between two

17 years agoi915: remove relocatee kernel mapping sooner stops mutex taking during sleep
Dave Airlie [Thu, 25 Oct 2007 06:52:33 +0000 (16:52 +1000)]
i915: remove relocatee kernel mapping sooner stops mutex taking during sleep

17 years agomissing mutex unlock bug
Roel Kluin [Thu, 25 Oct 2007 00:24:55 +0000 (10:24 +1000)]
missing mutex unlock bug

17 years agoFix missing \n on some DRM_ERROR in i915_dma.c
Eric Anholt [Wed, 24 Oct 2007 23:27:46 +0000 (16:27 -0700)]
Fix missing \n on some DRM_ERROR in i915_dma.c

17 years agoi915: use a drm memory barrier define
Dave Airlie [Wed, 24 Oct 2007 00:13:15 +0000 (11:13 +1100)]
i915: use a drm memory barrier define

17 years agoi915: require mfence before submitting batchbuffer
Dave Airlie [Tue, 23 Oct 2007 07:54:07 +0000 (17:54 +1000)]
i915: require mfence before submitting batchbuffer

17 years agonouveau: fix IGP
Stephane Marchesin [Tue, 23 Oct 2007 00:18:56 +0000 (02:18 +0200)]
nouveau: fix IGP

17 years agoRemove duplicate file.
Thomas Hellstrom [Mon, 22 Oct 2007 17:16:39 +0000 (19:16 +0200)]
Remove duplicate file.

17 years agoDon't clobber the unfenced list with DONT_FENCE operations.
Thomas Hellstrom [Mon, 22 Oct 2007 17:09:36 +0000 (19:09 +0200)]
Don't clobber the unfenced list with DONT_FENCE operations.

17 years agoA cmdbuf mutex to implement validate-submit-fence atomicity in the absence
Thomas Hellstrom [Mon, 22 Oct 2007 16:59:37 +0000 (18:59 +0200)]
A cmdbuf mutex to implement validate-submit-fence atomicity in the absence
of a hardware lock.

17 years agoSetstatus header.
Thomas Hellstrom [Mon, 22 Oct 2007 11:16:51 +0000 (13:16 +0200)]
Setstatus header.

17 years agoi915: split reloc execution into separate function
Dave Airlie [Mon, 22 Oct 2007 00:54:41 +0000 (11:54 +1100)]
i915: split reloc execution into separate function

17 years agoGet the lock flags right in libdrm.
Thomas Hellstrom [Sun, 21 Oct 2007 10:57:43 +0000 (12:57 +0200)]
Get the lock flags right in libdrm.

17 years agoDisable i915 accelerated blit copy moves for now until we can
Thomas Hellstrom [Sun, 21 Oct 2007 10:31:00 +0000 (12:31 +0200)]
Disable i915 accelerated blit copy moves for now until we can
guarantee that it doesn't clash with the X server.

17 years agoAdapt i915 super-ioctl for lock-free operation.
Thomas Hellstrom [Sun, 21 Oct 2007 10:26:26 +0000 (12:26 +0200)]
Adapt i915 super-ioctl for lock-free operation.

17 years agoRemove the need for the hardware lock in the buffer manager.
Thomas Hellstrom [Sun, 21 Oct 2007 10:20:56 +0000 (12:20 +0200)]
Remove the need for the hardware lock in the buffer manager.
Add interface entry cleaning a memory type without touching NO_EVICT buffers.

17 years agoSimple replacement for hardware lock in some cases.
Thomas Hellstrom [Sat, 20 Oct 2007 14:49:43 +0000 (16:49 +0200)]
Simple replacement for hardware lock in some cases.
Fix i915 since last commit.

17 years agoSome comment updates pending removal of the init mutex.
Thomas Hellstrom [Fri, 19 Oct 2007 14:44:12 +0000 (16:44 +0200)]
Some comment updates pending removal of the init mutex.

17 years agoNo fence_class argument on drmBOSetStatus since it's not
Thomas Hellstrom [Fri, 19 Oct 2007 14:28:47 +0000 (16:28 +0200)]
No fence_class argument on drmBOSetStatus since it's not
associated with a particular command submission.

17 years agoRemove the clean_unfenced function.
Thomas Hellstrom [Fri, 19 Oct 2007 14:24:36 +0000 (16:24 +0200)]
Remove the clean_unfenced function.
Change the restriction that non-creators can't change the buffer flags to
non-creators can't change EVICT and NO_MOVE flags.

17 years agoBug #12838: Fix lock test client vs. server master race and misplaced closes.
Robert Noland [Wed, 17 Oct 2007 20:25:31 +0000 (13:25 -0700)]
Bug #12838: Fix lock test client vs. server master race and misplaced closes.

17 years agoFix a race in the auth test where client prevents server from being master.
Robert Noland [Wed, 17 Oct 2007 20:20:46 +0000 (13:20 -0700)]
Fix a race in the auth test where client prevents server from being 

17 years agoBug #11870: FreeBSD hardware lock cleanup fix with multiple opens by a process.
Jung-uk Kim [Wed, 17 Oct 2007 19:50:29 +0000 (12:50 -0700)]
Bug #11870: FreeBSD hardware lock cleanup fix with multiple opens by a process.

Previously, the lock would get released on the first close by the X Server
(during AIGLX setup), and the Radeon driver would then hang in initialization
due to unexpected failure in DRM calls that required the lock to be held.

Based on a patch by Kostik Belousov.

17 years agoOnly allow creator to change shared buffer mask.
Thomas Hellstrom [Wed, 17 Oct 2007 08:57:12 +0000 (10:57 +0200)]
Only allow creator to change shared buffer mask.

17 years agoRemove the op ioctl, and replace it with a setuser ioctl.
Thomas Hellstrom [Wed, 17 Oct 2007 08:55:21 +0000 (10:55 +0200)]
Remove the op ioctl, and replace it with a setuser ioctl.

Remove need for lock for now.
May create races when we clean memory areas or on takedown.
Needs to be fixed.
Really do a validate on buffer creation in order to avoid problems with
fixed memory buffers.

17 years agoRevert "Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning."
Thomas Hellstrom [Thu, 4 Oct 2007 08:14:41 +0000 (10:14 +0200)]
Revert "Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning."

This reverts cf2d569daca6954d11a796f4d110148ae2e0c827 commit.

17 years agoRevert "Copy the important parts of object_validate into object_create()."
Thomas Hellstrom [Thu, 4 Oct 2007 08:01:30 +0000 (10:01 +0200)]
Revert "Copy the important parts of object_validate into object_create()."

This reverts f9c27aa50b715a7d21858f1ce9e4785120bd0c36 commit.

17 years agoRevert "Remove the pinned buffer from the LRU when pinning."
Thomas Hellstrom [Thu, 4 Oct 2007 07:51:01 +0000 (09:51 +0200)]
Revert "Remove the pinned buffer from the LRU when pinning."

This reverts 3a0bc518e35c62bb9c64c9105f836584d949653f commit.

17 years agoRevert "Add some more verbosity to drm_bo_set_pin_req comments."
Thomas Hellstrom [Thu, 4 Oct 2007 07:50:29 +0000 (09:50 +0200)]
Revert "Add some more verbosity to drm_bo_set_pin_req comments."

This reverts e7bfeb3031374653f7e55d67cc1b5c823849359f commit.

17 years agoi915: lock struct mutex about buffer object lookups
Dave Airlie [Wed, 17 Oct 2007 05:36:14 +0000 (15:36 +1000)]
i915: lock struct mutex about buffer object lookups

17 years agoRevert part of earlier commit that caused an unresolved symbol for i915.
Michel Dänzer [Tue, 16 Oct 2007 13:10:08 +0000 (15:10 +0200)]
Revert part of earlier commit that caused an unresolved symbol for i915.

17 years agodrm: drop drm bo list handling code
Dave Airlie [Tue, 16 Oct 2007 11:28:00 +0000 (22:28 +1100)]
drm: drop drm bo list handling code

17 years agodrm: rename drmBOUnReference to drmBOUnreference for consistency
Dave Airlie [Tue, 16 Oct 2007 11:08:55 +0000 (22:08 +1100)]
drm: rename drmBOUnReference to drmBOUnreference for consistency

17 years agoDrop destroy ioctls for fences and buffer objects.
Kristian Høgsberg [Wed, 10 Oct 2007 01:09:31 +0000 (21:09 -0400)]
Drop destroy ioctls for fences and buffer objects.

We now always create a drm_ref_object for user objects and this is then the only
things that holds a reference to the user object.  This way unreference on will
destroy the user object when the last drm_ref_object goes way.

17 years agoTake bo type argument out of the ioctl interface.
Kristian Høgsberg [Wed, 10 Oct 2007 01:09:30 +0000 (21:09 -0400)]
Take bo type argument out of the ioctl interface.

The buffer object type is still tracked internally, but it is no longer
part of the user space visible ioctl interface.  If the bo create ioctl
specifies a non-NULL buffer address we assume drm_bo_type_user,
otherwise drm_bo_type_dc.  Kernel side allocations call
drm_buffer_object_create() directly and can still specify drm_bo_type_kernel.
Not 100% this makes sense either, but with this patch, the buffer type
is no longer exported and we can clean up the internals later on.

17 years agoEliminate support for fake buffers.
[utf-8] Kristian Høgsberg [Wed, 10 Oct 2007 01:09:29 +0000 (21:09 -0400)]
Eliminate support for fake buffers.

17 years agonouveau: revert unintended change.
Ben Skeggs [Tue, 16 Oct 2007 03:43:57 +0000 (14:43 +1100)]
nouveau: revert unintended change.

17 years agonouveau: Cleanup PGRAPH handler, attempt to survive PGRAPH exceptions.
Ben Skeggs [Tue, 16 Oct 2007 03:42:26 +0000 (14:42 +1100)]
nouveau: Cleanup PGRAPH handler, attempt to survive PGRAPH exceptions.

17 years agonouveau: Survive PFIFO_CACHE_ERROR.
Ben Skeggs [Tue, 16 Oct 2007 02:32:03 +0000 (13:32 +1100)]
nouveau: Survive PFIFO_CACHE_ERROR.

17 years agonouveau: Handle multiple PFIFO exceptions per irq, cleanup output.
Ben Skeggs [Tue, 16 Oct 2007 02:27:27 +0000 (13:27 +1100)]
nouveau: Handle multiple PFIFO exceptions per irq, cleanup output.

17 years agonouveau: PPC fixes. These regs are very touchy.
Stephane Marchesin [Sun, 14 Oct 2007 21:07:30 +0000 (23:07 +0200)]
nouveau: PPC fixes. These regs are very touchy.

17 years agonouveau: fix warning.
Jeremy Kolb [Sun, 14 Oct 2007 14:56:31 +0000 (10:56 -0400)]
nouveau: fix warning.

17 years agonouveau: fix warning.
Jeremy Kolb [Sun, 14 Oct 2007 14:56:17 +0000 (10:56 -0400)]
nouveau: fix warning.

17 years agoi915: fix vbl_swap allocation
Dave Airlie [Sun, 14 Oct 2007 11:19:13 +0000 (21:19 +1000)]
i915: fix vbl_swap allocation