Commit Graph

60 Commits (125f3ff36796c8d28c29e960247fdd42d4cd877c)

Author SHA1 Message Date
Tilman Sauerbeck a8909a0ebc Bug #1746: Set dev_priv_size for the MGA driver. 2006-10-20 17:05:07 +02:00
Dave Airlie 1bab514c0a remove config.h from build no longer exists kbuild does it 2006-10-14 23:38:20 +10:00
Dave Airlie 6bb92ab086 fix issue in mga from kernel 2006-03-19 07:53:46 +00:00
Dave Airlie 9a91674d45 cleanup ioctl/max_ioctl to use header file for extern symbols 2005-11-11 07:45:46 +00:00
Ian Romanick 308b40ea09 The Linux 2.6.9 (and earlier) fops structure does not contain a
.compat_ioctl field. This change makes the DRM build on those kernels.
Signed-off-by: Ian Romanick <idr@us.ibm.com>
2005-10-11 17:34:49 +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
Dave Airlie 964c57e71f add mga and r128 32/64 bits
This is Egberts code, ported to Pauls framework by me..
2005-06-29 11:22:39 +00:00
Ian Romanick 72cfc797b5 Adds support for PCI cards to MGA DRM
This patch adds serveral new ioctls and a new query to get_param query to
    support PCI MGA cards.
Two ioctls were added to implement interrupt based waiting. With this
    change, the client-side driver no longer needs to map the primary DMA
    region or the MMIO region. Previously, end-of-frame waiting was done by
    busy waiting in the client-side driver until one of the MMIO registers
    (the current DMA pointer) matched a pointer to the end of primary DMA
    space. By using interrupts, the busy waiting and the extra mappings are
    removed.
A third ioctl was added to bootstrap DMA. This ioctl, which is used by the
    X-server, moves a *LOT* of code from the X-server into the kernel. This
    allows the kernel to do whatever needs to be done to setup DMA buffers.
    The entire process and the locations of the buffers are hidden from
    user-mode.
Additionally, a get_param query was added to differentiate between G4x0
    cards and G550 cards. A gap was left in the numbering sequence so that,
    if needed, G450 cards could be distinguished from G400 cards. According
    to Ville Syrjälä, the G4x0 cards and the G550 cards handle
    anisotropic filtering differently. This seems the most compatible way
    to let the client-side driver know which card it's own. Doing this very
    small change now eliminates the need to bump the DRM minor version
    twice.
http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2
A number of ioctl handlers in linux-core were also modified so that they
    could be called in-kernel. In these cases, the in-kernel callable
    version kept the existing name (e.g., drm_agp_acquire) and the ioctl
    handler added _ioctl to the name (e.g., drm_agp_acquire_ioctl).
This patch also replaces the drm_agp_do_release function with
    drm_agp_release. drm_agp_release (drm_core_agp_release in the previous
    patch) is very similar to drm_agp_do_release, and I saw no reason to
    have both.
This commit *breaks the build* on BSD. Eric said that he would make the
    required updates to the BSD side soon.
Xorg bug: 3259 Reviewed by: Eric Anholt
2005-06-14 22:34:11 +00:00
Ian Romanick dfc650bd80 Completely re-initialize DMA settings
There were two problems. First, the 'warp' and 'primary' pointers weren't
    cleared, so mga_do_cleanup_dma, which gets called multiple times, would
    try to ioremapfree them multiple times. This resulted in the new error
    messages to syslog. The second problem was the, since the dev_private
    structure isn't reallocated and cleaned out in mga_do_init_dma, when
    the server is reloaded idle-waits would wait for impossible values.
I have given this patch some more riggorous testing. This includes:
- Load module, start server, run GL app, stop server, unload module.
- Load module, start server, run GL app, stop server, unload module, reload
    module, restart server, run GL app.
- Load module, start server, run GL app, stop server, restart server, run
    GL app, stop server, unload module.
In all three cases, everything worked as expected. Please let me know if
    there are any further regressions with this patch.
Xorg bug: 3408 Reported by: Chris Rankin
2005-06-09 21:18:56 +00:00
Ian Romanick 4a84416c45 Modify drm_driver::device_is_agp to return a tri-state value to indicate
that a device absolutely is, absolutely is not, or may or may not be
    AGP. Modify the i915 DRM to use this to force all i9x5 devices to be
    "AGP" (even the PCI-e devices).
