summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r300_cmdbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: Fix sparc regression in r300_scratch()David Miller2010-04-271-1/+1
| | | | | | | | | | | | | | | Commit b4fe945405e477cded91772b4fec854705443dd5 ("drm/radeon: Fix memory allocation failures in the preKMS command stream checking.") added a regression in that it completely tossed the get_unaligned() done by r300_scratch() which we added in commit 958a6f8ccb1964adc3eec84cf401c5baeb4fbca0 ("drm: radeon: Fix unaligned access in r300_scratch()."). Put it back. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: Fix printf type warning in 64bit system.Pauli Nieminen2010-03-011-2/+2
| | | | | | | | | Type of iterator was promoted to unsigned long in 64bit systems. *header is small structure so it is alwas safe to cast return value of sizeof operator to int. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
* drm/radeon: Fix memory allocation failures in the preKMS command stream ↵Pauli Nieminen2010-02-231-152/+128
| | | | | | | | | | | | | | | | | | | checking. Allocation of single large block of memory may fail under memory presure. drm_buffer object can hold one large block of data in multiple independ pages which preents alloation failures. This patch converts all access to command stream to use drm_buffer interface. All direct access to array has to go tough drm_buffer functions to get correct pointer. Outputting the command stream to ring buffer needs to be awear of the split nature of drm_buffer. The output operation requires the new OUT_RING_DRM_BUFFER. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* DRM: Rename clamp variableAndi Kleen2009-12-231-3/+3
| | | | | | | | | | linux/kernel.h has a "clamp" macro, but r300_cmdbuf also uses a variable with the same name. Right now it doesn't seem to include the header, but sooner or later someone will. So better rename the variable now. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: add regs required for occlusion queries supportMaciej Cencora2009-03-291-0/+5
| | | | | | | [airlied: cleaned up slightly for drm-next] Signed-off-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: radeon: Fix unaligned access in r300_scratch().David Miller2009-03-131-1/+5
| | | | | | | | | | | | In compat mode, the cmdbuf->buf 64-bit address cookie can potentially be only 32-bit aligned. Dereferencing this as 64-bit causes expensive unaligned traps on platforms like sparc64. Use get_unaligned() to fix. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: move to kref per-master structures.Dave Airlie2008-12-291-5/+6
| | | | | | | | | | | | | | | | This is step one towards having multiple masters sharing a drm device in order to get fast-user-switching to work. It splits out the information associated with the drm master into a separate kref counted structure, and allocates this when a master opens the device node. It also allows the current master to abdicate (say while VT switched), and a new master to take over the hardware. It moves the Intel and radeon drivers to using the sarea from within the new master structures. Signed-off-by: Dave Airlie <airlied@redhat.com>
* r300: Fix cliprect emitNicolai Haehnle2008-08-251-1/+4
| | | | | | | | | | | This makes our handling of cliprects sane. drm_clip_rect always has exclusiv bottom-right corners, but the hardware expects inclusive bottom-right corner so we adjust this here. This complements Michel Daenzer's commit 57aea290e1e0a26d1e74df6cff777eb9f03 to Mesa. See also http://bugs.freedesktop.org/show_bug.cgi?id=16123 Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEXNicolai Haehnle2008-08-251-16/+64
| | | | | | | | | | | | | | | DRAW_INDEX writes a vertex count to VAP_VF_CNTL. Docs say that behaviour is undefined (i.e. lockups happen) when this write is not followed by the right number of vertex indices. Thus we used to do the wrong thing when drawing across many cliprects was necessary, because we emitted a sequence DRAW_INDEX, DRAW_INDEX, INDX_BUFFER, INDX_BUFFER instead of DRAW_INDEX, INDX_BUFFER, DRAW_INDEX, INDX_BUFFER The latter is what we're doing now and which ought to be correct. Signed-off-by: Dave Airlie <airlied@redhat.com>
* radeon: fix some hard lockups on r3/4/500sJerome Glisse2008-08-251-20/+97
| | | | | | | | This patch should fix hard lockup and convert them in softlockup (ie you can ssh the box but the gpu is busted and we are waiting in loop for it to come back to reason). Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-141-0/+1071
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>
OpenPOWER on IntegriCloud