aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-15 19:48:54 -0400
committerDave Airlie <airlied@redhat.com>2018-07-15 19:49:22 -0400
commit2757de4c098616a3da29f149bd2b7f0842989830 (patch)
tree51b01ed1d52e09f2db3104e6213a6b7846e5f76c /drivers
parente280057762cd553a6863b7e3a73f5040ed879a15 (diff)
parent5265f0338bc0feec6c0d544dfe005dec1a93cb93 (diff)
Merge tag 'drm/tegra/for-4.18-rc5' of git://anongit.freedesktop.org/tegra/linux into drm-fixes
drm/tegra: Fixes for v4.18-rc5 This contains a couple of one- or two-line fixes for various minor issues in the Tegra driver. Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180712070142.15571-1-thierry.reding@gmail.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/tegra/drm.c2
-rw-r--r--drivers/gpu/host1x/dev.c3
-rw-r--r--drivers/gpu/host1x/job.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 776c1513e582..a2bd5876c633 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -398,7 +398,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
398 * unaligned offset is malformed and cause commands stream 398 * unaligned offset is malformed and cause commands stream
399 * corruption on the buffer address relocation. 399 * corruption on the buffer address relocation.
400 */ 400 */
401 if (offset & 3 || offset >= obj->gem.size) { 401 if (offset & 3 || offset > obj->gem.size) {
402 err = -EINVAL; 402 err = -EINVAL;
403 goto fail; 403 goto fail;
404 } 404 }
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index f1d5f76e9c33..d88073e7d22d 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -218,6 +218,9 @@ static int host1x_probe(struct platform_device *pdev)
218 return err; 218 return err;
219 } 219 }
220 220
221 if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL))
222 goto skip_iommu;
223
221 host->group = iommu_group_get(&pdev->dev); 224 host->group = iommu_group_get(&pdev->dev);
222 if (host->group) { 225 if (host->group) {
223 struct iommu_domain_geometry *geometry; 226 struct iommu_domain_geometry *geometry;
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index e2f4a4d93d20..527a1cddb14f 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -569,7 +569,8 @@ void host1x_job_unpin(struct host1x_job *job)
569 for (i = 0; i < job->num_unpins; i++) { 569 for (i = 0; i < job->num_unpins; i++) {
570 struct host1x_job_unpin_data *unpin = &job->unpins[i]; 570 struct host1x_job_unpin_data *unpin = &job->unpins[i];
571 571
572 if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) && host->domain) { 572 if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) &&
573 unpin->size && host->domain) {
573 iommu_unmap(host->domain, job->addr_phys[i], 574 iommu_unmap(host->domain, job->addr_phys[i],
574 unpin->size); 575 unpin->size);
575 free_iova(&host->iova, 576 free_iova(&host->iova,