Commit Graph

46 Commits

Author SHA1 Message Date
Dave Airlie
0c2118586d radeon: fixup last fix, use CURSOR_WIDTH not RADEON_CURSOR_WIDTH. 2010-06-11 15:53:18 +10:00
Dave Airlie
9a117f768c radeon: set proper stride for cursor in tiling flags.
definitely incorrect, but hope it doesn't break anything.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-06-11 14:28:24 +10:00
Alex Deucher
1971dc6d75 radeon: fix rn50 cloning with kms
Since they only have one crtc sometimes the xserver doesn't assign
a crtc to one of the outputs even though both outputs have common modes
which results in only one monitor being enabled. Assign a crtc in
preinit so that both outputs light up.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-06-08 11:18:28 -04:00
Dave Airlie
426114b4a9 xv: fix Xv on M6/RV100 under KMS.
pRADEONEnt->HasCRTC2 wasn't setup under KMS.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-06-08 11:36:01 +10:00
Alex Deucher
f64bf0de8e evergreen: explicitly disable accel on evergreen
Previously we relied on the drm not having accel enabled
to make sure evergreen used shadowfb, now we when we enable
accel in the drm, we need to make sure the ddx doesn't try
and use it until it's implemented.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-06-03 14:48:21 -04:00
Marek Olšák
428125c095 r3xx-r5xx: enable color tiling by default on KMS
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-05-18 21:39:28 -04:00
Jerome Glisse
30591320ec kms: add support for the MSC swap & sync API
This patch is mostly a port over of Intel ddx code for
MSC support. It needs a radeon KMS module with version
2.4 which has the query for hw crtc id.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-05-10 15:23:24 +02:00
Dave Airlie
a69e749d05 kms: add uevent support.
When we get a hotplug event from the kernel we should notify the client side to reconfigure displays.

based on work by ajax in intel driver.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-16 13:58:54 +10:00
Dave Airlie
a0683be5cc radeon: avoid using DRI1 init path on DRI2 driver.
I was playing with multi-seat and found this code, fixed
it up to be sane and more DRI2 like.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-18 12:36:25 +10:00
Matt Turner
c7e81d2f3a Use/define RADEON_GPU_PAGE_SIZE instead of sprinkling 4096 everywhere.
Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some
RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x,
RADEON_GPU_PAGE_SIZE) since this is really what was intended.

CC: Jerome Glisse <jglisse@redhat.com>
CC: Alex Deucher <alexdeucher@gmail.com>
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-26 14:50:15 -05:00
James Le Cuirot
b499eee750 clean up kms zaphod handling
Taken from James patch on bug 24523

agd5f: adapt to the current code
2010-02-25 21:13:18 -05:00
Dave Airlie
bd83e5f1c7 zaphod: hopefully fix kms + zaphod 2010-02-23 19:27:24 +10:00
Alex Deucher
579cdcf9b4 radeon: add ZaphodHeads option
Allows users that want to use zaphod mode to select
which xrandr outputs are assigned to which head.  E.g.,

Option "ZaphodHeads" "LVDS,VGA-0"
will assign LVDS to the first zaphod driver instance
and VGA-0 to the second instance.
2010-02-17 12:34:53 -05:00
Alex Deucher
e5933fd749 KMS: fix no accel option
NO_ACCEL wasn't handled correctly with KMS.

fixes fdo bug 26198
2010-01-25 13:28:34 -05:00
Dave Airlie
ba99a82ced radeon/kms: only enable EXA pixmaps under kms if we support render accel
I've seen RN50s with 64MB of RAM that are slow as molasses, this
should fix them.

RH bug 556400

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-25 13:50:13 +10:00
Dave Airlie
88a50a30df r600: fix multi-operation in single batch support.
This ports the mesa DMA buffer handling with the 3 lists,

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-01 13:40:45 +10:00
Dave Airlie
a8dbf7c234 r600/accel: cleanup and merge a lot of the accel functions
All of the drawing ops were the exact same modulo the vtx size,
this along with the vertex buffer wrapping code could all be consolidated
into a smaller set of functions.

This also adds 2 VBO which we switch between, and merges a #define to
enable the multiple operations in one CS under KMS mode.

Multi-operation still isn't working though.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-27 14:10:23 +10:00
Dave Airlie
8b28534bcf radeon/exa: change option to determine exa pixmap usage.
This moves to a boolean instead of using VRAM sizing.

as per Michel's suggestions on list.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25 13:24:44 +10:00
Dave Airlie
3d8dcbc293 kms: flush cs on close screen.
this is needed for server recycle.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25 11:43:57 +10:00
Dave Airlie
3a460a14b9 r600: refactor code to help future acceleration speedups.
This changes the vertex buffer index to be an offset, and
records the start of the vb for each operation and uses
that to set the operations up.

This still flushes after each operation to make sure we have
no regressions in non-kms/kms cases.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25 10:35:37 +10:00
Dave Airlie
ba76acc76e radeon/kms: drop special r600 indirect flush
This just merges it with the main kms cs flush
2009-11-24 15:38:47 +10:00
Dave Airlie
3d7888aa04 radeon: fix warning in printf 2009-11-23 15:26:15 +10:00
Dave Airlie
e20af9c949 radeon: avoid using hw pixmaps when we have little VRAM.
This patch returns NULL for pixmap creation when we are using
mixed pixmaps and the pixmap has a size.

The size check is necessary for the front buffer.

We add a flag to force pixmap creation for certain pixmaps
that need to be hw, like the DRI2 and Xv ones.

