Commit Graph

42 Commits (c1aa08106e0a7190c7a303ec8a9b6b5339251137)

Author SHA1 Message Date
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 4be9554fcd drm: fix typedef in drm_os_linux.h 2007-07-16 11:13:07 +10:00
Dave Airlie 9f9c19065c remove DRM_GETSAREA and replace with drm_getsarea function 2007-04-28 15:07:43 +10:00
Dave Airlie ff4b5ccdb4 remove legacy taskqueue code 2006-12-19 21:30:27 +11:00
Dave Airlie 86ff2aeb9b drm: remove all 2.4 support for drm development tree.
Bye bye 2.4 you served us well..
2006-12-19 20:29:03 +11:00
Dave Airlie 303307d254 fix irq args compatiblity with pre 2.6.19 2006-12-19 18:03:20 +11:00
Dave Airlie 4791dc8856 major realigment of DRM CVS with kernel code, makes integration much easier 2006-02-18 02:53:36 +00:00
Eric Anholt 8c21b783c3 Port the VIA DRM to FreeBSD. Original patch by Jake, with some cleanup by
me to match other drivers and avoid ifdeffing. The linux via_drv.c will
    be moved from shared-core to linux-core soon by repocopy.
Submitted by: Jake Burkholder <jake@FreeBSD.org> Tested by: unichrome
2005-08-15 18:07:12 +00:00
Dave Airlie b0c461c8e3 Revert last commit, it affect via things 2005-04-19 00:31:16 +00:00
Dave Airlie c6161eff86 Description: Rather than use custom code in DRM_WAIT_ON() to do exactly
what wait_event_interruptible_timeout() does, use the function and just
    change the return values appropriately.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
2005-03-27 07:05:28 +00:00
Dave Airlie 2ad8387428 verify_area is deprecated, replaced by access_ok. Seems I missed this one
when I did the big overall conversion.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
2005-03-25 09:47:36 +00:00
Eric Anholt 81459d6e50 Close a race which could allow for privilege escalation by users with DRI
privileges on Radeon hardware. Essentially, a malicious program could
    submit a packet containing an offset (possibly in main memory) to be
    rendered from/to, while a separate thread switched that offset in
    userspace rapidly between a valid value and an invalid one.
    radeon_check_and_fixup_offset() would pull the offset in from user
    space, check it, and spit it back out to user space to be copied in
    later by the emit code. It would sometimes catch the bad value, but
    sometimes the malicious program could modify it after the check and get
    an invalid offset rendered from/to.
Fix this by allocating a temporary buffer and copying the data in at once.
    While here, make the cliprects stuff not do the VERIFYAREA_READ and
    COPY_FROM_USER_UNCHECKED gymnastics, avoiding a lock order reversal on
    FreeBSD. Performance impact is negligible -- no difference on r200 to
    ~1% improvement on rv200 in quake3 tests (P4 1Ghz, demofour at
    1024x768, n=4 or 5).
2005-02-08 04:17:14 +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 c15b1d15ff Fix from: Nishanth Aravamudan replace direct assignment with
__set_current_state()
2004-09-18 16:44:43 +00:00
Jon Smirl 15407efd46 Make the comment match the code 2004-09-12 03:30:30 +00:00
Jon Smirl 36050cc958 Fix DRM to compile cleanly with recent kernel changes in PCI IO and
DRM_COPY_FROM_USER. PCI IO changes in 2.6.9-rc1 bk currently.
2004-09-12 03:23:50 +00:00
Dave Airlie 4499ea42ea Fixup OS_HAS_AGP/OS_HAS_MTRR along lines of patches going to kernel, as
suggested by Arjan..
Signed-off-by: Dave Airlie <airlied@linux.ie>
2004-09-04 23:21:40 +00:00
Dave Airlie 7809efc8c3 drm-memory patch, cleans up alloc/free and makes calloc look more libc like 2004-08-30 09:01:50 +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
Keith Whitwell 373d67702c A few changes for recent redhat. 2004-06-10 12:48:35 +00:00
Michel Daenzer 2655ccddf4 Memory layout transition:
the 2D driver initializes MC_FB_LOCATION and related registers sanely
the DRM deduces the layout from these registers
clients use the new SETPARAM ioctl to tell the DRM where they think the
    framebuffer is located in the card's address space
the DRM uses all this information to check client state and fix it up if
    necessary
This is a prerequisite for things like direct rendering with IGP chips and
    video capturing.
2003-11-04 00:46:05 +00:00
Eric Anholt 86e6325e5a - Add DRM_GET_PRIV_WITH_RETURN macro. This can be used in shared code to
get the drm_file_t * based on the filp passed in ioctl handlers.
- Use this macro on BSD for simplification and improve its error reporting.
    Make failure to find the drm_file_t * print as an error, not debug.
    This failure may be part of the problem with KDE.
- Make debug and error print macros include the pid on BSD.
2003-10-22 22:08:53 +00:00
Michel Daenzer 4b60cae90e IRQ code cleanup suggested by Linus Torvalds
i830 build fix
2003-07-29 10:11:48 +00:00
Michel Daenzer bef7017749 Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break
the i830 driver or the BSDs. :)
2003-07-25 10:50:39 +00:00
Leif Delgass ccf6d6a513 Restore DRM_*MEMORYBARRIER change reverted with documentation merge 2003-05-28 01:44:49 +00:00
Jose Fonseca d2443b2186 Merged DRM documentation. 2003-05-27 00:37:33 +00:00
Leif Delgass 5f1e2399eb Restore Eric Anholt's DRM_*MEMORYBARRIER changes from rev 1.11 2003-04-28 17:49:26 +00:00
Alan Hourihane 6eb5364eb8 DRM_READ/WRITEMEMORYBARRIER was given an argument in the bsd tree, fix for
linux
2003-04-28 15:29:46 +00:00
Eric Anholt 766a1da2e5 Remove the map argument from DRM_*MEMORYBARRIER. Not all of the uses of
DRM_*MEMORYBARRIER we had were related to an MMIO space. This means
    arch-specific code on the BSDs, unfortunately. Also add
    DRM_MEMORYBARRIER() and change the DRM_READMEMORYBARRIER()s that used
    to be read/write barriers to it.
2003-04-26 23:32:00 +00:00
Keith Whitwell f5844cea13 2.5.x sync patch from Linus Torvalds 2003-04-26 21:33:44 +00:00
Leif Delgass 10444e06d4 Use list_entry() to get container struct from struct list_head pointers.
Build fix for RedHat 9 kernel (5 args to remap_page_range()).
2003-04-08 01:30:43 +00:00
Keith Whitwell 1728bc637d merged drm-filp-0-1-branch 2003-03-28 14:27:37 +00:00
Alan Hourihane c14006ba9f XFree86 4.3.0 merge 2003-03-25 00:29:14 +00:00
Keith Whitwell 51e5f73d2a DRM_FREE/2 patch from Philip Brown 2003-03-04 11:41:12 +00:00
Eric Anholt cfa778af9c Merge from bsd-4-0-0-branch. 2003-02-21 23:23:09 +00:00
Brian Paul 2af90a581d replaced max() macro with conditional expression 2002-10-09 16:29:01 +00:00
Keith Whitwell 9243e642da Move os-dependent stuff out of radeon_irq.c 2002-09-29 21:19:01 +00:00
Keith Whitwell f1c8fe9557 merged r200-0-2-branch to trunk 2002-09-23 17:26:43 +00:00
Alan Hourihane 74ef13fd00 merged bsd-3-0-0-branch 2002-07-05 08:31:11 +00:00