Commit Graph

2905 Commits

Author SHA1 Message Date
Alex Deucher
b33cf9cf9d radeon: add MacModel entry for SAM440ep embedded board
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-05-02 09:55:16 -04:00
Alex Deucher
0bda305f7a EXA: Support acceleration of solid pictures on R2xx.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16 16:41:42 +02:00
Alex Deucher
a7754b076e EXA: Support acceleration of solid pictures on R1xx.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16 16:41:31 +02:00
Alex Deucher
cac2d7ed54 EXA: Support acceleration of solid pictures on Evergreen/NI.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16 15:57:55 +02:00
Michel Dänzer
d88b970013 EXA: Support acceleration of solid pictures on R3xx-R7xx.
Allocate 1x1 scratch pixmaps to hold the solid picture colours.

This works around https://bugs.freedesktop.org/show_bug.cgi?id=47266 and might
improve performance in other cases as well.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16 15:54:26 +02:00
Michel Dänzer
66b586b9b9 RADEONCopySwap: Fix RADEON_HOST_DATA_SWAP_16BIT case.
It was the same code as for RADEON_HOST_DATA_SWAP_32BIT. This caused bus errors
on FreeBSD/PPC, but I'm not sure how it could not cause problems anywhere...

Reported-by: Andreas Tobler <andreast@fgznet.ch>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-04-16 15:52:59 +02:00
Michel Dänzer
1e656cd597 Make radeon_setup_kernel_mem failures more graceful and verbose.
So that bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138 can be
diagnosed more easily.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16 15:45:15 +02:00
Jerome Glisse
d282719a9c r6xx-r9xx: force 1D tiling for buffer with height < 64
Due to some old kernel issue, height is 8 aligned insided the ddx
For buffer with height btw 57 & 63 this lead ddx to believe it can
allocate a 2D tiled surface while mesa will not align height and
will assume 1D tiled leading to disagreement and rendering issue.
This patch force buffer with height < 64 to be 1D tiled.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-04-05 15:55:39 -04:00
Alex Deucher
de2419e550 configure: bump version post release
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-29 00:28:39 -04:00
Alex Deucher
9425c50e93 configure: bump version for release
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
xf86-video-ati-6.14.4
2012-03-29 00:19:12 -04:00
Alex Deucher
dc18d77171 configure: bump libdrm requirement for TN support
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-28 17:32:53 -04:00
Alex Deucher
03535904a3 radeon: man page updates
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-27 09:48:28 -04:00
Alex Deucher
6ed191c33c radeon/kms: add TN pci ids
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-20 19:57:53 -04:00
Alex Deucher
55d65fcf33 radeon/kms: add support for TN (trinity) APUs
- KMS only
- Includes full EXA/Xv support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-20 19:54:57 -04:00
Marek Olšák
b5cf9bd693 r6xx: initialize SX_MISC
If Mesa set it to 1, the DDX would not render anything = the monitor would
basically freeze.

agd5f: update emit count as well.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-03-07 11:01:40 -05:00
Michel Dänzer
355dc42959 DRI2: Unreference buffers immediately when event wait info is invalidated.
Deferring this could result in trying to unreference buffers from a previous
server generation, i.e. accessing freed memory.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Christian König <Christian.koenig@amd.com>
2012-03-06 15:52:40 +01:00
Michel Dänzer
fe51469b2e Re-register DRM FD wakeup handler for each server generation.
Fixes hang when trying to use DRI2 swap scheduling after a server reset.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Christian König <Christian.koenig@amd.com>
2012-03-06 15:52:40 +01:00
Hans Verkuil
878454ae8d Fix ConnectorTable crash in radeon_output.c
The sam440ep PPC board requires a ConnectorTable xorg.conf option, but putting
in that option causes the radeon driver to crash. I finally traced it to a
copy-and-paste bug in radeon_output.c as a result of a major rework in commit
82f12e5a40.

