Commit Graph

230 Commits (e34b5601912ce4b611d429304d5271fcf6f9f457)

Author SHA1 Message Date
Jon Smirl 03c2e674e4 Add chip family names to the radeon driver 2004-09-14 03:59:25 +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
Jon Smirl e6d468ad7f More general patch to mark resources in use by all DRM drivers. Makes the
code Linux specific.
2004-09-10 16:44:28 +00:00
Jose Fonseca 1fb27632c3 Update doxygen configuration file. Minor documentation updates/fixes. 2004-09-08 20:57:39 +00:00
Thomas Hellstrom b0c73b7fcb Added IOCTL for writing 2D DMA command buffers over PCI. Bumped minor
version number.
2004-09-07 16:48:44 +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 7809efc8c3 drm-memory patch, cleans up alloc/free and makes calloc look more libc like 2004-08-30 09:01:50 +00:00
Erdi Chen 08de6e5b04 Fix copy_from_user return value ignored warning at via_dma.c:168. 2004-08-30 04:58:24 +00:00
Dave Airlie 73e606753f run i915 through lindent 2004-08-27 09:14:30 +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
Jon Smirl e068fcbfdd Rearrange things so that via_dma.c will compile with inline via_check_dma 2004-08-26 03:54:01 +00:00
Dave Airlie d4dbf45781 Merged drmfntbl-0-0-2 2004-08-24 11:15:53 +00:00
Erdi Chen 25e319c1ef This patch adds three new ioctl's to the VIA Unichrome/Pro DRM driver:
DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER DRM_IOCTL_VIA_FLUSH
The first ioctl sets up an area in AGP memory that will be used as the ring
    buffer. The second ioctl copies a command buffer from user space memory
    to the ring buffer. The third ioctl waits for engine idle until it
    returns.
The motivation for this patch is to avoid the wait for engine idle call
    before each buffer flush in the current DRI driver. With this patch,
    the DRI driver can continue to flush its buffer as long as there is
    free space in the ring buffer.
This patch adds an additional copy operation on the command buffer. This
    buffer copying is necessary to support multiple DRI clients rendering
    simultaneously. Otherwise, more CPU time will be spent in the busy loop
    waiting for engine idle between DRI context switch. Even in the single
    client case, the tradeoff is reasonable in comparision to the kernel
    call to check for free buffer space for the client to render directly
    to the ring buffer.
2004-08-24 01:44:37 +00:00
Dave Airlie 7fe4f60768 set pointers to NULL after freeing, remove some extra debugging 2004-08-23 10:05:01 +00:00
Dave Airlie 5c9ed83094 Merged drmfntbl-0-0-1 2004-08-17 13:10:05 +00:00
Dave Airlie 93e8c201af preparation patch for radeon permanent mapping registers/framebuffer makes
dev_priv live always, and add AGP detection in kernel patch:
    radeon-pre-2.patch From: Jon Smirl
2004-08-17 11:24:50 +00:00
Eric Anholt dd83f39f03 Add a "dev" argument to DRIVER_CTX_[CD]TOR. This will be used in an
upcoming commit for the SiS driver.
2004-08-14 00:46:15 +00:00
Eric Anholt 211c37e250 Fix apparent copy'n'paste-o of the card attributes commit that broke the
FreeBSD build.
2004-08-13 23:32:39 +00:00
Dave Airlie 9277f9eef3 Patch from Jon Smirl to add attribute field to the pciids, and use this for
certain radeon combinations - intel drivers can probably use this for
    dual head capable devices etc..
2004-08-10 11:14:07 +00:00
Dave Airlie 33b740ad99 forgot to check these in.. thanks to Jon for reminding me .. 2004-08-02 11:45:23 +00:00
Dave Airlie bd71ba6428 patch from RH xorg-x11 tree ported to drm.h 2004-07-31 08:38:39 +00:00
Dave Airlie eb3d0635d4 fixes for using userspace pointers found by sparse utility
From: Dave Airlie
2004-07-31 07:26:52 +00:00
Dave Airlie 0b02bf9d45 initial port of i915 to BSD, not finished doesn't work.. no idea why... 2004-07-29 11:09:22 +00:00
Dave Airlie 862fcee057 check for __user if not there define it 2004-07-25 08:57:15 +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
Keith Whitwell 1e5354e867 Correct a couple of packet length calculations. 2004-07-23 16:12:27 +00:00
Dave Airlie b35cba47d5 Add NULLs instead of 0 for i915 2004-07-20 11:48:25 +00:00
Dave Airlie 8efddd01e8 sparse cleanups from kernel: Al Viro 2004-07-15 13:03:55 +00:00
Dave Airlie 4cfd0d5cee whitespace align with kernel 2004-07-05 11:44:30 +00:00
Keith Whitwell 291ffeae9a i915.o drm driver 2004-06-10 12:45:38 +00:00
Ian Romanick 52e3a8a5d9 Added some comments copied from xf86drm.h. 2004-06-02 17:41:52 +00:00
Ian Romanick f994b1f31b Replace size_t with an ugly, ugly hack. This was done so that code in the
core X-server would compile. Hopefully, this will soon be replaced with
    explicitly sized types (i.e., uint32_t) and everyone will be happy.
