diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-17 00:43:56 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-11-17 00:43:56 +0100 |
commit | b7c0e47d98249c2ddf21ea197b651093c6aaee00 (patch) | |
tree | 2209b84a346d987d65332016738a488ef1501b82 /drivers/gpu/drm/vc4/vc4_gem.c | |
parent | Merge branch 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm i... (diff) | |
parent | drm/vc4: Add fragment shader threading support (diff) | |
download | linux-b7c0e47d98249c2ddf21ea197b651093c6aaee00.tar.xz linux-b7c0e47d98249c2ddf21ea197b651093c6aaee00.zip |
Merge tag 'drm-vc4-next-2016-11-16' of https://github.com/anholt/linux into drm-next
This pull request brings in fragment shader threading and ETC1 support
for vc4.
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_gem.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_gem.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 47a095f392f8..db920771bfb5 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -544,14 +544,15 @@ vc4_cl_lookup_bos(struct drm_device *dev, handles = drm_malloc_ab(exec->bo_count, sizeof(uint32_t)); if (!handles) { + ret = -ENOMEM; DRM_ERROR("Failed to allocate incoming GEM handles\n"); goto fail; } - ret = copy_from_user(handles, - (void __user *)(uintptr_t)args->bo_handles, - exec->bo_count * sizeof(uint32_t)); - if (ret) { + if (copy_from_user(handles, + (void __user *)(uintptr_t)args->bo_handles, + exec->bo_count * sizeof(uint32_t))) { + ret = -EFAULT; DRM_ERROR("Failed to copy in GEM handles\n"); goto fail; } @@ -708,8 +709,10 @@ vc4_complete_exec(struct drm_device *dev, struct vc4_exec_info *exec) } mutex_lock(&vc4->power_lock); - if (--vc4->power_refcount == 0) - pm_runtime_put(&vc4->v3d->pdev->dev); + if (--vc4->power_refcount == 0) { + pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev); + pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev); + } mutex_unlock(&vc4->power_lock); kfree(exec); |