Commit Graph

85 Commits (63f51fc4d34814c80d452e03814b5b495548987b)

Author SHA1 Message Date
Samuel Li 3bdf1f78d8 radeon: add Mullins pci ids
Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-05-02 11:05:31 -04:00
Samuel Li c2bc8ad438 radeon: add Mullins chip family
Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-05-02 11:05:20 -04:00
Alex Deucher e8cbc57965 radeon: fix sumo2 pci id
0x9649 is sumo2, not sumo.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-12-24 15:19:34 -05:00
Alex Deucher 1543c96e15 radeon: avoid possible divide by 0 in surface manager
Some users report hitting a divide by 0 with the tile split in
certain apps.  Tile_split shouldn't ever be 0 unless the surface
structure was not properly initialized.  I think there may be some
cases where mesa uses an improperly initialized surface struct,
but I haven't had time to track it down.

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-12-24 15:17:06 -05:00
Michel Dänzer c8a437f4c7 radeon: Update unaligned offset for 2D->1D tiling transition on SI
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71983

Tested-by: Arek Ruśniak <arek.rusi@gmail.com>
2013-11-26 18:16:03 +09:00
Marek Olšák 3f46489022 radeon: handle P16 pipe configs for Hawaii 2013-11-23 00:35:42 +01:00
Michel Dänzer f0e399d8f0 radeon: don't overallocate stencil by 4 on SI and CIK
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2013-11-23 00:35:42 +01:00
Marek Olšák 67d92404d6 radeon: implement 2D tiling for CIK
Bug fixes and simplification by Marek.
We have to use the tile index of 0 for non-MSAA depth-stencil after all.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-23 00:35:39 +01:00
Michel Dänzer ce8af45425 radeon: fix mipmap level 0 and 1 alignment for SI and CIK
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-23 00:35:34 +01:00
Alex Deucher 1a84eea45b radeon: add hawaii pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-13 11:33:31 -05:00
Alex Deucher efcc456030 radeon: add hawaii chip family
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-13 11:33:21 -05:00
Marek Olšák 75f747b919 radeon: fix pitch alignment for non-power-of-two mipmaps on SI
This fixes VM protection faults.

I have a new piglit test which can iterate over all possible widths, heights,
and depths (including NPOT) and tests mipmapping with various texture targets.

After this is committed, I'll make a new release of libdrm and bump
the libdrm version requirement in Mesa.
2013-09-29 14:44:23 +02:00
Michel Dänzer a48d6e5621 radeon: Fix tiling mode index for 1D tiled depth/stencil surfaces on CIK
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-18 18:28:51 +02:00
Alex Deucher 58d0088831 radeon: pad CS to 8 DW
Aligns the IB to 8 DWs.  The aligns the IB to the
CP fetch size.  r6xx also require at least 4 DW
alignment to avoid a hw bug.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-06 15:58:56 -04:00
Alex Deucher 8a2e0fa917 radeon: add berlin pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-06 15:39:37 -04:00
Alex Deucher 378bb47a78 radeon: add kabini pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28 14:44:17 -04:00
Alex Deucher 96c04c23fc radeon: add Bonaire pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28 14:44:10 -04:00
Alex Deucher 0ff7f2760d radeon: add CIK chip families
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28 14:44:02 -04:00
Mark Kettenis a0178c00c7 radeon: correct RADEON_GEM_WAIT_IDLE use
RADEON_GEM_WAIT_IDLE is declared DRM_IOW but libdrm
uses it with drmCommandWriteRead instead of drmCommandWrite
which leads to the ioctl being unmatched and returning an
error on at least OpenBSD.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
2013-06-06 16:19:38 +02:00
Marek Olšák e5e51c2110 radeon: add RADEON_SURF_FMASK flag which disables 2D->1D tiling transition
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-15 19:15:42 +02:00
Alex Deucher 96e90aabc4 radeon: add HAINAN pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-13 16:16:14 -04:00
Alex Deucher c56729cc15 radeon: add HAINAN family
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-13 16:16:08 -04:00
Alex Deucher ec3c257eb6 radeon: add new richland pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-25 14:13:52 -04:00
Alex Deucher 439d7d7432 radeon: add new SI pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-25 14:12:50 -04:00
Jerome Glisse a36cdb858e radeon: add si tiling support v5
v2: Only writte tile index if flags for it is set
v3: Remove useless allow2d scanout flags
v4: Split radeon_drm.h update to its own patch
v5: update against lastest next tree for radeon

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-04-12 09:46:40 -04:00
Alex Deucher 36a2daad24 radeon: add pci ids for Richland APUs
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-03-08 14:12:32 -05:00
Jerome Glisse ade2ad2d66 radeonsi: make sure tile_split field are not garbage
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2013-03-07 09:47:16 -05:00
Alex Deucher 353f073bc1 radeon: add OLAND pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-04 15:03:55 -05:00
Alex Deucher 76ae1f4837 radeon: add OLAND family
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-04 15:03:46 -05:00
Michel Dänzer 303ca37e72 radeon: Fix 1D tiling layout on SI.
Very similar to Evergreen, but slightly different rules for tile / slice
alignment. Fortunately, these map quite naturally onto the previous fixes for
linear aligned layout on SI.

