platform/upstream/libdrm.git
16 years agoMerge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
Jerome Glisse [Fri, 11 Apr 2008 22:15:47 +0000 (00:15 +0200)]
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

16 years agoradeon_ms: rework command submission ioctl & cleanup
Jerome Glisse [Fri, 11 Apr 2008 22:15:12 +0000 (00:15 +0200)]
radeon_ms: rework command submission ioctl & cleanup

16 years agoFixup Intel TV property code
Jesse Barnes [Fri, 11 Apr 2008 03:31:31 +0000 (20:31 -0700)]
Fixup Intel TV property code

Use the new TV property creation routine and fixup the set_property code
to actually do a mode set call when properties change.

16 years agoSplit TV property creation into its own routine
Jesse Barnes [Fri, 11 Apr 2008 03:30:12 +0000 (20:30 -0700)]
Split TV property creation into its own routine

It needs to take arguments from the caller about supported TV formats,
so declare it in drm_crtc.h and export it.

16 years agoRemove structure fields & code
Jesse Barnes [Fri, 11 Apr 2008 02:02:53 +0000 (19:02 -0700)]
Remove structure fields & code

Cleanup some random cruft left over from the initial port.

16 years agoFix masking in get_load_detect_pipe
Jesse Barnes [Thu, 10 Apr 2008 18:27:39 +0000 (11:27 -0700)]
Fix masking in get_load_detect_pipe

Start i at -1 so that the masking works right.

16 years agoKeep display info in struct display_info
Jesse Barnes [Thu, 10 Apr 2008 18:23:55 +0000 (11:23 -0700)]
Keep display info in struct display_info

Some fields had snuck into the drm_output structure.  Put them back and
fill in more stuff from the EDID block.

16 years agoAdd TV out hotplug detection
Jesse Barnes [Wed, 9 Apr 2008 21:12:56 +0000 (14:12 -0700)]
Add TV out hotplug detection

Doesn't yet work on my i915 test machine, but most of the necessary bits
should be there.

16 years agoFix TV load detection
Jesse Barnes [Wed, 9 Apr 2008 21:09:29 +0000 (14:09 -0700)]
Fix TV load detection

Now that we can allocate load detect pipes, we can perform TV out load
detection correctly.  Call the new routines and enable proper TV
detection.

16 years agoPort pipe reservation code for load detection
Jesse Barnes [Wed, 9 Apr 2008 21:07:55 +0000 (14:07 -0700)]
Port pipe reservation code for load detection

TV out needs to do load detection, which means we have to find an
available pipe to use for the detection.  Port over the pipe reservation
code for this purpose.

16 years agoAdd newline to debug output for output add
Jesse Barnes [Wed, 9 Apr 2008 21:06:36 +0000 (14:06 -0700)]
Add newline to debug output for output add

16 years agoOlder kernels don't have kobject_uevent_env(), so punt
Alan Hourihane [Wed, 9 Apr 2008 21:07:40 +0000 (22:07 +0100)]
Older kernels don't have kobject_uevent_env(), so punt
the event for these older kernels.

16 years agoFixup sysfs output registration
Jesse Barnes [Wed, 9 Apr 2008 18:30:15 +0000 (11:30 -0700)]
Fixup sysfs output registration

Put off registering new outputs with sysfs until they're properly configured,
or we may get duplicates if the type hasn't been set yet (as is the case with
SDVO initialization).  This also means moving de-registration into the cleanup
function instead of output destroy, since the latter occurs during the normal
course of setup when an output isn't found (and therefore not registered with
sysfs yet.

16 years agoMerge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
Jesse Barnes [Tue, 8 Apr 2008 19:48:41 +0000 (12:48 -0700)]
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

16 years agoAdd devname in modeset case
Jesse Barnes [Tue, 8 Apr 2008 19:44:52 +0000 (12:44 -0700)]
Add devname in modeset case

If the driver is 'modeset' enabled, it'll register it's interrupt
handler at load time.  Set the devname in this case so that
/proc/interrupts makes sense.

