Commit Graph

486 Commits (034fc31292edaa25779a938ab3e92ef34697eaf9)

Author SHA1 Message Date
Thomas Hellstrom 6bacb180ce Merge in the drm-sman-branch 2006-06-06 14:19:00 +00:00
Roland Scheidegger f4e6e4499c Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL, and new
packet type for making it possible to address whole tcl vector space
    and have a larger count)
2006-05-24 18:36:24 +00:00
Roland Scheidegger 9e0320a0ad add forgotten register define for previous commit 2006-05-20 09:20:05 +00:00
Roland Scheidegger e1b627c17e Do a tcl state flush before accessing tcl vector space. This fixes some
more problems with flickering (bug #6637). drm may not be appropriate
    place for this, since doing that flush there might both be overkill and
    insufficient in some cases. However, it's hard to figure out when that
    flush is needed, so this has to suffice. There does not seem to be a
    performance penalty associated with it.
2006-05-20 09:08:18 +00:00
Dave Airlie b1a64b8136 add consts to radeon microcode.
From: tilman
2006-05-18 07:32:37 +00:00
Dave Airlie 30a5787d36 Fix from Benh for ppc r300 scratch 2006-04-23 08:07:57 +00:00
Brian Paul 4a49e6c366 check for __FreeBSD_kernel__ (bug 3810) 2006-04-20 14:26:59 +00:00
Eric Anholt 1327222f9b Err, use "ifndef" rather than "if !", to avoid compiler warning. 2006-04-18 06:12:22 +00:00
Eric Anholt 40b70e3244 Use __LP64__ instead of checking the linux-specific BITS_PER_LONG. 2006-04-18 05:57:28 +00:00
Eric Anholt 63c4d02576 Revert a change that accidentally went in with whitespace changes from
Linux, which broke on FreeBSD. DRM_COPY_*_IOCTL checks for the size
    parameter matching the ioctl's command size there, since the copin/out
    happened earlier.
2006-04-09 20:10:32 +00:00
Eric Anholt 6cb366b5a8 Compile fixes for FreeBSD. 2006-04-08 09:45:43 +00:00
Dave Airlie 299aad03c2 coverity bugfix from the kernel 2006-04-05 08:34:24 +00:00
Dave Airlie 985738f203 radeon fix up the PCI ids for new memory map like the kernel one.. not
perfect but should be very safe... align some other kernel bits i810
    align with kernel
2006-03-25 07:16:14 +00:00
Adam Jackson 9c92b55953 Bump driver date to reflect airlied's last fix. 2006-03-20 21:40:54 +00:00
Dave Airlie 8c8f937b3d make some functions static in via driver 2006-03-19 07:52:53 +00:00
Roland Scheidegger 38376c7fa6 Add missing pci ids for new radeons (most but not all are pcie, r420,
rv380, rv410), with the exception of the rs400 igps. Hopefully they no
    longer lock up with new ddx, but no guarantees... (bug #5413)
2006-03-17 01:35:34 +00:00
Dave Airlie ea40d3dd41 Fix bug I reintroduced 2006-03-08 23:01:32 +00:00
Dave Airlie ef835973b2 fix some use before NULL check 2006-03-08 06:03:45 +00:00
Aapo Tahkola 4436ab86d8 ia64 support for r300_scratch. (not tested) 2006-03-07 01:08:35 +00:00
Aapo Tahkola b3fdf9bb7a Add general-purpose packet for manipulating scratch registers (r300) 2006-03-06 20:08:50 +00:00
Roland Scheidegger 06e8bd2a0d Add all radeon pci ids known by ddx, but only r350/rv350 and below (new
chips may be problematic). Leave the existing entries for new chips in
    though. Remove ids not known by ddx (secondary ids, non-existant,...).
    Correct some entries (name/family). Make the radeon family enum look
    more alike the ddx/dri versions. See #5413
2006-02-25 09:51:15 +00:00
Dave Airlie 4c1c05ad96 missed a piece of benh patch 2006-02-19 12:06:27 +00:00
Dave Airlie d75fa645ed fix brace placement 2006-02-18 05:30:03 +00:00
Dave Airlie eb5666b089 clear i915 interrupts sources on server exit 2006-02-18 04:13:36 +00:00
Dave Airlie 7c18b2565e add proper checking for bitblt multi 2006-02-18 03:21:29 +00:00
Dave Airlie 9fad101da9 add benh's memory management patch 2006-02-18 03:04:30 +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
Thomas Hellstrom 659e9a091d via: Change via_drm.h versioning scheme after lenghty discussion on
unichrome-users.
2006-02-17 17:25:41 +00:00
Keith Whitwell 292d4a5b28 Update the hardware breadcrumb in the sarea on irq reception so that
clients can avoid an ioctl waiting on fences that have already been
    received. Would be even better if the hardware did the update itself.
2006-02-09 23:14:16 +00:00
Alan Hourihane 1f0da9daca fix an error message typo Unkown -> Unknown 2006-01-24 21:24:53 +00:00
Alan Hourihane f19c9eecd1 other part of revert 2006-01-24 21:18:41 +00:00
Alan Hourihane 788750fc8c put back some of Dave's code related to vblank support - accidentally
reverted.
2006-01-24 21:16:54 +00:00
Alan Hourihane 270cffbe43 Fix CMDBUFFER path, add heap destroy and flesh out sarea for rotation
(Tungsten Graphics)
2006-01-23 10:05:22 +00:00
Aapo Tahkola 9a01593f1a Add support for texture cache flushes (R300_TX_CNTL) 2006-01-20 21:45:28 +00:00
Aapo Tahkola 534bfb3742 Sync from r300_reg.h from Mesa. 2006-01-20 21:30:07 +00:00
Alan Hourihane e9732865b7 add Intel i945GM support 2006-01-19 14:14:06 +00:00
Thomas Hellstrom d394c9fa08 via: direction bug in get_user_pages call in via_dmablit.c fixed. Bumped
minor since this causes the via DDX to fail with vlc video player.
2006-01-12 19:08:16 +00:00
Thomas Hellstrom 2e0c281d1a via: Version via_drm.h Alter the drm_via_dmablit_t IOCTL arg. 2006-01-06 11:57:40 +00:00
Thomas Hellstrom a019c10c30 via: Last commit really required a bump of minor. Fix. 2006-01-06 11:52:01 +00:00
Thomas Hellstrom 661004544c via: Combine PCI DMA transfers with stride==width (Idea from Luc
Verhaegen). A somewhat saner PCI DMA transfer size check. Fix some
    typos. Bump patchlevel.
2006-01-06 11:19:06 +00:00
Dave Airlie 2a9dbb2895 make max minor more rational 2006-01-02 05:55:31 +00:00
Dave Airlie bbcba83ef7 The radeon DRM wasn't passing sparse checking in the kernel, this fixes it
by adding a new kernel internal cmd buffer type, that has no userspace
    members, and passes it around.
2006-01-02 05:39:19 +00:00
Dave Airlie 1ad5dfc369 whitespace cleanup/aligment with kernel 2006-01-02 05:22:50 +00:00
Dave Airlie b2be72c444 some fixes from linux kernel 2006-01-02 03:44:23 +00:00
Dave Airlie fb91c500bf complete fix for historic attribution 2006-01-02 03:32:03 +00:00
Dave Airlie 1d86c36655 complete fix for attribution 2006-01-02 03:30:57 +00:00
Dave Airlie 42cd50fa90 Realign via driver with changes in Linux kernel (mainly whitespace) 2006-01-02 03:25:49 +00:00
Dave Airlie 780e90e4a2 add radeon card type get param so userspace can avoid walking PCI 2005-12-29 00:17:51 +00:00
Dave Airlie b14d15ac41 Add vblank support to i915 DRM.. 2005-12-28 23:49:59 +00:00
Dave Airlie 4c988520a8 step back one reported bugs against that patch 2005-12-28 22:36:51 +00:00
Dave Airlie 274fdf482b fix radeon memory mapping from Ben Herrenschmidt 2005-12-16 08:02:17 +00:00
Dave Airlie e7b0176584 Lindent some via files 2005-12-16 07:59:13 +00:00
Dave Airlie 0b4fdc81d1 add texrect support for r300 2005-12-05 01:11:20 +00:00
Eric Anholt f5a9f27bf6 Add RV410 X700PRO PCI ID
Submitted by: Adam K Kirchhoff <adamk@voicenet.com>
2005-12-02 23:55:21 +00:00
Eric Anholt c6344e8df5 Assert an MIT copyright on sis_drm.h, since one was lacking and I created
that particular file. Its contents have changed a good bit since the
    original sis code, and the original sis code didn't care much about
    attribution since it routinely disclaims Precision Insight/VA Linux
    from responsibility. Also, adjust formatting around license headers
    (have a comment open immediately before the "Copyright" line, not as a
    runon of any previous comments) for automatic processing into FreeBSD,
    where /*- is used to signal the beginning of license headers for
    automatic compilation of license lists.
2005-11-28 23:10:41 +00:00
Thomas Hellstrom a5747964ec Fixed long standing 64-bit bug in via memory manager. Bumped via date and
patchlevel.
2005-11-16 10:55:53 +00:00
Thomas Hellstrom c8261e3d24 Loosen via dmablit alignment checks somewhat. Adapt stride check to maximum
sceen size for EXA.
2005-11-15 11:20:47 +00:00
Dave Airlie b5d71f63cd enable i915 32/64 bit ioctls 2005-11-11 12:23:18 +00:00
Dave Airlie 224ebd2c8d RV200 < R200 2005-11-11 10:56:31 +00:00
Dave Airlie 97528041df fix up radeon whitespace 2005-11-11 10:02:10 +00:00
Dave Airlie 3eb577c7c5 mixing breaks in r128 driver.. fixed in kernel 2005-11-11 09:20:34 +00:00
Dave Airlie cec83bf6d3 remove extra spaces 2005-11-11 09:07:08 +00:00
Dave Airlie 9a91674d45 cleanup ioctl/max_ioctl to use header file for extern symbols 2005-11-11 07:45:46 +00:00
Eric Anholt 6481a2e4cd Correct a LOR issue on FreeBSD by allocating temporary space and doing a
single DRM_COPY_FROM_USER rather than DRM_VERIFYAREA_READ followed by
    tons of DRM_COPY_FROM_USER_UNCHECKED. I don't like the look of the
    temporary space allocation, but I like the simplification in the rest
    of the file. Tested with glxgears, tuxracer, and q3 on a savage4.
2005-11-08 21:40:03 +00:00
Eric Anholt a10d8178e3 Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. Adds
drm_mtrr_{add,del} for handling the MTRR setup. Still has a LOR issue
    with DRM_VERIFYAREA_READ/DRM_COPY_FROM_USER_UNCHECKED in savage_bci.c
    -- this won't work with the fine-grained locking in use, and just doing
    a single copyin to a temporary will probably work fine. Also note that
    the module leaks approximately 4 kb on unload.
2005-11-08 20:25:00 +00:00
Eric Anholt 2c6308fe54 Correct a LOR on FreeBSD by allocating a temporary buffer and doing a
single COPY_FROM_USER into it, rather than VERIFYAREA followed by many
    COPY_FROM_USER_UNCHECKEDs.
2005-11-08 09:02:02 +00:00
Eric Anholt 71f9b7357c Fix FreeBSD DRM for latest MGA changes to agp support, which cleans things
up a good bit, I think. Also, remove the agp_uninit() function which
    has lain around as a noop for years now. The FreeBSD DRM is now all
    compiling, with the exception of via. One known sleeping-with-lock-held
    issue remains.
2005-11-08 05:29:26 +00:00
Eric Anholt 1a256df480 Catch FreeBSD up to the pcie gart changes. Required minor modification to
radeon_cp.c to use a drm_local_map_t-type mapping (drm_core_ioremap
    rather than drm_ioremap), which contains private device mapping
    information on BSD. I also changed the ati_pcigart interface to use
    "void *" for pointers to kva rather than "unsigned long". While PCIGART
    support appears to be broken on FreeBSD currently, I think this is not
    new, and BusType PCI remains working on my r100 in Linux.
2005-11-08 02:38:01 +00:00
Ian Romanick 39615ec06e Converts the remaining drm_agp_foo functions to be a drm_agp_foo and
drm_agp_foo_ioctl pair. Modifies the MGA DRM to use the drm_agp_foo
    functions instead of the drm_foo_agp functions. The drm_foo_agp
    functions are no longer exported by drm.ko.
Ensures that dma->seg_count and dma->page_count are properly set in
    drm_addbufs_{agp,sg,fb}. drm_addbufs_pci was already correct.
Ensures that mga_do_agp_dma_bootstrap correctly sets agp_buffer_token.
At this point PCI DMA is still broken.
Xorg bug: #4797 Reviewed by: Dave Airlie, Eric Anholt Signed-off-by: Ian
    Romanick <idr@us.ibm.com>
2005-11-03 00:38:25 +00:00
Thomas Hellstrom b63b771285 via: Sync via_drm.h with 3D driver. Bump via patchlevel and date. 2005-10-22 15:12:05 +00:00
Dave Airlie 6cd0282f64 fix G550 cards 2005-10-20 22:41:26 +00:00
Adam Jackson ea83db57e3 via and r300 still need installed reg headers. 2005-10-20 17:51:57 +00:00
Thomas Hellstrom cf8ce0888a via: PCI DMA bugfixes and DOS due to too many mapped pages checks. 2005-10-20 17:37:32 +00:00
Dave Airlie 763d726c43 dma access also needs some work 2005-10-20 02:35:08 +00:00
Dave Airlie 727e88c4f4 the old init path needs to set WAGP_ENABLE by default 2005-10-20 01:54:38 +00:00
Ian Romanick 4b3ee6c50e Doig a full clean up from mga_do_dma_bootstrap when
mga_do_agp_dma_bootstrap fails causes problems if
    mga_do_pci_dma_bootstrap succeeds. This commit makes it possible to do
    a "minimal" clean up instead. I'm still trying to figure out what is
    causing the failures in mga_do_agp_dma_bootstrap...
Signed-off-by: Ian Romanick <idr@us.ibm.com>
2005-10-14 05:01:19 +00:00
Ian Romanick 1505e316af Fixed a cut-and-paste bug that could cause an oops in mga_do_cleanup_dma
when mga_do_init_dma fails. Still trying to determine why
    mga_do_init_dma is failing.
Signed-off-by: Ian Romanick <idr@us.ibm.com>
2005-10-14 01:25:38 +00:00
Dave Airlie 0a24095cd6 Add X300 RV370 2005-10-13 11:21:31 +00:00
Adam Jackson 62a4673034 Skeleton nv drm driver, to enable DMA in EXA. (Lars Knoll, minor updates by
me)
2005-10-06 23:31:29 +00:00
Dave Airlie f42cdc8dcb Add support to turn writeback off via radeon module option 2005-09-30 06:41:10 +00:00
Dave Airlie 6ff57e2d7c fix pci overriding from userspace 2005-09-30 06:35:09 +00:00
Thomas Hellstrom 903e5701ff Add the via PCI DMA blit code. 2005-09-25 12:54:12 +00:00
Dave Airlie d4dec1db80 hopefully fix server recycling on PCIE 2005-09-25 08:54:31 +00:00
Dave Airlie f1276d3b43 add some pci express chips 2005-09-12 04:37:52 +00:00
Dave Airlie ba8f4fb778 make PCI Express work on 64-bit machines, thanks to Alex Deucher (agd5f) 2005-09-12 04:35:31 +00:00
Dave Airlie 5565a00916 Add GART in FB support for ati pcigart, and PCIE support for r300 2005-09-11 08:51:23 +00:00
Roland Scheidegger 53c8037786 Add support for GL_ATI_fragment_shader, new packets R200_EMIT_PP_AFS_0/1,
R200_EMIT_PP_TXCTLALL_0-5 (replaces R200_EMIT_PP_TXFILTER_0-5, 2 more
    regs) and R200_EMIT_ATF_TFACTOR (replaces R200_EMIT_TFACTOR_0 (8 consts
    instead of 6)
2005-09-09 22:35:49 +00:00
Vladimir Dergachev c8b5a9f8cc Add another R300 PCI id. Submitted by: Daniel Estévez 2005-09-09 12:53:44 +00:00
Dave Airlie 0d346a07a8 convert ioctl flags to use flags instead of separate ints 2005-09-03 03:27:14 +00:00
Eric Anholt 22ec8ebb17 - Don't try to allocate mappings of less than a PAGE_SIZE in MGA DMA code.
- Comment out the "is this mapping/bufs in allocated AGP" bits in BSD
    because they break mga (which uses AGP allocation that doesn't track
    entries). It's not a security issue when we still have the related
    ioctls marked root-only.
- Apply some power-of-two alignment restrictions to hopefully avoid some
    panicing in bad cases of drm_pci_alloc() on FreeBSD.
- Add verbosity to some error handling that I found useful while debugging.
2005-08-26 23:27:19 +00:00
Eric Anholt 9942cad1f6 Add missing .cvsignore files for autotoolery. 2005-08-25 23:11:28 +00:00
Alan Hourihane 01e4364a8f remove i915_pm code as it causes too many issues with current software
suspend, and the DDX driver re-inits the board successfully anyway.
2005-08-22 09:50:12 +00:00
Dave Airlie e2dc70593f We don't need to install all the internal headers files only drm.h and
*_drm.h have user space interfaces
2005-08-21 03:04:32 +00:00
Adam Jackson 017174085f Fix silly install issue by moving the header install rules for shared-core
into shared-core/Makefile.am. Bump to 1.0.3.
2005-08-20 03:32:09 +00:00
Dave Airlie 279e7c113c commit toggle switch to make Linux drm_handle_t unsigned int 2005-08-17 00:14:18 +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 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
Thomas Hellstrom 4f5961eeee VIA bugvixes by Joris van Rantwijk Initial commit. 2005-08-14 09:52:09 +00:00
Thomas Hellstrom cdf49e5732 Reverting the previous via security-fix commit, since the assumption of
contexts registered with the callers filp was wrong.
2005-08-12 14:19:33 +00:00
Thomas Hellstrom d5e8ab13ff Security fix on via: Checking that the specified context belongs to the
caller on fb / agp memory alloc and free. Otherwise malicious clients
    can register allocations on other clients or free memory used by other
    clients which will lead to severe memory manager inconsistensies.
2005-08-10 19:46:46 +00:00