Commit Graph

134 Commits (ebbb8f9cbfc3b51d52e6fe3b146ea824030eb48a)

Author SHA1 Message Date
Jerome Glisse d1fcfb17b9 radeon: force 1D array mode for z/stencil surface
On r6xx or evergreen z/stencil surface don't support linear or
linear aligned surface, force 1D tiled mode for those.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-06-12 18:09:55 -04:00
Jerome Glisse 2f56002cc0 radeon: enabled 2D tiling for evergreen only on fixed kernel
Due to a kernel bug, enabled 2D tiling for evergreen only on
newer fixed kernel.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-06-11 15:04:45 -04:00
Jerome Glisse 325e2e52a9 radeon: always properly initialize stencil_offset field
Reported-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-06-11 15:01:12 -04:00
Alex Deucher c2b77a02d4 radeon: fall back to 1D tiling only with broken kernels
Certain cards report the the wrong bank setup which causes
surface init to fail in the ddx and leads to no accel.
If we hit an invalid tiling parameter, just set a default
value and disable 2D tiling.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=43448

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-06-07 10:43:18 -04:00
Alex Deucher c563db07bf radeon: add new pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-06-05 10:07:15 -04:00
Michel Dänzer 481234f290 radeon: Add Southern Islands PCI IDs.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-05-16 18:49:44 +02:00
Anisse Astier cf7cc62a98 radeon: Add new R600 PCI ids for surface manager
This is the same list of PCI ids added by Alex Deucher in xf86-video-ati commit
aacbd629b02cbee3f9e6a0ee452b4e3f21376bd3.

This is needed since the addition of the surface allocator helper in
commit c51f7f0e46 ; it needs to differentiate
pre and post-R600 GPUs.
Therefore we should maintain another PCI id list.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=48138
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-05-10 13:07:59 -04:00
Alex Deucher c50cc24690 radeon: add TN surface support
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-03-20 19:33:09 -04:00
Jerome Glisse 9b3ad51ae5 radeon: fix pitch alignment for scanout buffer
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-13 20:46:43 -05:00
Michel Dänzer 2cfac57d36 radeon_cs_setup_bo: Fix accounting if caller specified write and read domains.
Only account for the write domain in that case.

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

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-02-08 10:50:55 +01:00
Jerome Glisse 356b87d8b3 radeon: add r600_pci_ids.h to header file
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06 15:22:14 -05:00
Jerome Glisse 10c0837780 radeon: fix surface API for good before anyone start relying on it
The mipmap level computation was wrong, we need to know the block
width, height, depth of compressed texture to properly compute this.
Change API to provide block width, height, depth instead of nblk_x,
nblk_y, nblk_z.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-03 14:42:47 -05:00
Jerome Glisse 6a720cb866 radeon: surface fix macro -> micro tile fallback
We need to force 1D tiling only on old kernel the fallback was
broken along the way.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-02 18:36:42 -05:00
Jerome Glisse c51f7f0e46 radeon: add surface allocator helper v10
The surface allocator is able to build complete miptree when allocating
surface for r600/r700/evergreen/northern islands GPU family. It also
compute bo size and alignment for render buffer, depth buffer and
scanout buffer.

v2 fix r6xx/r7xx 2D tiling width align computation
v3 add tile split support and fix 1d texture alignment
v4 rework to more properly support compressed format, split surface pixel
   size and surface element size in separate fields
v5 support texture array (still issue on r6xx)
v6 split surface value computation and mipmap tree building, rework eg
   and newer computation
v7 add a check for tile split and 2d tiled
v8 initialize mode value before testing it in all case, reenable
   2D macro tile mode on r6xx for cubemap and array. Fix cubemap
   to force array size to the number of face.