16 years agoImproved DRM sysfs support
Jesse Barnes [Tue, 8 Apr 2008 19:42:23 +0000 (12:42 -0700)]
Improved DRM sysfs support

This patch ties outputs, output properties and hotplug events into the
DRM core.  Each output has a corresponding directory under the primary
DRM device (usually card0) containing dpms, edid, modes, and connection
status files.

New hotplug change events occur when outputs are added or hotplug events
are detected.

16 years agoradeon_ms: command buffer validation use array of function pointer
Jerome Glisse [Tue, 8 Apr 2008 00:18:14 +0000 (02:18 +0200)]
radeon_ms: command buffer validation use array of function pointer

16 years agoradeon_ms: another fb fix reset mode if fb changed
Jerome Glisse [Mon, 7 Apr 2008 18:49:36 +0000 (20:49 +0200)]
radeon_ms: another fb fix reset mode if fb changed

16 years agoradeon_ms: fix framebuffer code
Jerome Glisse [Sun, 6 Apr 2008 17:23:20 +0000 (19:23 +0200)]
radeon_ms: fix framebuffer code

16 years agoradeon_ms: check for NULL fb
Jerome Glisse [Sun, 6 Apr 2008 17:01:31 +0000 (19:01 +0200)]
radeon_ms: check for NULL fb

16 years agoradeon_ms: add crtc set base callback & fix palette
Jerome Glisse [Thu, 3 Apr 2008 01:15:47 +0000 (03:15 +0200)]
radeon_ms: add crtc set base callback & fix palette

16 years agoradeon_ms: fixes fb handling
Jerome Glisse [Thu, 3 Apr 2008 01:14:52 +0000 (03:14 +0200)]
radeon_ms: fixes fb handling

16 years agoradeon_ms: small fix & cleanup to command checking
Jerome Glisse [Mon, 31 Mar 2008 19:50:02 +0000 (21:50 +0200)]
radeon_ms: small fix & cleanup to command checking

16 years agoradeon_ms: initial pass at command buffer validation
Jerome Glisse [Sun, 30 Mar 2008 22:55:05 +0000 (00:55 +0200)]
radeon_ms: initial pass at command buffer validation

16 years agoradeon_ms: add hang debuging helper functions
Jerome Glisse [Sun, 30 Mar 2008 10:45:57 +0000 (12:45 +0200)]
radeon_ms: add hang debuging helper functions

16 years agoradeon_ms: this is a modesetting driver, bring things up to date
Jerome Glisse [Thu, 27 Mar 2008 19:08:37 +0000 (20:08 +0100)]
radeon_ms: this is a modesetting driver, bring things up to date

16 years agodrm: remove authentication on master exit.
Dave Airlie [Thu, 27 Mar 2008 05:55:49 +0000 (15:55 +1000)]
drm: remove authentication on master exit.

using contexts for this is bad for multiple masters

16 years agoMerge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
Jerome Glisse [Thu, 20 Mar 2008 16:44:32 +0000 (17:44 +0100)]
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

16 years agoradeon_ms: fix fence
Jerome Glisse [Thu, 20 Mar 2008 16:43:43 +0000 (17:43 +0100)]
radeon_ms: fix fence

16 years agodrm: add master set/drop protocol
Dave Airlie [Mon, 17 Mar 2008 06:37:46 +0000 (16:37 +1000)]
drm: add master set/drop protocol

this may not survive long - just need something for testing

16 years agoi915: safety check the sarea map still exists
Dave Airlie [Mon, 17 Mar 2008 06:34:15 +0000 (16:34 +1000)]
i915: safety check the sarea map still exists

16 years agodrm: pick correct master for cleaning up
Dave Airlie [Mon, 17 Mar 2008 06:33:15 +0000 (16:33 +1000)]
drm: pick correct master for cleaning up

When a master is exiting, make sure we clean it up and not the currently
in charge master.

16 years agodrm: select the correct master to attempt to remove the lock from.
Dave Airlie [Mon, 17 Mar 2008 06:32:27 +0000 (16:32 +1000)]
drm: select the correct master to attempt to remove the lock from.

