Commit Graph

9 Commits (3586337f3703ce4833a375f66b08df064a1cec28)

Author SHA1 Message Date
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
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 8420743301 radeon: silence valgrind warnings by zeroing memory 2010-12-02 04:17:18 +01: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
Jerome Glisse 6bf1ed2979 radeon: indentation & trailing space cleanup 2010-01-14 11:24:16 +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 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00