History log of /drivers/gpu/drm/radeon/r600_cp.c
Revision Date Author Comments
86c1fbd55c6abc72496a45b7cbf1940324983977 10-Sep-2014 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h>

And replace the drm_core_ prefix with drm_legacy_ since really, this
isn't core stuff.

Also drop drm_core_dropmap since it's unused.

v2: Fix up i810.ko fully which somehow slipped through.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9fc5cde7fb6699b0a75e90b7cbfee7c912dd94c2 29-Aug-2014 David Herrmann <dh.herrmann@gmail.com> drm: mark drm_buf and drm_map as legacy

Move internal declarations to drm_legacy.h and add drm_legacy_*() prefix
to all legacy functions.

[airlied: add a bit of an explaination to drm_legacy.h]

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
1d6ac185c32134233f77ce44800ceb4ab9361401 11-Dec-2013 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Kill DRM_COPY_(TO|FROM)_USER

Less yelling ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
b72a8925fd5cc80107e3988536290d087b1079aa 10-Jul-2013 Daniel Vetter <daniel.vetter@ffwll.ch> drm/radeon: s/drm_order/order_base_2/

Last driver and pretty obviously a major user of this little function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
14adc89298f894816ea2f3aef4d8d2d6ede18575 21-Jan-2013 Christian König <christian.koenig@amd.com> drm/radeon: Deprecate UMS support v2

KMS support is out and stable for a couple of years now and
the userspace code has deprecated or abandoned the old UMS interface.

So make the KMS interface the default and deprecate the UMS interface
in the kernel as well.

v2: rebased on alex/drm-next-3.9-wip

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
ef8cf3a1c523afa499d15856e7db3844ad59d1fb 09-Nov-2012 Akinobu Mita <akinobu.mita@gmail.com> drm/radeon: Use hweight32

Use hweight32 instead of counting for each bit

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
760285e7e7ab282c25b5e90816f7c47000557f4f 02-Oct-2012 David Howells <dhowells@redhat.com> UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/

Convert #include "..." to #include <path/...> in drivers/gpu/.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
4126d5d61f8466be3f76c1bc4e16d46eb2c9641b 02-Oct-2012 David Howells <dhowells@redhat.com> UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/.

Remove redundant DRM UAPI header #inclusions from drivers/gpu/.

Remove redundant #inclusions of core DRM UAPI headers (drm.h, drm_mode.h and
drm_sarea.h). They are now #included via drmP.h and drm_crtc.h via a preceding
patch.

Without this patch and the patch to make include the UAPI headers from the core
headers, after the UAPI split, the DRM C sources cannot find these UAPI headers
because the DRM code relies on specific -I flags to make #include "..." work
on headers in include/drm/ - but that does not work after the UAPI split without
adding more -I flags.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
4de833c337509916b7931982734d858191cf0700 05-Apr-2012 Arnd Bergmann <arnd@arndb.de> drm/radeon: replace udelay with mdelay for long timeouts

Some architectures require that delays longer than a few
miliseconds are called through mdelay. This was triggered
on ARM randconfig builds.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15d3332f31afd571a6d23971dbc8d8db2856e661 15-Sep-2011 Christian König <deathsimple@vodafone.de> drm/radeon/kms: add support for semaphores v3

They are used to sync between rings, while fences
sync between a ring and the cpu.

v2 Fix radeon_semaphore_driver_fini when no semaphore were
allocated.

v3 Initialize list early on to avoid issue in case or early
error

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
e0cd3608135b2ed8eddbe3fdf048d22e0593d836 30-Aug-2011 Paul Gortmaker <paul.gortmaker@windriver.com> gpu: add module.h to drivers/gpu files as required.

So that we don't get build failures once the implicit module.h
presence is removed.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
df07d6999e4e502ff474eeafe11ea0055f4cd68d 13-Jul-2011 Benjamin Herrenschmidt <benh@kernel.crashing.org> drm/radeon: Writeback endian fixes

The writeback ring pointer and IH ring pointer are read using le32_to_cpu
so we do not want the chip to byteswap them on big-endian.

We still want to byteswap the ring itself and the IBs, so we don't touch
that but we remove setting of the byteswap bits in CP_RB_RPTR_ADDR and
IH_CNTL.

In general, for things like that where we control all the accessors easily,
we are better off doing the swap in SW rather than HW. Paradoxally, it does
keep the code closer to x86 and avoid using poorly tested HW features.