When destroying DRI sarea, make sure you use the master associated with the
sarea and not the one currently in charge

16 years agoFix green offset
Alan Hourihane [Thu, 13 Mar 2008 11:47:37 +0000 (11:47 +0000)]
Fix green offset

16 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Alan Hourihane [Wed, 12 Mar 2008 10:18:33 +0000 (10:18 +0000)]
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

16 years agoAdd sample code to test hotplug events
Alan Hourihane [Wed, 12 Mar 2008 09:47:52 +0000 (09:47 +0000)]
Add sample code to test hotplug events

16 years agoBug # 14712
Thomas Hellstrom [Wed, 12 Mar 2008 09:36:40 +0000 (10:36 +0100)]
Bug # 14712
Disable page saving for GPU read-only TTMs.

16 years agoDont allow !sysadmin clients to alter the memory type of
Thomas Hellstrom [Wed, 12 Mar 2008 09:19:36 +0000 (10:19 +0100)]
Dont allow !sysadmin clients to alter the memory type of
NO_EVICT buffers.

16 years agoFix for debug memory routines
Alan Hourihane [Thu, 17 Jan 2008 13:04:42 +0000 (13:04 +0000)]
Fix for debug memory routines

16 years agoAdd error message
Alan Hourihane [Thu, 17 Jan 2008 13:04:23 +0000 (13:04 +0000)]
Add error message

16 years agoAdd an emergency pinnable memory quota for root-only processes.
Thomas Hellstrom [Thu, 17 Jan 2008 12:10:36 +0000 (13:10 +0100)]
Add an emergency pinnable memory quota for root-only processes.

16 years agoFix kernel crash when we hit OOM conditions.
Thomas Hellstrom [Wed, 12 Mar 2008 09:07:56 +0000 (10:07 +0100)]
Fix kernel crash when we hit OOM conditions.
(Alan Hourihane)

16 years agoAvoid duplicate calls to drm_ttm_bind in some cases.
Thomas Hellstrom [Wed, 12 Mar 2008 09:02:09 +0000 (10:02 +0100)]
Avoid duplicate calls to drm_ttm_bind in some cases.

16 years agoMake sure other TTM memory types than TT is really unbound when evicted.
Thomas Hellstrom [Wed, 12 Mar 2008 08:56:06 +0000 (09:56 +0100)]
Make sure other TTM memory types than TT is really unbound when evicted.

16 years agoAvoid large kmallocs.
Thomas Hellstrom [Thu, 28 Feb 2008 08:08:52 +0000 (09:08 +0100)]
Avoid large kmallocs.

16 years agodrm: fix fd closing ordering.
Dave Airlie [Wed, 12 Mar 2008 04:48:01 +0000 (14:48 +1000)]
drm: fix fd closing ordering.

If the master fd goes away before the aiglx fd, we try and get a lock
that actually doesn't exist.

16 years agoglobal hotplug events happen in the pipe A stat register,
Alan Hourihane [Tue, 11 Mar 2008 21:24:29 +0000 (21:24 +0000)]
global hotplug events happen in the pipe A stat register,
they are not pipe A specific. Remove pipe B code.

16 years agoAdd support for monitor hotplug signals/waits
Alan Hourihane [Tue, 11 Mar 2008 20:29:37 +0000 (20:29 +0000)]
Add support for monitor hotplug signals/waits

Also adjust i915 irq handling as it follows the 16bit'ism's
of the i8xx series.

16 years agonouveau: move AGP reset to mem_init_agp
Stuart Bennett [Tue, 11 Mar 2008 00:33:58 +0000 (00:33 +0000)]
nouveau: move AGP reset to mem_init_agp

Also, power cycle PGRAPH when resetting AGP -- it seems to fix problems encountered by p0g on nv25

16 years agodrm: fix oops on unload.
Dave Airlie [Tue, 11 Mar 2008 06:05:26 +0000 (16:05 +1000)]
drm: fix oops on unload.

if we are unloading the module, there is no master so therefore no lock

16 years agodrm: hopefully fix cursors on 965
Dave Airlie [Tue, 11 Mar 2008 01:49:27 +0000 (11:49 +1000)]
drm: hopefully fix cursors on 965

