Merge "qseecom: set 64bit dma mask" into msm-4.14

This commit is contained in:
Linux Build Service Account 2018-04-09 19:15:37 -07:00 committed by Gerrit - the friendly Code Review server
commit 64d2e2e386

View File

@ -3565,12 +3565,14 @@ static int __qseecom_update_cmd_buf(void *msg, bool cleanup,
}
}
/* Deallocate the kbuf */
if (!IS_ERR(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
sg_ptr = NULL;
dmabuf = NULL;
attach = NULL;
}
return ret;
err:
if (!IS_ERR(sg_ptr))
if (!IS_ERR_OR_NULL(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
return -ENOMEM;
}
@ -3794,8 +3796,10 @@ cleanup:
}
}
/* unmap the dmabuf */
if (!IS_ERR(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
sg_ptr = NULL;
dmabuf = NULL;
attach = NULL;
}
return ret;
err:
@ -3806,7 +3810,7 @@ err:
data->client.sec_buf_fd[i].size,
data->client.sec_buf_fd[i].vbase,
data->client.sec_buf_fd[i].pbase);
if (!IS_ERR(sg_ptr))
if (!IS_ERR_OR_NULL(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
return -ENOMEM;
}
@ -6560,12 +6564,14 @@ clean:
data->sglist_cnt = i + 1;
}
/* unmap the dmabuf */
if (!IS_ERR(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
sg_ptr = NULL;
dmabuf = NULL;
attach = NULL;
}
return ret;
err:
if (!IS_ERR(sg_ptr))
if (!IS_ERR_OR_NULL(sg_ptr))
qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
return -ENOMEM;
}
@ -8558,6 +8564,12 @@ static int qseecom_probe(struct platform_device *pdev)
qseecom.pdev = class_dev;
qseecom.dev = &pdev->dev;
rc = dma_set_mask(qseecom.dev, DMA_BIT_MASK(64));
if (rc) {
pr_err("qseecom failed to set dma mask\n", rc);
goto exit_del_cdev;
}
/* register client for bus scaling */
if (pdev->dev.of_node) {
qseecom.pdev->of_node = pdev->dev.of_node;