v9 fix handling of stencil buffer on evergreen
v10 on evergreen depth buffer need to have enough room for a stencil
    buffer just after depth one

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-01 17:11:29 -05:00
Marek Olšák 8420743301 radeon: silence valgrind warnings by zeroing memory 2010-12-02 04:17:18 +01:00
Eric Anholt b8c4e5836c Fix radeon distcheck. 2010-06-10 09:03:51 -07:00
Marek Olšák af98ccf4dd radeon: use the const qualifier in radeon_cs_write_table
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-04-26 20:09:34 +02:00
Jerome Glisse 78de69713d drm/radeon: add new cs command stream dumping facilities
Dump command stream + associated bo into a binary file
which follow a similar design as json file. It allows
to intercept a command stream and replay it in a standalone
program (see radeondb tools).
2010-04-08 17:53:09 +02:00
Jerome Glisse cc20ed8100 drm/radeon: tab/whitespace cleanup 2010-03-29 16:39:08 +02:00
Julien Cristau 976e779f9c Install headers to $(includedir)/libdrm
Avoids conflicts with kernel headers.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-03-17 12:45:46 -07:00
Pauli Nieminen 966c9907c0 libdrm_radeon: Optimize cs_gem_reloc to do less looping.
bo->referenced_in_cs is checked if bo is already in cs. Adding and removing
reference in bo is done with atomic operations to allow parallel access to a
bo from multiple contexts.

cs->id generation code quarentees there is not duplicated ids which limits
number of cs->ids to 32. If there is more cs objects rest will get id 0.

V2:
 - Fix configure to check for atomics operations if libdrm_radeon is only selected.
 - Make atomic operations private to libdrm.

This optimization decreases cs_write_reloc share of torcs profiling from 4.3%
to 2.6%.

Tested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2010-03-17 12:42:21 +02:00
Marek Olšák 4b6f70f20c radeon: add square-tiling flag 2010-02-18 06:14:55 +01:00
Pauli Nieminen 1802e1a4e7 libdrm/radeon: Fix section size mismatch to reset the section.
If there is section size mismatch reusing the section object
makes section start fail.
Reseting the object before doing error checking prevents the
possible flood of errors.
2010-02-04 12:14:37 +10:00
Dave Airlie 520c658706 radeon: enable by default now that kms is out of staging 2010-02-02 10:58:50 +10:00
Jerome Glisse 320811b282 radeon: get device id from the kernel, use it in cs_print
This allow external tools to know for which asics a cs
is destinated to.
2010-01-14 20:01:55 +01:00
Jerome Glisse 2612371a62 radeon: simpler cs print function
We don't intend libdrm-radeon to become clever enough to
decode cs for all GPU we support. Better to let an external
tool do the job. This will print raw cs in an easy to parse
way.
2010-01-14 12:28:20 +01:00
Jerome Glisse 74937cda17 radeon: indentation + trailing space cleanup 2010-01-14 11:28:25 +01:00
Jerome Glisse 6bf1ed2979 radeon: indentation & trailing space cleanup 2010-01-14 11:24:16 +01:00
Jerome Glisse b06cb754a1 radeon: indentation + trailing space cleanup 2010-01-14 11:10:45 +01:00
Dave Airlie 6de39fc730 radeon: fix BO null check, should be in higher level fn 2009-12-21 14:59:48 +10:00
Dave Airlie 125994ab30 radeon: straighten out the API insanity.
as Michel pointed out we are exposing too much info for these object
for this to be maintainable going forward.

This patch set minimises the exposed parts of the radeon_bo and
radeon_cs objects to the piece necessary for ddx/mesa to operate
at a decent speed.

The major problem is mesa contains a legacy BO/CS managers which we still
need to expose functionality to, and we really cannot change the API
until we can drop the non-KMS codepaths.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-21 08:05:16 +10:00
Jerome Glisse b84314a86e radeon: Use drmIoctl so we restart ioctl on EINTR or EAGAIN
This is needed as change in kernel will lead to ioctl returning
EINTR if they are interrupted.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2009-12-07 18:30:52 +01:00
Kristian Høgsberg 10ce0ec188 Merge remote branch 'origin/master' into libdrm 2009-11-20 17:09:03 -05:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00