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.
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
82f12e5a40c1fbcb91910a0f8b725c34fff02aae.

The actual crash occurred in RADEONPrintPortMap().

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
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>
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>
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>
radeon/kms: add support for TN (trinity) APUs

- KMS only
- Includes full EXA/Xv support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
radeon/kms: add TN pci ids

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
radeon: man page updates

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
configure: bump libdrm requirement for TN support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
configure: bump version for release

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
configure: bump version post release

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
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>
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>
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>
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>
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>
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>
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>
radeon: add MacModel entry for SAM440ep embedded board

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
EXA: Attempt to fix solid picture acceleration with UMS.

Only compile tested, but should fix
https://bugs.freedesktop.org/show_bug.cgi?id=49182 .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>