16 years agoMerge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
Jerome Glisse [Mon, 10 Mar 2008 22:36:27 +0000 (23:36 +0100)]
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101

16 years agorradeon_ms: rework fence code and bring radeon ms up to date
Jerome Glisse [Mon, 10 Mar 2008 22:35:07 +0000 (23:35 +0100)]
rradeon_ms: rework fence code and bring radeon ms up to date

16 years agoremove unneeded load call
Dave Airlie [Mon, 10 Mar 2008 08:30:17 +0000 (18:30 +1000)]
remove unneeded load call

16 years agoSwitch from PIPE_VBLANK to PIPE_EVENT interrupts.
Keith Packard [Thu, 24 Jan 2008 19:46:45 +0000 (11:46 -0800)]
Switch from PIPE_VBLANK to PIPE_EVENT interrupts.

My 965GM gets interrupts stuck when using the old PIPE_VBLANK interrupt.
Switch to the PIPE_EVENT interrupt mechanism, and set the PIPE*STAT
registers to use START_VBLANK on 965 and VBLANK on previous chips.

16 years agodrm/radeon: check sarea_priv exists
Dave Airlie [Fri, 7 Mar 2008 22:30:03 +0000 (08:30 +1000)]
drm/radeon: check sarea_priv exists

16 years agodrm: we already worked out the pitch. multiplying by 4 is just madness..
Dave Airlie [Fri, 7 Mar 2008 06:09:51 +0000 (17:09 +1100)]
drm: we already worked out the pitch. multiplying by 4 is just madness..

16 years agonouveau: redo channel idle detection
Ben Skeggs [Fri, 7 Mar 2008 04:08:59 +0000 (15:08 +1100)]
nouveau: redo channel idle detection

Will hopefully work a bit better than previous code, which depended on
knowing the channel's most recent PUT value.  Some chips always return
0 on reading these regs, and currently userspace is the only other entity
which knows the value.

16 years agonouveau: don't touch NV_USER regs on channel destroy.
Ben Skeggs [Fri, 7 Mar 2008 03:38:05 +0000 (14:38 +1100)]
nouveau: don't touch NV_USER regs on channel destroy.

Not only was this entirely pointless, it actually causes my NV30GL to
die randomly when channels are destroyed.

16 years agomake startup of Xorg smoother if the mode doesn't change.
Dave Airlie [Fri, 7 Mar 2008 02:03:42 +0000 (13:03 +1100)]
make startup of Xorg smoother if the mode doesn't change.

just flip the framebuffer in when required.

16 years agoactually turn the irq off
Dave Airlie [Fri, 7 Mar 2008 02:03:32 +0000 (13:03 +1100)]
actually turn the irq off

16 years agoworst merge effort ever
Dave Airlie [Fri, 7 Mar 2008 01:25:26 +0000 (12:25 +1100)]
worst merge effort ever

16 years agodrm/modesetting: fixup irq removal on exit
Dave Airlie [Fri, 7 Mar 2008 01:15:38 +0000 (12:15 +1100)]
drm/modesetting: fixup irq removal on exit

16 years agoMerge branch 'master' of ../../drm into modesetting-101
Dave Airlie [Fri, 7 Mar 2008 00:59:21 +0000 (11:59 +1100)]
Merge branch 'master' of ../../drm into modesetting-101

16 years agoflush_agp_mappings commit
Dave Airlie [Thu, 6 Mar 2008 23:29:35 +0000 (09:29 +1000)]
flush_agp_mappings commit

16 years agoI really screwed up that merge somehow
Dave Airlie [Thu, 6 Mar 2008 22:58:24 +0000 (08:58 +1000)]
I really screwed up that merge somehow

16 years agodrm: fixup for new sysfs API
Dave Airlie [Thu, 6 Mar 2008 22:56:20 +0000 (08:56 +1000)]
drm: fixup for new sysfs API

16 years agowoah somehow got these upstream
Dave Airlie [Thu, 6 Mar 2008 22:49:27 +0000 (08:49 +1000)]
woah somehow got these upstream