Idea from Michel and workarounds from Ben Skeggs.

v2: add Option "EXALowVRAM" to allow configuring this, value in MBs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-23 13:04:44 +10:00
Dave Airlie
eb9bc133fc kms: recalculate the flush limits after screen resize.
When we resize the front buffer we need to reduce the flush limits
appropriately.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-20 10:15:00 +10:00
Luca Tettamanti
f0d9d80fee Disable color tiling on r600/r700
Not supported yet.
2009-10-24 16:45:23 -04:00
Dave Airlie
a956d47804 Revert "kms: setup colormap and gamma correctly."
This reverts commit 60d9685abd.

which breaks colormap on 1.6 X server

Conflicts:

	src/drmmode_display.c
2009-10-09 20:08:31 +10:00
Jerome Glisse
457646d734 kms: assume accel is working is info ioctl return -EINVAL
-EINVAL should only happen if the info ioctl doesn't support
the get accel query. This patch assume that on such case accel
is working.
2009-10-05 15:52:42 +02:00
Dave Airlie
60d9685abd kms: setup colormap and gamma correctly.
We need to program the gamma at modeset. no need to use
old cmap interface at all.
2009-10-05 12:41:30 +10:00
Michel Dänzer
9460ea864b Fix KMS on big endian machines.
Requires at least xserver 1.7 to work properly.

Also make sure the front buffer is and stays tiled if colour tiling is enabled.
2009-10-03 16:33:33 +02:00
Michel Dänzer
6a3b75fae4 KMS: Don't hide HW cursor when it's updated.
Inspired by the intel driver; might avoid/reduce HW cursor flicker in some
cases.
2009-10-03 16:33:31 +02:00
Michel Dänzer
c4ba15b487 Fix some compiler warnings. 2009-10-03 16:33:31 +02:00
Jerome Glisse
d302481493 radeon/kms: fallback to shadowfb if kernel report acceleration is off
This will fallback to shadowfb is GPU accel failed somewhere during
KMS kernel init.
2009-09-30 23:03:49 +02:00
Alex Deucher
579070ed9f kms: disable dga
Can be dangerous with kms:
http://lists.freedesktop.org/archives/xorg-devel/2009-September/002113.html
2009-09-19 19:15:14 -04:00
Alex Deucher
da7487f6ac kms: init dga using xf86DiDGAInit
fixes cursor problems in games like UT2004 and Penumbra Overture

see fdo bug 24034
2009-09-19 13:08:02 -04:00
Alex Deucher
65852de027 r6xx/r7xx EXA: WIP 2009-08-25 17:29:42 -04:00
Jerome Glisse
1c909ecd88 radeon: Fix X recycling with KMS
On X recycling CloseScreen drop master so grab it again
in InitScreen and avoid to reallocate buffer & various
others cs/bo utilities on X recycling.
2009-08-25 11:24:13 +02:00
Dave Airlie
72e0d1b2cb radeon/kms: add initial colortiling support (disabled by default).
This requires an X server from git with createpixmap2 support fixed up in it.

On 1.6 and previous it won't do any tiling, if you are running git server
please upgrade to latest git.

Option "AllowColorTiling" "true" to enable and do some testing
2009-08-19 19:03:03 +10:00
Michel Dänzer
cd99d9f0d7 Properly let radeon_cs_flush_indirect() re-emit 2D state if necessary.
Also remove a superfluous assignment.
2009-08-07 11:56:50 +02:00
Jerome Glisse
2afc46fa74 radeon: fix KMS shadowfb for r6xx and newer hw.
We need to map front buffer and also to avoid EXA initialization
when falling back to shadowfb on newer r6xx/r7xx when KMS is enabled.
2009-07-23 20:15:08 +02:00
Michel Dänzer
e38305aebd Also drop DRM master in KMS CloseScreen.
The LeaveVT hook isn't always called when the server dies, e.g. when quitting
from the GDM greeter. This may cause existing servers to fall over if the dying
server process still exists when they try to re-acquire master and set a mode.

Also use drmSet/DropMaster() rather than ioctl() directly.
2009-07-18 22:23:45 +02:00
Dave Airlie
98824f37fc radeon: move state changes into flush function 2009-07-06 15:29:53 +10:00
Dave Airlie
503b513432 radeon: taken from kms-support + CS fixes commit.
re-emit 2D state and reset 3D state emit on flush
2009-07-06 15:20:13 +10:00
Dave Airlie
d78d505918 radeon: port to new space checking in libdrm interface
This uses a new libdrm interface which shares code with mesa.

It also fixes the bo to flush when full instead of never flushing.

It survives gtkperf -a here which the driver didn't before now
2009-07-06 15:11:15 +10:00
Dave Airlie
9d09206023 kms: drop DGA 2009-07-02 15:17:03 +10:00
Dave Airlie
ac1607bb23 kms: no need to reference fifo slots 2009-07-02 14:55:05 +10:00
Dave Airlie
1782ce2895 radeon: add KMS support (still disabled)
This adds DRI2 + KMS + driver pixmaps support to the driver.

I've decided to just do a completely separate KMS driver file
instead of hacking the crap out of radeon_driver.c. So now
I do the KMS check in radeon_probe.c time and set the DDX
pointed up to a completely different set at this stage.

This avoids a lot of if (kms) type crap in the code at
the expense of making sure we make changes to both files
if necessary.

This code is still disabled in configure.ac as I broke EXA composite
rendering somehow in KMS mode
2009-07-02 14:43:01 +10:00