job.c (7731b8bc94e599c9a79e428f3359ff2c34b7576a) job.c (ec58923215dbbeef59ee82923ee94d745f73db58)
1/*
2 * Tegra host1x Job
3 *
4 * Copyright (c) 2010-2015, NVIDIA Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.

--- 555 unchanged lines hidden (view full) ---

564void host1x_job_unpin(struct host1x_job *job)
565{
566 struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
567 unsigned int i;
568
569 for (i = 0; i < job->num_unpins; i++) {
570 struct host1x_job_unpin_data *unpin = &job->unpins[i];
571
1/*
2 * Tegra host1x Job
3 *
4 * Copyright (c) 2010-2015, NVIDIA Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.

--- 555 unchanged lines hidden (view full) ---

564void host1x_job_unpin(struct host1x_job *job)
565{
566 struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
567 unsigned int i;
568
569 for (i = 0; i < job->num_unpins; i++) {
570 struct host1x_job_unpin_data *unpin = &job->unpins[i];
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 unpin->size);
575 free_iova(&host->iova,
576 iova_pfn(&host->iova, job->addr_phys[i]));
577 }
578
579 host1x_bo_unpin(unpin->bo, unpin->sgt);
580 host1x_bo_put(unpin->bo);

--- 22 unchanged lines hidden ---
574 iommu_unmap(host->domain, job->addr_phys[i],
575 unpin->size);
576 free_iova(&host->iova,
577 iova_pfn(&host->iova, job->addr_phys[i]));
578 }
579
580 host1x_bo_unpin(unpin->bo, unpin->sgt);
581 host1x_bo_put(unpin->bo);

--- 22 unchanged lines hidden ---