Commit Graph

126 Commits (354dd17d2505fd3b9754f6ccc960671e1f9363d9)

Author SHA1 Message Date
Dave Airlie 354dd17d25 The patch makes drmAddBufs/drmMapBufs can handle buffers in video memory
The attached patch adds a new buffer type DRM_FB_BUFFER. It works like AGP
    memory but uses video memory.
From: austinyuan@viatech.com.cn (fd.o bug 1668) Signed-off-by: Dave Airlie
    <airlied@linux.ie>
2005-01-16 05:40:12 +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 e09229d6c8 remove unused dma remnants that were gamma only - these could cause an oops
on via
2004-10-09 10:58:19 +00:00
Jon Smirl 36a257cfe9 Remove 2.6 code that allow DRM major device number to be shared. We can add
it back later if needed. Checked DRM on both 2.4 and
2.6 to ensure that it builds and runs.
2004-09-23 17:22:27 +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
Jon Smirl 27fc998f7d Remove hotplug reset support from DRM driver. This will be handled by the
VGA driver when it gets written.
2004-09-22 19:13:02 +00:00
Jon Smirl c7c9d3ef7b Let's try adding the dyn-minor patch again. This patch will reuse minor
numbers if a card is hotplugged in/out instead of just having them
    increase.
2004-09-16 18:42:03 +00:00
Jon Smirl eeb0ef1a70 Back dyn-minor patch out for now. fops handling is broken on some cards 2004-09-15 17:44:30 +00:00
Jon Smirl 64ef12c55c Dynamic device minor support. Minor device numbers will be reused if the
device is hotplugged in/out of the system
2004-09-15 00:20:21 +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 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 da6b448497 implement drm_core_check_feature and use it .. looks lots nicer 2004-08-30 11:34:51 +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 1430163b4b Drop GAMMA DRM from a great height ... 2004-08-29 12:04:35 +00:00
Dave Airlie d4dbf45781 Merged drmfntbl-0-0-2 2004-08-24 11:15:53 +00:00
Dave Airlie eac498baea addmap-base-2 patch from Jon Smirl:
sets up the DRM to have the ability to have permanent maps while the driver
    is loaded...
2004-08-24 10:43:45 +00:00
Dave Airlie 5c9ed83094 Merged drmfntbl-0-0-1 2004-08-17 13:10:05 +00:00
Dave Airlie ecf1458b2c minor patch from Jon Smirl : sets up some things for later use 2004-08-11 09:07:36 +00:00
Dave Airlie be3e54bc15 2.4 hotplug compat 2004-08-04 10:53:21 +00:00
Dave Airlie 4f8f02a192 fix for drm in /proc - from Jon Smirl 2004-08-03 09:21:11 +00:00
Jon Smirl 5e7e41819e Add a hotplug event to DRM. Parameters match the ones from the general PCI
hotplug event plus the addition of one requesting RESET. Put your
    scripts in /etc/hotplug.d/drm to run. kernel class_simple generates the
    ADD/REMOVE events. No cards currently request RESET, the flag is there
    to stop you from resetting your boot display.
2004-07-31 15:45:00 +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 a776c5ec04 first set of __user annotations from kernel (Al Viro) 2004-07-20 12:43:12 +00:00
Dave Airlie 6c16cbd404 split out backwards compat into a separate file makes it easier for merging
to 2.6
2004-07-11 10:17:34 +00:00
Dave Airlie f9e2fe8470 fix issue in 2.4 kernels with returning NULL from this function 2004-07-11 09:58:49 +00:00
Dave Airlie 024fd4b150 2.4 compat 2004-05-30 23:38:08 +00:00
Dave Airlie 8350382cb1 another 2.4 fix 2004-05-18 09:46:31 +00:00
Dave Airlie df6c37fc88 2.4 compat fix 2004-05-18 09:42:22 +00:00
Dave Airlie a2f7a9fa5f Commit sysfs and drm PCI changes for 2.6 kernel 2004-05-09 06:45:17 +00:00
Dave Airlie a9d2438999 fix 2.4 build 2004-05-02 13:03:51 +00:00
Dave Airlie d40443534c Add __user annotations from kernel 2004-04-22 12:41:43 +00:00
Dave Airlie 93bd67ef62 centralise pci ids into one place and use scripts to generate files for
kernel
2004-04-21 12:13:31 +00:00
Dave Airlie 873e1c4d38 Add mach64 to the trunk 2004-04-12 05:27:40 +00:00
Dave Airlie 13724f032e 2.6 sysfs patches + stubs in drmP.h for 2.4 compatibility 2004-04-08 13:11:04 +00:00
Dave Airlie 3e0f3c1fbb more 2.4 compat fns 2004-04-08 12:20:39 +00:00
Jon Smirl 24115068e4 Fixes need to clean up the mess I made with the mesa merge. This code
allows the mesa drivers to use a single definition of the DRM
    sarea/IOCTLS located in the drm driver directory. Adjustments were made
    to the 2D drivers to not include these changes. Changes to the mesa
    copy of DRM were copied to the DRI copy. XFree86 bug: Reported by:
    Submitted by: Reviewed by: Obtained from:
2004-03-12 21:22:52 +00:00
Michel Daenzer f47ed99143 Remove extraneous code accidentally added with revision 1.86 2004-02-28 14:29:44 +00:00
Felix Kuehling d0031f22cf Conditionally add definition of list_for_each_entry_safe for kernel
versions that don't have it.
2004-02-21 19:54:51 +00:00
Keith Whitwell 82157579b5 drm_ctx_dtor.patch Submitted by: Erdi Chen 2004-02-20 22:55:12 +00:00
Michel Daenzer 2b9c12ef83 Adapt to nopage() prototype change in Linux 2.6.1.
Reviewed by: Arjan van de Ven <arjanv@redhat.com>, additional feedback from
    William Lee Irwin III and Linus Torvalds.
2004-01-11 00:14:28 +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
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 06cb132e86 - Introduce a new ioctl, DRM_IOCTL_SET_VERSION. This ioctl allows the
server or client to notify the DRM that it expects a certain version of
    the device dependent or device independent interface. If the major
    doesn't match or minor is too large, EINVAL is returned. A major of -1
    means that the requestor doesn't care about that portion of the
    interface. The ioctl returns the actual versions in the same struct.
- Introduce DRM DI interface version 1.1. If the server requests version
    1.1, then the DRM sets the unique itself according to the busid of the
    device it probed, which may then be accessed as normal using getunique.
- Request version 1.1 in libdrm's drmOpenByBusID, allowing the X Server to
    request based on a BusID. Introduce a wrapper for DRM_IOCTL_SET_VERSION
    and bump libdrm minor version.
- Pass the busid in DRIScreenInit if libdrm can handle both a busid and
    name. This allows drmOpenByBusID to be used to find the DRM instead of
    just the driver name, which allows us in the future to tie a DRM more
    strongly to the device it probed to. Introduce a function
    DRICreatePCIBusID which creates a busid in the form pci:oooo:bb:dd.f
    similar to linux's pci_name() function. This matches the format used by
    the DRM in version 1.1. libdrm knows how to match both this format and
    the old PCI🅱️d:f format.
- Use the new DRICreatePCIBusID function in the *_dri.c to request the new,
    more exact busid format.
2003-10-23 02:23:31 +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 ff58476011 - Converted Linux drivers to initialize DRM instances based on PCI IDs, not
just a single instance. Moved the PCI ID lists from <card>_drv.c in BSD
    to <card>.h. The PCI ID lists include a driver private field, which may
    be used by drivers for chip family or other information. Based on work
    by jonsmirl.
- Make tdfx_drv.c and tdfx.h match other drivers.
- Fixed up linking of sis shared files.
Tested with Radeon and SiS on Linux and FreeBSD, including a Linux setup
    with
2 SiS cards in a machine, but only one head being used (with DRI)
2003-10-17 03:14:39 +00:00
Eric Anholt a7aebb6dac Add DRM(calloc), which is convenient, used by the new sis code, and takes
advantage of M_ZERO on BSDs.
2003-08-29 19:16:13 +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 39e1c534c0 Don't need to include linux/wrapper.h - we only use Set/ClearPageReserved
from linux/mm.h now and wrapper.h has been removed in 2.5.69 and later.
2003-07-04 18:31:42 +00:00
Jose Fonseca 93522f6d3a Revert the janitorial - that works is now on the new branch
newdrm-0-0-1-branch.
2003-06-19 00:09:52 +00:00