16 years agodrm/bo: allow non-suser priv to add kernel BOs.
Dave Airlie [Thu, 6 Mar 2008 04:43:23 +0000 (14:43 +1000)]
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.

16 years agobuild fix
Alan Hourihane [Wed, 5 Mar 2008 10:33:57 +0000 (10:33 +0000)]
build fix

16 years agoAdd property info.
Alan Hourihane [Wed, 5 Mar 2008 10:33:16 +0000 (10:33 +0000)]
Add property info.

fix bo handle

16 years agoCheck mode before adding to EDID
Alan Hourihane [Tue, 4 Mar 2008 17:53:04 +0000 (17:53 +0000)]
Check mode before adding to EDID

16 years agoUse ARRAY_SIZE
Alan Hourihane [Tue, 4 Mar 2008 17:52:37 +0000 (17:52 +0000)]
Use ARRAY_SIZE

16 years agopropogate failed fixups back up
Alan Hourihane [Tue, 4 Mar 2008 17:51:56 +0000 (17:51 +0000)]
propogate failed fixups back up

16 years agoFix connector description table
Alan Hourihane [Tue, 4 Mar 2008 17:50:59 +0000 (17:50 +0000)]
Fix connector description table

16 years agoMerge branch 'master' of ../../drm into modesetting-101
Dave Airlie [Wed, 5 Mar 2008 19:39:07 +0000 (05:39 +1000)]
Merge branch 'master' of ../../drm into modesetting-101

Conflicts:

shared-core/drm.h

16 years agottm: make sure userspace can't destroy kernel create memory managers
Dave Airlie [Mon, 18 Feb 2008 00:39:21 +0000 (10:39 +1000)]
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

16 years agodrm/ttm: add ioctl to get back memory managed area sized
Dave Airlie [Wed, 20 Feb 2008 03:27:10 +0000 (13:27 +1000)]
drm/ttm: add ioctl to get back memory managed area sized

taken from modesetting branch but could be useful outside it.

16 years agoMerge branch 'master' of ../../drm into modesetting-101
Dave Airlie [Wed, 5 Mar 2008 19:26:23 +0000 (05:26 +1000)]
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

16 years agodrm: reorganise minor number handling using code from modesetting branch
Dave Airlie [Wed, 5 Mar 2008 19:21:50 +0000 (05:21 +1000)]
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.

16 years agodrm: Fix for non-coherent DMA PowerPC
Benjamin Herrenschmidt [Wed, 5 Mar 2008 09:25:03 +0000 (19:25 +1000)]
drm: Fix for non-coherent DMA PowerPC

This patch fixes bits of the DRM so to make the radeon DRI work on
non-cache coherent PCI DMA variants of the PowerPC processors.

It moves the few places that needs change to wrappers to that
other architectures with similar issues can easily add their
own changes to those wrappers, at least until we have more useful
generic kernel API.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agoi915: Evict if relocatee buffer is CACHED_MAPPED before
Xiang, Haihao [Wed, 5 Mar 2008 07:08:46 +0000 (15:08 +0800)]
i915: Evict if relocatee buffer is CACHED_MAPPED before
writting relocations, otherwise the GPU probably sees some
inconsistent data. Fix fd.o bug#14656

16 years agofixup previous merge
Dave Airlie [Wed, 5 Mar 2008 05:28:59 +0000 (15:28 +1000)]
fixup previous merge

16 years agodrm: fixup compat with old x.org drivers
Dave Airlie [Wed, 5 Mar 2008 05:28:38 +0000 (15:28 +1000)]
drm: fixup compat with old x.org drivers

16 years agolibdrm: fix warnings in mode code
Dave Airlie [Wed, 5 Mar 2008 00:41:54 +0000 (10:41 +1000)]
libdrm: fix warnings in mode code

16 years agoMerge remote branch 'origin/master' into modesetting-101
Dave Airlie [Wed, 5 Mar 2008 00:37:02 +0000 (10:37 +1000)]
Merge remote branch 'origin/master' into modesetting-101

Conflicts:

