Commit Graph

88 Commits (f6e8023e03278731db38dcc0c429025f36817c65)

Author SHA1 Message Date
Dave Airlie 4294dcc050 complete PCIE backend for ttm
ttm test runs with it at least, needs to do more testing on it
2007-06-05 12:26:06 +10:00
Dave Airlie 07345af838 Merge branch 'origin' into radeon-ttm
Conflicts:

	shared-core/radeon_drv.h
2007-06-05 10:09:11 +10:00
Dave Airlie 4e9d215bdf radeon: add support for vblank on crtc2
This add support for CRTC2 vblank on radeon similiar to the i915 support
2007-06-03 16:28:21 +10:00
Michel Dänzer ca1cd3257c radeon: Don't mess up page flipping when a file descriptor is closed.
There can still be other contexts that may use page flipping later on, so don't
just unilaterally 'clean it up', which could lead to the wrong page being
displayed, e.g. when running 3D apps with a GLX compositing manager such as
compiz using page flipping.
2007-04-29 12:37:51 +02:00
Oliver McFadden 059b5d9077 rs480: Renamed some unknown registers. See dri-devel list. 2007-04-09 23:23:40 +00:00
Dave Airlie 29f8fe8046 radeon: bump version for IGPGART support 2007-04-09 22:00:34 +10:00
Dave Airlie a70f8e0ab2 radeon: add support for reverse engineered xpress200m
The IGPGART setup code was traced using mmio-trace on fglrx by myself
and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.

This code doesn't let the 3D driver work properly as the card has no
vertex shader support.

Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
work on.
2007-04-09 21:52:59 +10:00
Dave Airlie b1f0b2d960 radeon: de-static irq function, fixup fence/buffer 2007-04-01 18:24:23 +10:00
Dave Airlie be5bf1346e copy over some files and reorg radeon to add ttm fencing not working yet 2007-04-01 16:48:38 +10:00
Dave Airlie 188a93c9df radeon: make PCI GART aperture size variable, but making table size variable
This is precursor to getting a TTM backend for this stuff, and also
allows the PCI table to be allocated at fb 0
2007-03-04 19:10:46 +11:00
Michel Dänzer aefc7a3443 Unify radeon offset checking.
Replace r300_check_offset() with generic radeon_check_offset(), which doesn't
reject valid offsets when the framebuffer area is at the very end of the card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697 .
2006-12-14 19:31:56 +01:00
Michel Dänzer 6ba9127753 Use register writes instead of BITBLT_MULTI packets for buffer swap blits.
This takes up two more ring buffer entries per rectangle blitted but makes sure
the blit is performed top to bottom, reducing the likelyhood of tearing.
2006-09-15 16:55:40 +02:00
Dave Airlie 3cc64a943a drm: use radeon specific names for radeon flags 2006-09-12 06:13:14 +10:00
Dave Airlie 9b984b34e9 drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
2006-08-28 11:31:43 +10:00
Michel Dänzer 645453ce11 Bug #7629: Fix for CHIP_IS_AGP getting 'restored' with non-AGP cards
Commit 2a47f6bfec caused the CHIP_IS_AGP flag to
get 'restored' with PCI(e) cards. I can't think of a way to fix this without
introducing a (otherwise redundant) CHIP_IS_PCI flag.
2006-07-26 18:19:27 +02:00
Michel Dänzer d5e0f8bdaf Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of RADEON_RB2D_DSTCACHE_CTLSTAT.
The latter seems to be a read-only mirror of the former.
2006-07-19 19:18:32 +02:00
Michel Dänzer c91748e702 When writeback isn't used, actually disable it in the hardware.
Not doing this might waste bus bandwidth or even cause memory corruption or
system crashes on systems that check bus transfers. No such incident has been
reported though.
2006-07-19 19:13:00 +02: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
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
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 9fad101da9 add benh's memory management patch 2006-02-18 03:04:30 +00:00
Aapo Tahkola 9a01593f1a Add support for texture cache flushes (R300_TX_CNTL) 2006-01-20 21:45:28 +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 780e90e4a2 add radeon card type get param so userspace can avoid walking PCI 2005-12-29 00:17:51 +00:00
Dave Airlie 274fdf482b fix radeon memory mapping from Ben Herrenschmidt 2005-12-16 08:02:17 +00:00
Dave Airlie 0b4fdc81d1 add texrect support for r300 2005-12-05 01:11:20 +00:00
Dave Airlie 224ebd2c8d RV200 < R200 2005-11-11 10:56:31 +00:00
Dave Airlie 9a91674d45 cleanup ioctl/max_ioctl to use header file for extern symbols 2005-11-11 07:45:46 +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 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
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
Jon Smirl bb9502ab01 Mark some radeon init variables deprecated. These used to be passed in but
the driver already knew their correct value. For example the physical
    address of the framebuffer and registers.
