job.c (273da5a046965ccf0ec79eb63f2d5173467e20fa) job.c (98ae41adb252866158dd4e998551dfa85e612bed)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Tegra host1x Job
4 *
5 * Copyright (c) 2010-2015, NVIDIA Corporation.
6 */
7
8#include <linux/dma-mapping.h>

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

243 } else if (sgt) {
244 err = dma_map_sg(host->dev, sgt->sgl, sgt->nents,
245 DMA_TO_DEVICE);
246 if (!err) {
247 err = -ENOMEM;
248 goto unpin;
249 }
250
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Tegra host1x Job
4 *
5 * Copyright (c) 2010-2015, NVIDIA Corporation.
6 */
7
8#include <linux/dma-mapping.h>

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

243 } else if (sgt) {
244 err = dma_map_sg(host->dev, sgt->sgl, sgt->nents,
245 DMA_TO_DEVICE);
246 if (!err) {
247 err = -ENOMEM;
248 goto unpin;
249 }
250
251 job->unpins[job->num_unpins].dir = DMA_TO_DEVICE;
251 job->unpins[job->num_unpins].dev = host->dev;
252 phys_addr = sg_dma_address(sgt->sgl);
253 }
254
255 job->addr_phys[job->num_unpins] = phys_addr;
256 job->gather_addr_phys[i] = phys_addr;
257
252 job->unpins[job->num_unpins].dev = host->dev;
253 phys_addr = sg_dma_address(sgt->sgl);
254 }
255
256 job->addr_phys[job->num_unpins] = phys_addr;
257 job->gather_addr_phys[i] = phys_addr;
258
258 job->unpins[job->num_unpins].dir = DMA_TO_DEVICE;
259 job->unpins[job->num_unpins].bo = g->bo;
260 job->unpins[job->num_unpins].sgt = sgt;
261 job->num_unpins++;
262 }
263
264 return 0;
265
266unpin:

--- 417 unchanged lines hidden ---
259 job->unpins[job->num_unpins].bo = g->bo;
260 job->unpins[job->num_unpins].sgt = sgt;
261 job->num_unpins++;
262 }
263
264 return 0;
265
266unpin:

--- 417 unchanged lines hidden ---