Commit Graph

101 Commits (11f2a2ed6f854e7b461a98408df54167e9b9566d)

Author SHA1 Message Date
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
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
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Eric Anholt 5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07:00
Eric Anholt c1119b1b09 Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Eric Anholt e39286eb5e Remove DRM_ERR OS macro.
This was used to make all ioctl handlers return -errno on linux and errno on
*BSD.  Instead, just return -errno in shared code, and flip sign on return from
shared code to *BSD code.
2007-07-20 12:53:52 -07:00
Dave Airlie 24311d5d82 drm: remove drm_buf_t 2007-07-16 13:42:11 +10:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie b95ac8b7b3 drm: detypedef drm.h and fixup all problems 2007-07-16 11:22:15 +10:00
Dave Airlie 7b48f0022a drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
2007-05-26 04:26:24 +10:00
Dave Airlie bbb6fc9307 make drm fops const from kernel 2007-03-19 08:36:01 +11:00
Dave Airlie a253de2fcf drm: remove last usage of VM_OFFSET 2007-02-18 17:59:40 +11:00
Dave Airlie fe5770b89e fixup i810/i830 to use drm_core_ioremap instead of drm_ioremap 2007-01-08 11:46:54 +11:00
Dave Airlie bc4c835731 remove do munmap 4 args 2006-12-19 21:51:30 +11:00
Dave Airlie 3586ecd060 fix const pointer warnings with file_operations 2006-08-28 11:27:13 +10:00
Dave Airlie 27c72b67ec drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:

*(u32 *) ((u32) buf_priv->kernel_virtual + used)

I've also fixed a missing PTR_ERR in i830_dma.c

From: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-08-28 11:26:57 +10:00
Dave Airlie a25667894a make some functions static from the kernel 2006-02-18 05:43:19 +00:00
Dave Airlie 4791dc8856 major realigment of DRM CVS with kernel code, makes integration much easier 2006-02-18 02:53:36 +00:00
Dave Airlie 0d346a07a8 convert ioctl flags to use flags instead of separate ints 2005-09-03 03:27:14 +00:00
Dave Airlie 7af0186f4c add Egberts 32/64 bit patch (its in kernel already...) 2005-08-16 12:51:57 +00:00
Eric Anholt c789ea1521 Rename the driver hooks in the DRM to something a little more
understandable: preinit -> load postinit -> (removed) presetup ->
    firstopen postsetup -> (removed) open_helper -> open prerelease ->
    preclose free_filp_priv -> postclose pretakedown -> lastclose
    postcleanup -> unload release -> reclaim_buffers_locked version ->
    (removed)
postinit and version were replaced with generic code in the Linux DRM
    (drivers now set their version numbers and description in the driver
    structure, like on BSD). postsetup wasn't used at all. Fixes the savage
    hooks for initializing and tearing down mappings at the right times.
    Testing involved at least starting X, running glxgears, killing
    glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)
2005-08-05 03:50:23 +00:00
Jon Smirl ea2c7a895d Split the control of master vs root priv. Everything is still marked as
needing root.
2005-08-04 13:15:27 +00:00
Alan Hourihane 53e950b344 Force AGP always for Intel chipsets.
Fixes bug #3552
2005-06-16 19:58:00 +00:00
Dave Airlie 8d4c731aa1 make more functions static in i810 and fix pageflip cleanup 2005-02-01 10:18:27 +00:00
Dave Airlie fe4ade81bb i810/i830 bug with Jon's file operations changes 2005-01-01 12:07:51 +00:00
Dave Airlie f0a86288fa patch from bug 1803 - will try and push to kernel soon 2004-11-11 11:09:11 +00:00
Felix Kuehling 5128542814 Allow drivers to override reclaim_buffers in an OS-independent way by
passing drm_device_t* as first parameter, like in the BSD version.
2004-10-31 15:16:44 +00:00
Dave Airlie 182a0e5dac fix pfn vs page for older kernels (2.6.9-rc kernels many not work..) 2004-10-23 06:59:15 +00:00
Jon Smirl ad87dd8427 Bring in patch from kernel for remap_pfn_range 2004-10-22 16:03:21 +00:00
Jon Smirl ad70dc676e Breakout heads into their own data structures. 2004-10-12 03:59:17 +00:00
Jon Smirl 9f9a8f1382 Lindent of core build. Drivers checked for no binary diffs. A few files
weren't Lindent's because their comments didn't convert very well. A
    bunch of other minor clean up with no code implact included.