2005-08-04 13:59:48 +00:00
Roland Scheidegger 096e0349ea fix driver date and drm minor version for r300 support 2005-07-27 18:19:11 +00:00
Eric Anholt ab59dd285c Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle.
    Big thanks to everyone involved!
2005-07-20 21:17:47 +00:00
Eric Anholt 5d96c74ff1 - Remove drm_initmap and replace its usage with drm_addmap. This reduces
code duplication, and it also hands you the map pointer so you don't
    need to re-find it.
- Remove the permanent maps flag. Instead, for register and framebuffer
    maps, we always check whether there's already a map of that type and
    offset around. Move the Radeon map initialization into presetup (first
    open) so it happens again after every takedown.
- Remove the split cleanup of maps between driver takedown (last close) and
    cleanup (module unload). Instead, always tear down maps on takedown,
    and drivers can recreate them on first open.
- Make MGA always use addmap, instead of allocating consistent memory in
    the PCI case and then faking up a map for it, which accomplished nearly
    the same thing, in a different order. Note that the maps are exposed to
    the user again: we may want to expose a flag to avoid this, but it's
    not a security concern, and saves us a lot of code.
- Remove rmmaps in the MGA driver. Since the function is only called during
    takedown anyway, we can let them die a natural death.
- Make removal of maps happen in one function, which is called by both
    drm_takedown and drm_rmmap_ioctl.
Reviewed by: idr (previous revision) Tested on: mga (old/new/pci dma),
    radeon, savage
2005-06-28 20:58:34 +00:00
Dave Airlie 6397722f19 add compat code from Paul Mackerras 2005-06-28 13:02:20 +00:00
Jon Smirl ae2264d3c9 Remove I2C support from radeon driver. Same support is available from
radeonfb.
2005-06-19 04:15:58 +00:00
Dave Airlie c9abd2fec5 add radeon registers from VHA code these are the "unknown" registers 2005-05-27 07:23:44 +00:00
Roland Scheidegger 34563921dd add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering on
r200
2005-03-15 22:12:30 +00:00
Dave Airlie 26f04a1664 add some idct type 3 packets for reference 2005-03-04 03:04:37 +00:00
Roland Scheidegger 732cdc5cef add support for texture micro tiling on radeon/r200. Add support for r100
cube maps (since it also requires a version bump) at the same time.
2005-02-10 19:22:43 +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
Dave Airlie 0d6b7fcb79 cleanup patch from Adrian Bunk <bunk@stusta.de> 2005-02-01 11:08:31 +00:00
Dave Airlie 77045dc516 fix incorrect PCI id for ATI radeon 2005-01-27 09:13:42 +00:00
Roland Scheidegger 43c3223de6 (Stephane Marchesin,me) Add radeon framebuffer tiling support to radeon
drm. Add new ioctls to manage surfaces which cover the tiled areas
2005-01-26 17:48:59 +00:00
Roland Scheidegger 408376b203 replace magic number with macro constant RADEON_ZBLOCK16 2005-01-26 14:19:24 +00:00
Roland Scheidegger c4a87c6883 (Stephane Marchesin, me) add hyperz support to radeon drm. Only fast z
clear and z buffer compression are working correctly, hierarchical-z is
    not.
2004-12-08 16:43:00 +00:00