I also changed the use of RADEON_ to R600_ in a couple of cases to be more
consistent with the surrounding code.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
dee54c40a1a9898bcd156436a1d3524f530b5a90 12-Feb-2011 Cédric Cano <ccano@interfaceconcept.com> drm/radeon: 6xx/7xx non-kms endian fixes

agd5f: minor cleanups

Signed-off-by: Cédric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
a30f6fb7ce86275af16c7a00dc1b1e46cbb99692 10-Aug-2010 Benjamin Herrenschmidt <benh@kernel.crashing.org> drm/radeon: Fix pci_map_page() error checking

0 is a valid DMA address from pci_map_page(), use pci_dma_mapping_error()
instead to check for errors

[airlied: fix warning + two other places with errors.]

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
f867c60def7a8dcd86657fd38a8920a4354f305e 05-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: gfx init fixes for r6xx/r7xx

This fixes some issues with the last gfx init patch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
d03f5d5971f2dd4bd259c46e065299661d8fdc9f 19-Feb-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon: fixes for r6xx/r7xx gfx init

- updated swizzle modes for backend map setup
- fix programming of a few gfx regs
- properly handle pipe/backend setup on LE cards

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6271901d828b34b27607314026deaf417f9f9b75 19-Feb-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/rv740: fix backend setup

This patch fixes occlusion queries and rendering errors
on rv740 boards. Hardcoding the backend map is not an optimal
solution, but a better fix is being worked on.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6a660f06e8120977b25d30ace354c8f9dc3aff2a 19-Feb-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/rv740: fix backend setup

This patch fixes occlusion queries and rendering errors
on rv740 boards. Hardcoding the backend map is not an optimal
solution, but a better fix is being worked on.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
961fb597c17e2e4f55407d56b7211c188ab41eff 10-Feb-2010 Jerome Glisse <jglisse@redhat.com> drm/radeon/kms: r600/r700 command stream checker

This patch add cs checker to r600/r700 hw. Command stream checking
will rewrite some of the cs value in order to restrict GPU access
to BO size. This doesn't break old userspace but just enforce safe
value. It should break any things that was using the r600/r700 cs
ioctl to do forbidden things (malicious software), though we are
not aware of such things.

Here is the list of thing we check :
- enforcing resource size
- enforcing color buffer slice tile max, will restrict cb access
- enforcing db buffer slice tile max, will restrict db access

We don't check for shader bigger than the BO in which they are
supposed to be, such use would lead to GPU lockup and is harmless
from security POV, as far as we can tell (note that even checking
for this wouldn't prevent someone to write bogus shader that lead
to lockup).

This patch has received as much testing as humanly possible with
old userspace to check that it didn't break such configuration.
However not all the applications out there were tested, thus it
might broke some odd, rare applications.

[airlied: fix rules for cs checker for parallel builds]

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3ce0a23d2d253185df24e22e3d5f89800bb3dd1c 08-Sep-2009 Jerome Glisse <jglisse@redhat.com> drm/radeon/kms: add r600 KMS support

This adds the r600 KMS + CS support to the Linux kernel.

The r600 TTM support is quite basic and still needs more
work esp around using interrupts, but the polled fencing
should work okay for now.

Also currently TTM is using memcpy to do VRAM moves,
the code is here to use a 3D blit to do this, but
isn't fully debugged yet.

Authors:
Alex Deucher <alexdeucher@gmail.com>
Dave Airlie <airlied@redhat.com>
Jerome Glisse <jglisse@redhat.com>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
70967ab9c0c9017645d167d33675eab996633631 29-Aug-2009 Ben Hutchings <ben@decadent.org.uk> radeon: Use request_firmware()

Loosely based on a patch by
Jaswinder Singh Rajput <jaswinderlinux@gmail.com>.

KMS support by Dave Airlie <airlied@redhat.com>.

For Radeon 100- to 500-series, firmware blobs look like:
struct {
__be32 datah;
__be32 datal;
} cp_ucode[256];

For Radeon 600-series, there are two separate firmware blobs:
__be32 me_ucode[PM4_UCODE_SIZE * 3];
__be32 pfp_ucode[PFP_UCODE_SIZE];