2004-09-30 21:12:10 +00:00
Jon Smirl 3aef3841d0 Make fops per driver instead of global, remove default flush, poll, read
functions
2004-09-30 18:13:33 +00:00
Jon Smirl fa6b1d129e First check in for DRM that splits core from personality modules 2004-09-27 19:51:38 +00:00
Jon Smirl c158a36c4c 1) switches from class_sysfs to drm sysfs implementation to allow
customization
2) compiles again on 2.4, but doesn't work
2004-09-23 05:39:15 +00:00
Dave Airlie 5654880eee remove HAVE_COUNTERS 2004-09-20 11:29:16 +00:00
Dave Airlie eeae6a0a38 merge back bunch of whitespace and misc changes from kernel 2004-09-05 10:54:59 +00:00
Dave Airlie da6b448497 implement drm_core_check_feature and use it .. looks lots nicer 2004-08-30 11:34:51 +00:00
Dave Airlie 019fd38a3c __NO_VERSION__ hasn't been needed since 2.3 days ditch it... 2004-08-27 09:11:07 +00:00
Dave Airlie d4dbf45781 Merged drmfntbl-0-0-2 2004-08-24 11:15:53 +00:00
Dave Airlie 5c9ed83094 Merged drmfntbl-0-0-1 2004-08-17 13:10:05 +00:00
Dave Airlie dc4508c338 athe patch below optimises the drm code to not do put_user() on memory the
kernel allocated and then mmap-installed to userspace, but instead
    makes it use the kernel virtual address directly instead.
From: Arjan van de Ven <arjanv@redhat.com>
2004-07-31 07:25:58 +00:00
Dave Airlie 02df04d71d sync up with current 2.6 kernel bk tree - mostly __user annotations 2004-07-25 08:47:38 +00:00
Dave Airlie fdb6ae31cb fix some more NULLs from kernel 2004-07-20 11:22:26 +00:00
Dave Airlie 2d9bbba0e1 bug from Linux kernel list caught by checker 2004-04-21 12:18:42 +00:00
Dave Airlie e375a3dc10 patch from Andrew Morton tree from Arjan van de Ven fixes some oopses seen
with 4G/4G split
2004-04-10 08:15:48 +00:00
Dave Airlie c47597b484 big whitespace .. this aligns all the whitespace in this file with the bk
checkout linux tree
2004-04-08 14:15:36 +00:00
Eric Anholt 66c9e3053f - Tie the DRM to a specific device: setunique no longer succeeds when given
a busid that doesn't correspond to the device the DRM is attached to.
    This is a breaking of backwards-compatibility only for the
    multiple-DRI-head case with X Servers that don't use interface 1.1.
- Move irq_busid to drm_irq.h and make it only return the IRQ for the
    current device. Retains compatibility with previous X Servers, cleans
    up unnecessary code. This means no irq_busid on !__HAVE_IRQ, but can be
    changed if necessary.
- Bump interface version to 1.2. This version when set signifies that the
    control ioctl should ignore the irq number passed in and enable the
    interrupt handler for the attached device. Otherwise it errors out when
    the passed-in irq is not equal to the device's.
- Store the highest version the interface has been set to in the device.
- Fix a recursion on DRM_LOCK in irq_uninstall on FreeBSD. This leaves
    irq_uninstall being done without the lock in some cases, but it was
    racey anyways.
2003-11-05 08:13:52 +00:00
Eric Anholt 2950f9e682 - Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle them
from __HAVE_DMA. This will be useful for adding vblank sync support to
    sis and tdfx. Rename dma_service to irq_handler, which is more
    accurately what it is.
- Fix the #if _HAVE_DMA_IRQ in radeon, r128, mga, i810, i830, gamma to have
    the right number of underscores. This may have been a problem in the
    case that the server died without doing its DRM_IOCTL_CONTROL to
    uninit.
2003-10-17 05:13:48 +00:00
Eric Anholt 28aee7fb1c Whitespace cleanup (spaces before tabs or instead of tabs). 2003-09-25 23:04:10 +00:00