Reported by: Lukas Hejtmanek
2005-05-27 23:42:11 +00:00
Ian Romanick a686be5bc8 Change the MGA initialization and cleanup a bit. The dev_private structure
is now allocated (and partially filled in) by the new
    mga_driver_preinit function.
This allows the driver to detect the type of card (i.e., G200 class vs.
    G400 class) on its own. The chipset value passed to mga_dma_init is now
    ignored. This same technique is used by the radeon DRM.
As a result of this, mga_driver_pretakedown was converted to
    mga_driver_postcleanup. This routine gets called in some other places
    than might be expected, and it sets the dev_private pointer to NULL.
    That little gem took over an hour to track down. :(
2005-05-21 02:27:51 +00:00
Ian Romanick e051cd19c0 Added device_is_agp callback to drm_driver. This function is called by the
platform-specific drm_device_is_agp function. Added implementation of
    this function the the Linux-specific portion of the MGA driver to
    detect PCI G450 cards. Added code to the Linux-specific portion of the
    generic DRM layer to not initialize AGP infrastructure if the card is
    not AGP (this matches what already existed in BSD).
Bumped the driver date and the driver patch-level for MGA.
This mostly fixes bugzilla #3248. The BSD side still needs an
    implementation of mga_driver_device_is_agp.
2005-05-16 17:37:10 +00:00
Jon Smirl 4b4df875b2 Fix more build problems on linux-core 2004-11-09 16:58:02 +00:00
Eric Anholt cb5aaa8987 Convert more drivers for bsd-core, moving the ioctl definitions to shared
code. Remove the "drv" from sisdrv, as it's unnecessary. Use the
    drm_pci functions in i915 instead of per-os implementations of the
    same. Avoid whitespace within fields in drm_pciids.txt (one of the r300
    definitions), since it breaks the bsd pciids script. Tested on sis,
    mga, r128. i915 needs more work.
2004-11-06 23:02:07 +00:00
Jon Smirl 5e8838fd11 Add a poll function that alternates between zero and normal poll return to
bring DRM into conformance with normal poll().
2004-10-13 16:40:53 +00:00
Jon Smirl ad70dc676e Breakout heads into their own data structures. 2004-10-12 03:59:17 +00:00
Jon Smirl ad549c5ae6 Rename fn_tbl to driver. Core driver now uses pci_driver name which
reflects the personality name.
2004-10-10 22:54:55 +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 d4dbf45781 Merged drmfntbl-0-0-2 2004-08-24 11:15:53 +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
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
Jose Fonseca 6611a5fb7f Split declarations/definitions in drm_scatter.h into drm_sg.h/drm_sg_tmp.h
respectively. Splited the work out of the ioctls and renamed (with the
    _ioctl prefix). Added some more documentation. Did the same for
    drm_sgpsupport.h.
2003-06-03 23:27:01 +00:00
Alan Hourihane 74ef13fd00 merged bsd-3-0-0-branch 2002-07-05 08:31:11 +00:00
Jens Owen 3903e5ac94 Merged drmcommand-0-0-1 2002-04-09 21:54:56 +00:00
Jeff Hartmann 84a5e71087 Fixes that allow the modules to be built into the kernel 2001-07-23 20:25:38 +00:00
Jeff Hartmann 4eafeec960 Add module version name at a lower layer of the code, allows things to be
more flexible and allow older module versions to still work. Might not
    be final code if we move over to DRI kernel module version, but will be
    if we use XFree86 version. + Only build tdfx.o instead of tdfx-4_1_0.o
    since tdfx.o has never changed its API.
2001-07-18 21:02:58 +00:00
Jeff Hartmann d5749d7603 Added version string to the end of the kernel module name. This allows
multiple versions of the kernel module to co-exist on one machine.
2001-07-16 22:42:36 +00:00
Gareth Hughes 92b0aaa6fe - Fix MGA header info.
- Update date strings.
- Fix MGA hangs (undocumented side effects of DWGSYNC).
- Remove idle before ILOAD??? Seems fine with the above fix.
2001-03-21 13:10:27 +00:00
Gareth Hughes b42ff4f660 Update version, date stamp. 2001-03-19 12:16:24 +00:00
Gareth Hughes 01a14789ed - Clean up the way customization of the templates is done.
- Fix old-style DMA for gamma driver (please test).
- Pull out IRQ handling into drm_dma.h (please test on i810, gamma).
- Lots of general cleanups, remove compiler warnings etc.
2001-02-16 05:24:06 +00:00
Gareth Hughes f2f5bf6f5f - Fix up merge.
- Update date stamps.
2001-02-15 10:26:03 +00:00
Gareth Hughes 360475376c Merge mga-1-0-0-branch into trunk. 2001-02-15 08:12:14 +00:00
Rik Faith 833af23c5d Sync with Linux 2.4.0-prerelease 2001-01-04 18:41:41 +00:00
Keith Whitwell c7c6156aec add blit ioctl, fix plnwt handling 2000-12-30 23:28:53 +00:00
Rik Faith 679531e166 Sync with Linux 2.4.0-test11-pre5 Provide backward compatibility tested
against 2.2.18pre21
As usual, since all 2.4.0-test* kernels set LINUX_VERSION_CODE to the same
    value, if you are running a 2.4.0-test kernel, you MUST be running
    2.4.0-test11-pre4 or later (although anything after 2.4.0-test11-pre1
    should work fine -- I tested with pre4/pre5). I expect 2.2.x support to
    continue to work for all recent kernels, but I tested with 2.2.18pre21
    -- we use the old intermodule symbol communication for 2.2.x kernels,
    so they should all continue to work.
2000-11-15 15:47:51 +00:00
Rik Faith 39a659e877 Audit calls to schedule() Remove tags from files shared with Linux kernel
tree Remove debugging statements to make debugging more useful Other
    minor cleanups in preparation for sync with Linux 2.4.0-test9-pre7
2000-09-29 01:47:11 +00:00
Jeff Hartmann ed2d0b4bb0 Fixed two things Rik pointed out in the last commit 2000-09-28 15:09:39 +00:00
Jeff Hartmann 550dff98b0 Merged the mga-lock-debug-0-2-0-branch with the trunk. This includes
several fixes including: (Jeff) Really disable multitexture (Broken
    since Mesa 3.4 integration.)
(Jeff) Various changes in mga_state.c in the kernel module, which includes
    a fix to the bug where the first OGL application hangs the machine
    w/out rendering anything. This also includes defines for the warp
    registers so they are easily human readable.
(Rik and Jeff) Fixed all the schedule loops in the kernel to look like they
    are supposed too.
(Jeff) Configurable agp modes: Add the option "AGPMode2x" or "AGPMode4x" to
    your XF86Config file.
(Rik) Various cleanups to the mga kernel driver to make it easier to read
    and debug.
(Rik) Removed alot of DRM_DEBUG statements from the kernel driver.
2000-09-27 21:32:19 +00:00
Alan Hourihane c7558d8fa4 commit xfree86 4.0.1d-pre update 2000-09-24 09:34:10 +00:00
Gareth Hughes bda40b4146 Sync with 2.4.0-test8 kernel. 2000-09-10 04:59:05 +00:00
Gareth Hughes 7db6449142 Sync with 2.4.0-test8-pre5 kernel. 2000-09-06 20:56:34 +00:00
Keith Whitwell e3e2d66131 Bump version number after kernel interface change. 2000-08-31 15:32:10 +00:00
Rik Faith 32cebaf750 Add compatibility header file to make Linux 2.4.0 kernel patches cleaner. 2000-08-28 19:50:52 +00:00
Rik Faith 6f07e1ff6b Sync with Linux 2.4.0-test7 Add signal blocking support to all drivers
(using control-z on a running direct-rendering client should work now)
2000-08-26 10:36:44 +00:00
Rik Faith 8b9363d1b1 Sync with Linux 2.4.0-test6-pre8 2000-08-08 16:04:21 +00:00
Rik Faith f3ae6786f8 Sync with Linux 2.4.0-test6-pre2 2000-08-04 10:04:55 +00:00
Rik Faith b4722ec943 More fixups for kernel build: EXPORT_SYMTAB warning removal
put_module_symbol clean up of tdfx tdfx_cleanup routine Makefile.kernel
    fix
2000-07-20 05:17:49 +00:00