The actual crash occurred in RADEONPrintPortMap().

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-02-24 09:39:59 -05:00
Roland Scheidegger
688c8a54a0 radeon: avoid rounding errors in texture coords for textured xv
make sure the division is done with floats, otherwise the coordinate
can be wrong up to 1 texel.
Particularly visible with clipping and small source scaled up (since one
texel can be a shift of several pixels) but could be seen even unscaled.
Should provide more accurate coords without clipping too depending on the
scale factor probably.
Changed for r100-r600, though only tested on r300.
2012-02-20 15:24:04 +01:00
Jerome Glisse
2778b56252 radeon: r6xx-eg use linear general when using scratch bo
In path where we need to use scratch bo as temporary area,
consider it as linear buffer. Not linear aligned. Fix some
case such as in bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=45827

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-13 20:42:57 -05:00
Michel Dänzer
c66ae23570 Handle new xorg_list API.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=45937

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-13 10:43:58 +01:00
Alex Deucher
7ff277e22c radeon: fix crash in drmmode_create_bo_pixmap()
Only init surface on r6xx+.  Return NULL rather than
FALSE.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=45829

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-02-10 17:42:04 -05:00
Alex Deucher
60b949f34d radeon/kms: reusing fd message is not an error
It's standard behavior.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-02-10 13:11:26 -05:00
Michel Dänzer
e202844099 EXA/r6xx+: Only set write domain or read domains, not both. (Bug #43893)
Avoids an accounting bug in libdrm_radeon 2.4.31 or older.

See https://bugs.freedesktop.org/show_bug.cgi?id=43893

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-08 15:04:14 +01:00
Michel Dänzer
5a7f64c517 Fix UMS build failure.
And some UMS specific warnings.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-08 11:36:19 +01:00
Michel Dänzer
87f776b966 Remove unused local variable 'height'.
Pointed out by gcc -Wunused-variable.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-08 11:15:04 +01:00
Michel Dänzer
f63262e2f1 evergreen: Initialize source surface member for textured video.
Fixes crash reported by Ole Salscheider on IRC.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-08 10:44:14 +01:00
Jerome Glisse
c8f104d388 radeon: fix tiling for weird resolution
Should also fix xv for some case.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-07 15:06:58 -05:00
Jerome Glisse
615033f2b5 r600-evergreen: use common surface allocator for tiling v11
Use libdrm common surface code so mesa,ddx have same idea
about tiling surface and what their pitch should be and
the alignment constraint.

v2 fix remaining issue add new option to conditionaly enable
v3 fix fbcon copy and r600 exa copy path
v4 fix non tiled path 2D tiling on GPU >= R600, set it to false
   as default
v5 adapt to pixel/element size split of libdrm/radeon
v6 update to properly handle falling back to 1d tiled
v6 final fix to tile split value on evergreen and newer
v7 fix default array mode on r6xx, fix height alignment issue
   on evergreen
v8 fix tile split value
v9 add stencil tile split support, simplify dri2 for stencil
   with evergreen
v10 Try to fix xv path regarding tiling. Adapt to libdrm API
    change. Try to fix case where there is no surface which
    means non tiled bo.
v11 check for proper libdrm

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06 19:00:37 -05:00
Michel Dänzer
36c1906710 Fix vline range calculations.
The range passed in is in pixmap coordinates, so the CRTC offset needs to be
added to the clamping limits and subtracted from the clamped range for
pre-AVIVO display engines.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-02-01 15:41:05 +01:00
Michel Dänzer
bb0e1531ac Check for empty vline ranges after clamping.
The clamping could turn a previously non-empty range into an empty one.

Also, start == stop means the range is empty.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-02-01 13:28:18 +01:00
Alex Deucher
13b3aed4ef EXA/r6xx+: fix rop setting for overlapping copies
Need to use GXCopy for the src to temp copy, then
the original rop for the temp to dest copy.

Noticed by: Frank Huang

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-10 09:35:09 -05:00
Egbert Eich
eb6d769a08 DPMS: Split non-modeset CRTC DPMS function.
RADEONRestore() calls crtc->funcs->dpms() after most of the mode setting
subsystems have been restored. This function enables the CRTCs but does
more: it calls DRM pre- and post-modeset ioctls and sets up the palettes
(LUTs).
None of these two things are needed. Accessing the palette registers after
restoring the PLLs can even lead to lockups.
Thus the CRTC DPMS function is split into two parts: one that just enables
/disables the CRTC and one which wraps this function and does the rest.
Now the inner function can be called directly from RADEONRestore() as
there is no need to go thru the RandR hooks in this function while the
RandR hook uses the wrappering function so the full functionality is
preserved from an RandR point of view.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-05 09:28:49 +01:00
Egbert Eich
ac51e33189 UMS: Fix lockups in palette save/restore on pre-AVIVO chips.
The reintroduction of palette save/restore in 5efdf514 causes some
pre-AVIVO chips to lock up. An investigation revealed that accessing
palette registers when the associated PLL is not running is causing
this. With UMS the PLL setup that is saved has been done by the BIOS
typically.
A similar issue was observed when VGA palette save/restore had
been reinitroduced with 80eee856:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480312
and has been worked around for Linux without further investigation
by 87e66ce7.
To fix the issue we now
a. introduce 'on-demand' palette saving (ie the palette is
   saved before it is first altered). This guarantees that
   the palette register are only associated when the associated
   CRTC is active and thus the PLLs are powered up and running.
b. move palette restore before PLL restore.
c. eliminate generic VGA palette save/restore which seems to be
   unneeded when the palette is restored natively.
   It is believed that this caused the behavior described in
   https://bugs.freedesktop.org/show_bug.cgi?id=18407#c27

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-05 09:25:48 +01:00
Matthieu Herrb
0a8d04eeac Update for new vgaHW API.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-02 11:20:44 -05:00
Michel Dänzer
ae45d7e6d8 DRI2: Can't use page flipping for pixmaps. (bug #42913)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42913 .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-12-28 11:48:36 +01:00
Alex Deucher
aacbd629b0 radeon: add some new pci ids
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=43739

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-12-12 09:32:30 -05:00
Dave Airlie
bc54e415e2 radeon: add original radeon to always tiled.
and actually enable it for M7, previous commit only did one function.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-06 15:47:45 +00:00
Dave Airlie
ba46c7b0cf radeon: refine always tiled depth check
So it appears the M7 family always tiles its depth buffer also.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-06 13:42:49 +00:00
Dave Airlie
98b2d5fe17 radeon: r200 depth buffers are always tiled
When we do the allocations we need to make sure the always tiled
nature is taken into account.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-05 18:44:28 +00:00
Alex Deucher
7dcefc69d9 Xv: Evergreen+ asics support 16k surfaces
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-12-05 09:23:07 -05:00
Alex Deucher
72e386d425 radeon: add some new pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-12-01 11:02:45 -05:00
Dave Airlie
3853c3020d fixup xinerama since 9151f3b1c2
since the driver would call RRFirstOutput without checking if randr has
been enabled, and it would crash in privates code.

reported by vereteran on #radeon

Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-on-irc-by: Michel Dänzer <michel.daenzer@amd.com>
2011-11-28 18:38:30 +00:00
Benjamin Herrenschmidt
d669c34f14 ddx/evergreen: Fix endian of ALU constants
The constants are written directly into a buffer object shared with the
card and we "forget" to swap them. This patch fixes it by doing the swap
in evergreen_set_alu_consts() in-place (ie, it modifies the buffer),
which should be fine with the way we use it in the ddx.

This makes everything work fine on my caicos card on a G5 including some
quik tests with Xv, gnome3 shell, etc...

Thanks a lot to Jerome Glisse for holding my hand through debugging that
(and finding the actual bug).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-11-21 11:48:40 -05:00
Alex Deucher
422bdd4fe6 radeon: add missing FireMV pci id
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-11-14 09:39:16 -05:00
Dave Airlie
534fb6e413 ati: enable bg none when fbcon succeeds and we are built against ABI after 10.
One less patch to keep carrying in Fedora.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11 10:28:02 +00:00
Michel Dänzer
89452c0804 UMS: Guard references to PCITAG / pciTag with XSERVER_LIBPCIACCESS (bug #42690)
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=42690 .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-11-08 11:23:11 +01:00
Ilija Hadzic
5ec34ed959 DRI/DRI2: remove hard-coded limitation to 6 crtcs
DRM's hard limit to the number of CRTCs is 32. ATI DDX unnecessarily
clips this limit to 6 by hard coding initial assumption for
output->possible_crtcs mask to 0x7f (before it gets trimmed down to
what's really possible for a given output) and by allocating only 6
entries for for cursor_bo[] array in RADEONInfoRec.

Fix this and thus allow the ATI DDX to deal with as many CRTCs
as the DRM allows (32), so it is ready if anything with >6 CRTCs
comes out.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
2011-11-04 17:47:49 -04:00
Michel Dänzer
4853ab2cdc Turn compile time check into runtime check.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-11-04 12:15:53 +01:00
Alex Deucher
bcdb54fe16 check for xserver 1.9.4.901 to enable tiling by default
Previous xservers had a bug in the EXA code which caused
display corruption in some cases.

See:
https://bugs.freedesktop.org/show_bug.cgi?id=33929

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-11-04 12:07:11 +01:00