diff options
author | Christopher James Halse Rogers <raof@ubuntu.com> | 2013-11-25 14:59:10 +1100 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2013-12-10 09:46:45 +0100 |
commit | db687011e00b607a619a04710567bd091702cb49 (patch) | |
tree | 2fda2d47ee6ab662d443183595856aac030f64ba /src/gallium/targets/radeonsi | |
parent | bff6c5d2b59815426e849ba079e90e6d350385da (diff) | |
download | external_mesa3d-db687011e00b607a619a04710567bd091702cb49.zip external_mesa3d-db687011e00b607a619a04710567bd091702cb49.tar.gz external_mesa3d-db687011e00b607a619a04710567bd091702cb49.tar.bz2 |
gallium/radeon: Implement hooks for DRI Image 7 (v2)
v2: Fix transliteration of lseek arguments
Ignore busy return from RADEON_GEM_BUSY ioctl; we're only after the domain
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'src/gallium/targets/radeonsi')
-rw-r--r-- | src/gallium/targets/radeonsi/common/drm_target.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/targets/radeonsi/common/drm_target.c b/src/gallium/targets/radeonsi/common/drm_target.c index 9eef368..08ff47d 100644 --- a/src/gallium/targets/radeonsi/common/drm_target.c +++ b/src/gallium/targets/radeonsi/common/drm_target.c @@ -55,11 +55,27 @@ static const struct drm_conf_ret throttle_ret = { .val.val_int = 2, }; +/* Technically this is only true for kernels >= 3.12, which + * support lseek on dma-buf fds. + * + * We could check for this in create_screen and return the correct + * value, but for now just return true in all cases. + * + * createImageFromFds fails gracefully on kernel < 3.12, so this + * shouldn't be a huge problem. + */ +static const struct drm_conf_ret share_fd_ret = { + .type = DRM_CONF_BOOL, + .val.val_int = true, +}; + static const struct drm_conf_ret *drm_configuration(enum drm_conf conf) { switch (conf) { case DRM_CONF_THROTTLE: return &throttle_ret; + case DRM_CONF_SHARE_FD: + return &share_fd_ret; default: break; } |