summaryrefslogtreecommitdiff
path: root/drivers/char/drm/radeon_drv.h
AgeCommit message (Collapse)Author
2008-07-14drm: reorganise drm tree to be more future proof.Dave Airlie
With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: use DSTCACHE_CTLSTAT rather than RB2D_DSTCACHE_CTLSTATAlex Deucher
According to the hw guys, you should use DSTCACHE_CTLSTAT to flush the 2D dst cache rather than RB2D_DSTCACHE_CTLSTAT. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: Restore sw interrupt on resumeDennis Kasprzyk
Fixes performance drop after suspend/resume on some systems. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/r500: add support for AGP based cards.Dave Airlie
AGP registers weren't programmed properly for r500 cards. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: add initial r500 support.Dave Airlie
This contains all the command buffer processing for the r500 cards. It doesn't yet contain vblank support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: init pipe setup in kernel code.Alex Deucher
This inits the card pipes in the kernel and lets userspace getparam the correct setup. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: fix pixcache and purge/cache flushing registersAlex Deucher
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: merge IGP chip setup and fixup RS400 vs RS480 supportAlex Deucher
We only support RS480 (AMD based IGP) at the moment not RS400 (Intel based IGP) ones. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/radeon: IGP clean up register and magic numbers.Alex Deucher
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drm/rs690: set base 2 to 0.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-05-07Revert "drm/vbl rework: rework how the drm deals with vblank."Dave Airlie
This reverts commit ac741ab71bb39e6977694ac0cc26678d8673cda4. Okay this looks like wasn't as fully baked as I'd led myself to believe. Revert for now for further baking. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-04-26drm/vbl rework: rework how the drm deals with vblank.Jesse Barnes
Other Authors: Michel Dänzer <michel@tungstengraphics.com> mga: Ian Romanick <idr@us.ibm.com> via: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> This re-works the DRM internals to provide a better interface for drivers to expose vblank on multiple crtcs. It also includes work done by Michel on making i915 triple buffering and pageflipping work properly. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20drm/radeon: add initial rs690 support to drm.Maciej Cencora
This adds support for configuring the RS690 GART. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-07drm: add initial r500 drm supportDave Airlie
This adds CP support for the r500 series of chips, and allows accel 2D support on these chips with a new radeon driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-07radeon: setup the ring buffer fetcher to be less agressive.Roland Scheidegger
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-07drm: cleanup DRM_DEBUG() parametersMárton Németh
As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. airlied:- I cleaned up a few that this patch missed also Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-07drm: run cleanfile across drm treeDave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-11-05radeon: set the address to access the GART table on the CPU side correctlyDave Airlie
This code relied on the CPU and GPU address for the aperture being the same, On some r5xx hardware I was playing with I noticed that this isn't always true. This fixes issues seen on some r400 cards. (bugs.freedesktop.org 9957) Signed-off-by: Dave Airlie <airlied@redhat.com>
2007-10-15drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt
The data is now in kernel space, copied in/out as appropriate according to t This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DR is lost. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-10-15drm: Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt
As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everyth on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct went the other direction. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11drm: detypedeffing continues...Dave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11drm: drop drm_buf_t typedefDave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11drm: remove drm_file_t, drm_device_t and drm_head_t typedefsDave Airlie
some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11drm: remove a bunch of typedefs on the userspace interfaceDave Airlie
This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace API compatiblity, it changes all internal usages to structs/enum/unions. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11radeon: add support for vblank on crtc2Dave Airlie
This adds support for CRTC2 vblank on radeon similiar to the i915. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08radeon: Don't mess up page flipping when a file descriptor is closed.Michel Dänzer
There can still be other contexts that may use page flipping later on, so do 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08drm/radeon: upgrade to 1.27 - make PCI GART more flexibleDave Airlie
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 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-15drm: Unify radeon offset checking.=?utf-8?q?Michel_D=C3=A4nzer?=
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-09-22drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blitsMichel Daenzer
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. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22drm: use radeon specific names for radeon flagsDave Airlie
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22drm: realign sosme radeon code with drm git treeDave Airlie
this applies some minor cleanups for the radeon driver, to use the 3D flush and reset the AGP flags on X recycle Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22drm: radeon: Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of ↵Michel Dänzer
RADEON_RB2D_DSTCACHE_CTLSTAT. The latter seems to be a read-only mirror of the former. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22drm: radeon: fix up bus mastering when writeback is disabledMichel Dänzer
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. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-06-24drm: update radeon to 1.25 add r200 vertex program supportDave Airlie
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) From: Roland Scheidegger (DRM CVS) Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-06-24drm: radeon add a tcl state flush before accessing tcl vector spaceDave Airlie
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. From: Roland Scheidegger (DRM CVS) Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-03-25drm: add new radeon PCI ids..Dave Airlie
This adds all the r300 and r400 PCI ids from DRM CVS, it also makes these cards only initialise when the new xorg driver is used, as otherwise the DRM can cause lockups. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-03-19drm: rationalise some pci idsDave Airlie
This is the start of some work from Roland Scheidegger to align the X DDX pci ids and the drm ones, however we don't want to put r300 ids in the kernel just yet, they destabilise a few machines. From: Roland Scheidegger (via DRM CVS) Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-03-19drm: Add general-purpose packet for manipulating scratch registers (r300)Dave Airlie
From: Aapo Tahkola (via DRM CVS) Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-03-19drm: rework radeon memory map (radeon 1.23)Dave Airlie
This code reworks the radeon memory map so it works better for newer r300 chips and for a lot of older PCI chips. It really requires a new X driver in order to take advantage of this code. From: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-18drm: radeon add r300 TX_CNTL and verify bitblt packetsDave Airlie
The Xgl on r300 doesn't work unless you add a verify bitblt function to the DRM, and we need to pass TX_CNTL to flush texture caches. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-01-03drm: remove is_pci flag completely...Dave Airlie
this snuck back in, in the last merge. Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-01-03drm: merge in Linus mainlineDave Airlie
2006-01-02drm: major update from CVS for radeon and coreDave Airlie
This patch pull in a lot of changes from CVS to the main core DRM, and updates the radeon driver to 1.21.0 that supports r300 texrect and radeon card type ioctl. Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-12-15[PATCH] radeon drm: fix agp aperture map offsetBenjamin Herrenschmidt
This finally fixes the radeon memory mapping bug that was incorrectly fixed by the previous patch. This time, we use the actual vram size as the size to calculate how far to move the AGP aperture from the framebuffer in card's memory space. If there are still issues with this patch, they are due to bugs in the X driver that I'm working on fixing too. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23drm: move is_pci to the end of the structureDave Airlie
We memset the structure across opens except for the flags. The correct fix is more intrusive but this should fix a problem with bad iounmaps seen on AGP radeons acting like PCI ones. Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11drm: simplify sysfs code for drmDave Airlie
This simplifies the sysfs code for the drm and add a dri_library_name attribute which can be used by a userspace app to figure out which library to load. From: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-10drm: rename driver hooks more understandablyDave Airlie
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) From: Eric Anholt <anholt@freebsd.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-30drm: fix all sparse warning on 32-bit x86Dave Airlie
Finally cleaned up the sparse warnings for the drm. Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-30drm: add option to force writeback off.Dave Airlie
In order to get some better debugging from people about certain hangs/crashes we need to be able to turn AGP writeback off permanently... Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25drm: lindent the drm directory.Dave Airlie
I've been threatening this for a while, so no point hanging around. This lindents the DRM code which was always really bad in tabbing department. I've also fixed some misnamed files in comments and removed some trailing whitespace. Signed-off-by: Dave Airlie <airlied@linux.ie>