summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_state.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-141-3203/+0
| | | | | | | | | | | | | | 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>
* drm/radeon: fix texture uploads with large 3d textures (bug 13980)Roland Scheidegger2008-06-191-3/+11
| | | | | | | | Texture uploads could hit the blitter coordinate limit, adjust the texture offset when uploading the pieces. Make sure to check the end address of the upload too. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: init pipe setup in kernel code.Alex Deucher2008-06-191-0/+3
| | | | | | | This inits the card pipes in the kernel and lets userspace getparam the correct setup. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: add initial r500 drm supportDave Airlie2008-02-071-0/+3
| | | | | | | 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>
* drm: cleanup DRM_DEBUG() parametersMárton Németh2008-02-071-8/+7
| | | | | | | | | | 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>
* Convert files to UTF-8 and some cleanupsJan Engelhardt2007-10-191-1/+1
| | | | | | | | | | | | | | | | | | * Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* radeon: Commit the ring after each partial texture upload blit.chaohong guo2007-10-151-1/+3
| | | | | | | This makes sure each blit starts as early as possible, which may improve texture upload performance in some cases. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt2007-10-151-197/+147
| | | | | | | | | 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>
* drm: Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt2007-10-151-103/+92
| | | | | | | | | | 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>
* drm: Remove DRM_ERR OS macro.Eric Anholt2007-10-151-77/+77
| | | | | | | | This was used to make all ioctl handlers return -errno on linux and errno on *BSD. Instead, just return -errno in shared code, and flip sign on return f shared code to *BSD code. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove sarea typedefsDave Airlie2007-07-121-1/+1
| | | | | | Leave the userspace typedefs in place Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: detypef waitlist/freelist/buf_entry/device_dma/drm_queue structsDave Airlie2007-07-111-5/+5
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: drop drm_buf_t typedefDave Airlie2007-07-111-10/+10
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove drm_file_t, drm_device_t and drm_head_t typedefsDave Airlie2007-07-111-31/+31
| | | | | | some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a bunch of typedefs on the userspace interfaceDave Airlie2007-07-111-5/+5
| | | | | | | 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>
* radeon: add support for vblank on crtc2Dave Airlie2007-07-111-0/+6
| | | | | | This adds support for CRTC2 vblank on radeon similiar to the i915. Signed-off-by: Dave Airlie <airlied@linux.ie>
* radeon: Don't mess up page flipping when a file descriptor is closed.Michel Dänzer2007-05-081-27/+19
| | | | | | | | | 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>
* drm/radeon: upgrade to 1.27 - make PCI GART more flexibleDave Airlie2007-05-081-0/+6
| | | | | | | | | | | | | | | | | | 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>
* drm: Unify radeon offset checking.=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-151-9/+4
| | | | | | | | | 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 .
* drm: radeon: only allow specific type-3 packetss through verifierRoland Scheidegger2006-10-241-3/+106
| | | | | | only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blitsMichel Daenzer2006-09-221-2/+4
| | | | | | | 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>
* drm: use radeon specific names for radeon flagsDave Airlie2006-09-221-5/+5
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().Michel Daenzer2006-09-221-13/+12
| | | | | | | | The overflows could cause valid offsets to get rejected under some circumstances, e.g. when the framebuffer resides at the very end of the card's address space. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparamMichel Dänzer2006-09-221-1/+5
| | | | | | When this succeeds, userspace can read the scratch register contents from th mapped writeback page directly. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: add some debug output when getparam is called with unknownMichel Dänzer2006-09-221-0/+1
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* [PATCH] drm: radeon flush TCL VAP for vertex program enable/disableRoland Scheidegger2006-08-301-1/+8
| | | | | | | | The radeon requires a VAP state flush when enabling/disabling vertex programs on the r200 cards. Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* drm: update radeon to 1.25 add r200 vertex program supportDave Airlie2006-06-241-0/+36
| | | | | | | | | 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>
* drm: radeon add a tcl state flush before accessing tcl vector spaceDave Airlie2006-06-241-1/+2
| | | | | | | | | | | | 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>
* drm: remove pointless checks in radeon_stateDave Airlie2006-03-191-45/+0
| | | | | | | | | | | If these were valid checks, we'd have already oopsed several lines above where we were already dereferencing them. DA: these used to be valid but other changes made them unnecessary. Coverity: 776,777,778 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fixup improper cast.Dave Airlie2006-03-191-1/+1
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: rework radeon memory map (radeon 1.23)Dave Airlie2006-03-191-12/+46
| | | | | | | | | | 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>
* drm: fix radeon warnings on 64-bitDave Airlie2006-01-101-3/+3
| | | | | | | | | | | | | | | | | | From: Andrew Morton <akpm@osdl.org> drivers/char/drm/radeon_state.c: In function `radeon_cp_dispatch_texture': drivers/char/drm/radeon_state.c:1653: warning: int format, different type arg (arg 3) drivers/char/drm/radeon_state.c:1661: warning: int format, different type arg (arg 3) drivers/char/drm/radeon_state.c:1689: warning: int format, different type arg (arg 3) sizeof() doesn't return an int. Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: major update from CVS for radeon and coreDave Airlie2006-01-021-112/+72
| | | | | | | | 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>
* drm: move ioctl flags to a bit field of flagsDave Airlie2006-01-021-27/+27
| | | | | | From: Dave Airlie Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: rename driver hooks more understandablyDave Airlie2005-11-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* drm: fix all sparse warning on 32-bit x86Dave Airlie2005-09-301-12/+11
| | | | | | Finally cleaned up the sparse warnings for the drm. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix some lindent damageDave Airlie2005-09-251-52/+26
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: lindent the drm directory.Dave Airlie2005-09-251-1223/+1270
| | | | | | | | | 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>
* drm: add radeon PCI express supportDave Airlie2005-09-111-0/+3
| | | | | | | Add support for Radeon PCI Express cards (needs a new X.org DDX) Also allows PCI GART table to be stored in VRAM for non PCIE cards Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update radeon driver to 1.18Dave Airlie2005-09-111-0/+18
| | | | | | | | | 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) From: Roland Scheidegger, David Airlie Signed-off-by: David Airlie <airlied@linux.ie>
* drm: add new texture upload code from r300 projectDave Airlie2005-08-201-35/+29
| | | | | | | Paul Mackerras did some new upload code for r300, I forgot to add it to the kernel with r300 merge. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add initial r300 3D support.Dave Airlie2005-08-161-0/+11
| | | | | | | This adds initial r300 3D support to the radeon DRM. From: Nicolai Haehnle, Vladimir Dergachev, and others. Signed-off-by: David Airlie <airlied@linux.ie>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+3102
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!