diff options
author | Thomas Hellstrom <[email protected]> | 2013-11-21 15:11:46 +1100 |
---|---|---|
committer | Maarten Lankhorst <[email protected]> | 2013-12-10 09:46:51 +0100 |
commit | 1e71493afa263791b2ff10afd2fbc36a7effa73f (patch) | |
tree | c4975ea38a376c38a501cb51723456f5b18d22b9 /src/gallium/targets/dri-vmwgfx | |
parent | db687011e00b607a619a04710567bd091702cb49 (diff) |
svga/winsys: Implement surface sharing using prime fd handles
This needs a prime-aware vmwgfx kernel module to work properly.
(With additions by Christopher James Halse Rogers <[email protected]>)
Signed-off-by: Christopher James Halse Rogers <[email protected]>
Signed-off-by: Thomas Hellstrom <[email protected]>
Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/targets/dri-vmwgfx')
-rw-r--r-- | src/gallium/targets/dri-vmwgfx/target.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c index e01e4652ada..aaf37b0c4fc 100644 --- a/src/gallium/targets/dri-vmwgfx/target.c +++ b/src/gallium/targets/dri-vmwgfx/target.c @@ -31,11 +31,24 @@ static const struct drm_conf_ret throttle_ret = { .val.val_int = 2, }; +/* Technically this requires kernel support that is not yet + * widespread. + * + * We could check for support in create_screen and return the correct + * value, but for now just return true in all cases. + */ +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; } |