For Radeon 700-series, likewise:
__be32 me_ucode[R700_PM4_UCODE_SIZE];
__be32 pfp_ucode[R700_PFP_UCODE_SIZE];

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6502fbfaf81b09b3f474bb7b3796257e9450273e 04-Aug-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: Add support for RS880 chips

These are new AMD IGP chips

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
715cbb05c935e8a4306a730d14a72d5af881523e 12-Jun-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: add support for RV790.

This adds the PCI IDs for the rv790 which are equiv to the rv770.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2a71ebcd85bcc4d6607f577f23a491f796c30e82 12-Jun-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: add rv740 drm support.

This adds drm support for the RV740 family of chips to the r600 support code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
029a2edbd36f5e34ff1aebfba1bca31b5ac9899e 30-Mar-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: load the right microcode on rs780

Copy/paste error. The RV670 microcode should work ok, so it's
not a show stopper.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
41f13fe81dd1b08723ab9f3fc3c7f29cfa81f1a5 16-Mar-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: fix logic in r600_page_table_init() to match ati_gart

This fixes page table init on rs600.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
06f0a488c1b642d3cd7769da66600e5148c3fad8 13-Mar-2009 Dave Airlie <airlied@redhat.com> drm/radeon: r600 ptes are 64-bit, cleanup cleanup function.

Signed-off-by: Dave Airlie <airlied@redhat.com>
d02f7fa77d97a28a4276939f35e44ae995ad13d7 10-Mar-2009 Dave Airlie <airlied@redhat.com> drm/radeon: fix r600 writeback across suspend/resume

This update was done in mainline radeon, but not in the r600.

Signed-off-by: Dave Airlie <airlied@redhat.com>
6546bf6d6cbf1f9ac350fd278a1d937d4bb9ad06 09-Mar-2009 Dave Airlie <airlied@redhat.com> drm/radeon: fix r600 writeback setup.

This fixes 2 bugs:
1. the AGP calculation wasn't consistent with the PCI(E) calc for the
RPTR_ADDR registers. This consolidates the writes and fixes it up.

2. The scratch address was being incorrectly calculated, this breaks
it out into a lot more linear steps.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8f497aade8df2a619eacda927a43ebe82167a84c 05-Mar-2009 Hannes Eder <hannes@hanneseder.net> drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c

Fix this sparse warning:
drivers/gpu/drm/radeon/r600_cp.c:1811:52: warning: Using plain integer as NULL pointer
drivers/gpu/drm/radeon/radeon_cp.c:1363:52: warning: Using plain integer as NULL pointer
drivers/gpu/drm/radeon/radeon_state.c:1983:61: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
a763d7dc0adb1159c1a52d43e566409da9fa59f0 08-Mar-2009 Dave Airlie <airlied@redhat.com> drm/radeon: fix r600 pci mapping calls.

This realigns the r600 pci mapping calls with the ati pcigart ones,
fixing the direction and using the correct interface.

Suggested by Jerome Glisse.

Signed-off-by: Dave Airlie <airlied@redhat.com>
08932156cc2d4f8807dc5ca5c3d6ccd85080610a 08-Mar-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
a7d13ad0e2c1b0572492fd53ca1a090794e2f8e2 26-Feb-2009 Dave Airlie <airlied@redhat.com> drm/r600: fix rptr address along lines of previous fixes to radeon.

Signed-off-by: Dave Airlie <airlied@redhat.com>
eb1d91954ededc00ddcfb51e2626f114ff351524 26-Feb-2009 Dave Airlie <airlied@redhat.com> drm/r600: fixup r600 gart table accessor like ati_pcigart.c

This attempts to fixup the r600 GART accessors so they work on other arches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
c1556f71513f2e660fb2bbdc29344361b1ebff35 25-Feb-2009 Alex Deucher <alexdeucher@gmail.com> radeon: add support for rs600 GPUs

RS600s are an AMD IGP for Intel CPUs, that look like RS690s from
a lot of perspectives but look like r600s from a memory controller
point of view.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7659e9804b7a66047433182d86393d38ba4eff79 25-Feb-2009 Alex Deucher <alexdeucher@gmail.com> radeon: fix r600 AGP support

This fixes the ioremap issues with r600 AGP.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
c05ce0834a268f7d18274847190f6ed826b99332 24-Feb-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon: add initial support for R6xx/R7xx GPUs

This adds support for 2D/Xv acceleration in the X.org 2D driver,
to the drm. It doesn't yet provide any 3D support hooks.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>