linux-core/drm_compat.c

16 years agoremove unused functions + include header file
Dave Airlie [Wed, 5 Mar 2008 00:31:43 +0000 (10:31 +1000)]
remove unused functions + include header file

16 years agoClarify when WAIT_LAZY is relevant to users.
Eric Anholt [Tue, 4 Mar 2008 21:45:41 +0000 (13:45 -0800)]
Clarify when WAIT_LAZY is relevant to users.

16 years agoRemove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS.
Eric Anholt [Thu, 31 Jan 2008 03:02:56 +0000 (19:02 -0800)]
Remove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS.

16 years agoClarify through the names what drm_ttm_alloc_pages() and friend actually did.
Eric Anholt [Tue, 4 Mar 2008 21:35:23 +0000 (13:35 -0800)]
Clarify through the names what drm_ttm_alloc_pages() and friend actually did.

These are all about the page directory (pointers to pages) rather than the
actual pages backing the allocation.

16 years agoDon't shortcut the info syscall for drmBOBusy on nonshareable objects.
Eric Anholt [Tue, 4 Mar 2008 20:16:51 +0000 (12:16 -0800)]
Don't shortcut the info syscall for drmBOBusy on nonshareable objects.

This broke the results when you're trying to check if a buffer you dispatched
some time ago is done being rendered from.

16 years ago [i915] 2D driver may reset Frame count value, this may lead driver
Zou Nan hai [Mon, 3 Mar 2008 06:49:49 +0000 (14:49 +0800)]
  [i915] 2D driver may reset Frame count value, this may lead driver
  to leap it's vblank count a huge value.
  This will stall some applications that switch video mode if vblank_mode is set to a non zero value in drirc.

16 years agoAdd FENCE registers to MMIO list
Alan Hourihane [Sun, 2 Mar 2008 21:48:40 +0000 (21:48 +0000)]
Add FENCE registers to MMIO list

16 years agoFIX_KMAP_BEGIN requires CONFIG_HIMEM (see include/asm-i386.h/fixmap.h)
Patrice Mandin [Fri, 29 Feb 2008 20:57:40 +0000 (21:57 +0100)]
FIX_KMAP_BEGIN requires CONFIG_HIMEM (see include/asm-i386.h/fixmap.h)

16 years agoFix compilation breakage on x86-64.
Thomas Hellstrom [Fri, 29 Feb 2008 12:31:14 +0000 (13:31 +0100)]
Fix compilation breakage on x86-64.

16 years agodrm: change fb api to take a bo handle not the bo pointer.
Dave Airlie [Fri, 29 Feb 2008 04:07:29 +0000 (14:07 +1000)]
drm: change fb api to take a bo handle not the bo pointer.

16 years agoagp: export the correct symbol
Dave Airlie [Fri, 29 Feb 2008 00:16:24 +0000 (10:16 +1000)]
agp: export the correct symbol

16 years agoAdd a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
Thomas Hellstrom [Thu, 28 Feb 2008 12:47:15 +0000 (13:47 +0100)]
Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of

PCI- or high memory.
This is substantially more efficient than drm_bo_kmap,
since the mapping only lives on a single processor.
Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry.

Add a support utility int drm_bo_pfn_prot() that returns the
pfn and desired page protection for a given bo offset.

This is all intended for relocations in bound TTMS or vram.
Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros
or a spinlock.

16 years agodrm: add modesetting as a driver feature.
Dave Airlie [Thu, 28 Feb 2008 06:24:17 +0000 (16:24 +1000)]
drm: add modesetting as a driver feature.

This change adds a driver feature that for i915 is controlled by a module
parameter. You now need to do insmod i915.ko modeset=1 to enable it the
modesetting paths.

It also fixes up lots of X paths. I can run my new DDX driver on this code
with and without modesetting enabled

16 years agodrm: add a check for if modesetting is supported.
Dave Airlie [Thu, 28 Feb 2008 02:59:39 +0000 (12:59 +1000)]
drm: add a check for if modesetting is supported.

This is Linux only code, it just uses sysfs to see if a control
device has been registered on the requested PCI ID