summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/drm/gr2d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-07-08 13:40:34 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-07-08 13:40:34 +1000
commit06d5a24f08831e167fae42a64ef2083a89f8e617 (patch)
tree509ef5096fcf1b32029b912afba9a2c1ce9067d9 /drivers/gpu/host1x/drm/gr2d.c
parentd2989b534ef6834ebf2425aecc040b894b567c91 (diff)
parent7c6ca3040e9ac174e6d2189811da603e9c19a150 (diff)
downloadtalos-op-linux-06d5a24f08831e167fae42a64ef2083a89f8e617.tar.gz
talos-op-linux-06d5a24f08831e167fae42a64ef2083a89f8e617.zip
Merge remote-tracking branch 'airlied/drm-next' into drm-nouveau-next
Diffstat (limited to 'drivers/gpu/host1x/drm/gr2d.c')
-rw-r--r--drivers/gpu/host1x/drm/gr2d.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c
index 6a45ae090ee7..27ffcf15a4b4 100644
--- a/drivers/gpu/host1x/drm/gr2d.c
+++ b/drivers/gpu/host1x/drm/gr2d.c
@@ -84,7 +84,7 @@ static struct host1x_bo *host1x_bo_lookup(struct drm_device *drm,
gem = drm_gem_object_lookup(drm, file, handle);
if (!gem)
- return 0;
+ return NULL;
mutex_lock(&drm->struct_mutex);
drm_gem_object_unreference(gem);
@@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
goto fail;
bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
- if (!bo)
+ if (!bo) {
+ err = -ENOENT;
goto fail;
+ }
host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset);
num_cmdbufs--;
@@ -158,8 +160,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
reloc->cmdbuf = cmdbuf;
reloc->target = target;
- if (!reloc->target || !reloc->cmdbuf)
+ if (!reloc->target || !reloc->cmdbuf) {
+ err = -ENOENT;
goto fail;
+ }
}
err = copy_from_user(job->waitchk, waitchks,
@@ -281,7 +285,7 @@ static int gr2d_probe(struct platform_device *pdev)
if (!gr2d->channel)
return -ENOMEM;
- *syncpts = host1x_syncpt_request(dev, 0);
+ *syncpts = host1x_syncpt_request(dev, false);
if (!(*syncpts)) {
host1x_channel_free(gr2d->channel);
return -ENOMEM;
OpenPOWER on IntegriCloud