2D tiling still needs more work here and possibly in the kernel.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-18 20:24:35 +01:00
Jerome Glisse 0980633afd drm/radeon: track global bo name and always return the same
To avoid kernel rejecting cs if we return different global name
for same bo keep track of global name and always return the same.
Seems to fix issue with suspend/resume failing and repeatly printing
following message :
[drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -35!

There might still be way for a rogue program to trigger this issue.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-11-28 10:41:26 -05:00
Alex Deucher 171666e4b8 radeon: add new SI pci id
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-11-21 18:45:14 -05:00
Marek Olšák e32fff8e9e radeon: fix tile_split of 128-bit surface formats with 8x MSAA
The calculation led to the number 8192, which is too high.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-26 20:00:59 +02:00
Andreas Boll bc494b310d radeon: fix unused-function warning
radeon_cs_gem.c:333:13: warning: 'cs_gem_dump_bof' defined but
not used [-Wunused-function]

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 18:25:58 +02:00
Alex Deucher a4cb7233a8 radeon: add some new SI pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-16 12:58:39 -04:00
Marek Olšák 1aebfdc112 radeon: fix stencil miptree allocation of combined ZS buffers on EG and SI
This allows texturing with depth-stencil buffers directly without the copy
to CB. The separate miptree description for stencil is added, because
the stencil mipmap offsets are not really depth offsets/4 (at least
for the texture units).

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-06 05:45:56 +02:00
Marek Olšák 77413e77b8 radeon: don't force stencil tile split to 0
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-06 05:45:26 +02:00
Marek Olšák b3d90bbc1d radeon: don't take the stencil-specific codepath for buffers without stencil
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-03 17:52:44 +02:00
Michel Dänzer b925022a3e radeon: Sampling pitch for non-mipmaps seems padded to slice alignment on SI.
Another corner case that isn't well-explained yet.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-09-06 15:25:13 +02:00
Michel Dänzer 45083e6d36 radeon: Memory footprint of SI mipmap base level is padded to powers of two.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-09-06 15:24:44 +02:00
Michel Dänzer 8572444fd0 radeon: Fix layout of linear aligned mipmaps on SI.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-09-05 18:47:49 +02:00
Marek Olšák 853429b939 radeon: align r600 msaa buffers to a multiple of macrotile size * num samples
I am not sure whether this is needed, but better be safe than sorry.
2012-08-24 16:51:14 +02:00
Marek Olšák 58545722d0 radeon: fix allocation of MSAA surfaces on r600-r700
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-24 16:51:14 +02:00
Dave Airlie 3163cfe4db radeon: add prime import/export support
this adds radeon version of the prime import/export support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-14 11:04:56 +10:00
Marek Olšák 128803a107 radeon: tweak TILE_SPLIT for MSAA surfaces
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-09 22:35:07 +02:00
Marek Olšák e14aedce64 radeon: force 2D tiling for MSAA surfaces
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-09 22:33:00 +02:00
Marek Olšák 2337295573 radeon: optimize allocation for depth w/o stencil and stencil w/o depth on EG
If we don't need stencil, don't allocate it.
If we need only stencil (like PIPE_FORMAT_S8_UINT), don't allocate depth.

v2: actually do it correctly

Reviewed-by: Christian König <christian.koenig@amd.com>
2012-08-09 16:37:20 +02:00
Marek Olšák ad66c17209 radeon: simplify ZS buffer checking on r600
Setting those flags has no effect anywhere else.

Reviewed-by: Christian König <christian.koenig@amd.com>
2012-08-09 16:37:20 +02:00
Alex Deucher 9f823ca236 radeon: add some new SI pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-06 10:34:59 -04:00
Alex Deucher dd944a0081 radeon: add some missing evergreen pci ids
Noticed by: Harald van Dijk <fdo@gigawatt.nl>

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-06 10:33:56 -04:00