2004-06-01 16:17:32 +00:00
Roland Scheidegger 43c244ebba fix whitespace issue in previous patch 2004-05-18 23:30:46 +00:00
Roland Scheidegger aa142ff1b5 add R200_EMIT_RB3D_BLENDCOLOR state packet to support GL_EXT_blend_color,
GL_EXT_blend_func_separate and GL_EXT_blend_equation_separate on r200
2004-05-18 23:03:22 +00:00
Erdi Chen 13894755a7 Add PCI id entry for VIA CN400 (UnichromePro) chip. XFree86 bug: Reported
by: Submitted by: Reviewed by: Obtained from:
2004-05-14 23:54:31 +00:00
Eric Anholt 853adb8be3 Merge from FreeBSD-current. Mostly 64-bit cleanliness fixes, but a few
driver interface changes from -current.
2004-05-11 04:43:43 +00:00
Eric Anholt 485b259b44 Add missing DRM_ERR()s. 2004-05-11 04:23:02 +00:00
Dave Airlie 06332524b5 add another tdfx 2004-04-26 06:43:53 +00:00
Dave Airlie 0edc2abf84 add new files to generate pci ids 2004-04-21 23:45:18 +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
Thomas Hellstrom 6f6d2a553a 1. Added a PCI ID.
2. Big change to the XvMC part of the SAREA. OpenGL clients will not suffer
    from this, and via XvMC is still alpha. Needed to make future additions
    to XvMC (More decoders and overlays) possible.
3. Bumped version number to 1.3.0.
2004-04-12 10:18:18 +00:00
Dave Airlie 873e1c4d38 Add mach64 to the trunk 2004-04-12 05:27:40 +00:00
Dave Airlie 3306abbde7 white space changes to align with kernel 2004-04-10 13:52:43 +00:00
Alan Hourihane 596cf634ae fix build problem 2004-04-08 23:22:05 +00:00
Dave Airlie bc1428035c fixes from Linux kernel 2004-04-08 12:05:25 +00:00
Thomas Hellstrom 6cd8831f7a Merged via-1-2-0 2004-03-23 21:08:48 +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 213247a441 Fix sisfb header location for 2.6 kernels
Submitted by: Andrew Morton
2004-02-18 20:56:58 +00:00
Michel Daenzer 0dea4de288 Make sure that all state packets are handled in
radeon_check_and_fixup_packets()
Fix state packet IDs of R200 cubic offsets
2004-01-10 20:59:16 +00:00
Michel Daenzer 7b62ed9aed R200_PP_CUBIC_OFFSET_F1_[0-6] state packets only contain 5 offsets, not 6
(thanks to Andreas Stenglein for spotting this)
2004-01-10 12:28:06 +00:00
Eric Anholt 9fb6986e83 Don't ioremap the framebuffer area. The ioremapped area wasn't used by
anything, and took up valuable KVA. While I'm in the area, clean up BSD
    MTRR stuff some more.
Suggested by: jonsmirl
2003-12-16 08:57:08 +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 e8f5b01a40 __linux__ is spelled with a lowercase 'l' 2003-11-05 02:08:31 +00:00
Eric Anholt 5864101ab4 Repo-copy linux/drm/kernel/drm.h to shared/drm/kernel/drm.h and use it on
both Linux and *BSD.
2003-11-05 01:43:47 +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
Michel Daenzer 355b204de0 Introduce COMMIT_RING() as in radeon DRM, stop using error prone writeback
for ring read pointer (Paul Mackerras)
Get rid of some superfluous stuff, minor fixes
2003-10-16 14:18:52 +00:00
Eric Anholt a64dab1323 Try that again. It's a long. 2003-10-16 03:20:03 +00:00
Eric Anholt a9e1a57d6d Debug printf format fix. 2003-10-16 03:19:06 +00:00
Alan Hourihane 85c16d962d resolve merge conflicts 2003-09-12 14:24:17 +00:00
Eric Anholt 4d6d357202 Correct format in debug printfs (free is a pointer, not an int). 2003-09-07 23:56:20 +00:00
Eric Anholt fabc64dd57 Port the SiS DRM to FreeBSD. This includes the ability for the DRM to
allocate framebuffer memory without sisfb, and a new ioctl to be used
    by the X Server which tells the DRM what region of framebuffer memory
    to allocate from. Also fixes a possibility to panic the kernel I
    believe. Tested on linux with sisfb and FreeBSD (without sisfb) with
    new DRI only.
2003-08-29 19:24:36 +00:00
Michel Daenzer 062751ac47 Remove artificial PCI GART limitations, rename AGP to GART where
appropriate
2003-08-26 15:44:01 +00:00
Michel Daenzer 07a9b30082 Clean up Radeon DRI resume code 2003-08-18 23:46:19 +00:00
Eric Anholt 0f094c33da Make r128_do_wait_for_idle static, as it's only used in this file.
Noticed by: CScout
2003-08-18 23:42:16 +00:00
Eric Anholt 6298d1a1e0 Remove an unnecessary #define __NO_VERSION__
Noticed by: CScout
2003-08-18 23:41:05 +00:00
Eric Anholt 03e6674c13 Whitespace cleanup from the pageflipping commit. 2003-08-12 21:48:16 +00:00
Ian Romanick c99acb597f Added some information as to when (which DRM version) various queries were
added.
2003-08-08 21:06:44 +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 c26ffeafca Degrade uninformative error message to debug message, as in other drivers 2003-07-26 15:59:09 +00:00
Eric Anholt aaf2105be9 Add Rage 128 pageflipping support, defaults to off. DRM version bump to
2.5.0. It still has some issues, including a flicker in the fps meter
    in tuxracer and I've seen garbage left behind after moving/closing
    windows. However, it's usable. Add the Option "EnablePageFlip" "YES" to
    use it.
2003-07-26 03:25:40 +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
Keith Whitwell 9e7d6177d1 Possibly fix stanford checker complaints about sarea 2003-06-16 10:40:52 +00:00
Keith Whitwell 0b01c70d59 Texture rectangle support for r100 2003-06-10 18:54:17 +00:00
Keith Whitwell 98840144b1 Revert bogus last commit 2003-06-09 23:12:33 +00:00
Keith Whitwell 1062b9930f Don't activate blend fallbacks unless blending is enabled 2003-06-09 23:11:23 +00:00
Leif Delgass 518db771de Restore change to _DRM_VBLANK_SIGNAL from rev. 1.41, which was reverted
with the documentation merge.
2003-05-28 02:03:37 +00:00
Jose Fonseca d2443b2186 Merged DRM documentation. 2003-05-27 00:37:33 +00:00
Leif Delgass aeb4bc3f5b Add support to r128 for MESA_ycbcr_texture (Ian Romanick, Leif Delgass) 2003-05-26 20:04:53 +00:00
David Dawes c0efa1a777 DRM part of Radeon DRI suspend/resume support (Charl Botha). 2003-05-20 22:43:39 +00:00
David Dawes 2134577e31 Support for building DRM module on OpenBSD (Wilbern Cobb, Matthieu Herrb).
(resync with XFree86 trunk)
2003-05-20 22:42:24 +00:00
Michel Daenzer e5d3c7f260 Support AGP bridges where the AGP aperture can't be accessed directly by
the CPU (David Mosberger, Benjamin Herrenschmidt, myself, Paul
    Mackerras, Jeff Wiedemeier)
2003-05-16 23:41:27 +00:00
Michel Daenzer 1d5bf7a7de fix warning on machines where sizeof(drm_addr_t) != 4 (Randy Dunlap) 2003-05-06 21:10:33 +00:00
Ian Romanick 285b1cdc39 Merged texmem-0-0-1 2003-04-30 01:51:00 +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
Leif Delgass f2a0c5438d Ensure driver has been initialized (dev_private != NULL) before installing
irq handler in DRM(irq_install). Modify all drivers to ensure irq
    handler is removed before cleanup and cleanup is called at takedown.
    Remove unused buffer private struct fields in i810, i830. Check for
    lock on init/cleanup in all drivers except i810/i830. The current DDX
    for i810 and i830 doesn't hold the lock on kernel init (FIXME?).
2003-04-26 22:28:56 +00:00
Michel Daenzer d5db1144dd get rid of superfluous fields in struct drm_radeon_ring_buffer
use correct address for ring read pointer writeback (yes, we seem to have
    been running with bogus values for the ring read pointer, which
    'worked' because the return value of radeon_wait_ring() is never
    checked and the ring usually never fills up)
2003-04-22 21:45:06 +00:00
Leif Delgass 5ee61c18f4 Remove AGP dependency in kernel config for radeon, sis. Remove
PCIGART_ENABLED define for radeon, pcigart support now included for any
    arch.
2003-04-22 21:30:24 +00:00
Keith Whitwell 13211ad82c add more get_param queries for embedded project 2003-04-22 09:49:14 +00:00
Leif Delgass 46e06192a8 Check for NULL map before calling DRM(ioremapfree) on cleanup. Prevents an
oops if a map wasn't found (e.g. XFree86 Bugzilla #108)
2003-04-21 16:07:17 +00:00
Eric Anholt e27d2f8c7c buf->filp is a pointer, so make printf format args be %p not %d 2003-03-29 03:30:21 +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
Michel Daenzer fac2ed4d10 fix EAGAIN handling in radeon_cp_dispatch_texture() (fixes corruption of
large textures), and get rid of superfluous local y variable
2003-02-06 18:20:00 +00:00
Michel Daenzer 73bf29a6c1 fix PCI and AGP posting problems (based on testing by Chris Ison and
suggestions by Benjamin Herrenschmidt and Arjan van de Ven)
remove radeon_flush_write_combine() which has been unused for a while
2003-02-04 19:20:18 +00:00
Michel Daenzer f13af50838 only acknowledge interrupts we handle - others could be used outside the
DRM
2003-02-04 15:56:37 +00:00