diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2014-05-20 18:37:50 +0300 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-28 13:43:41 -0700 |
commit | 589f59242f7321e8891f542ca913f53ef9e9efbf (patch) | |
tree | 17946b1343d17574bdb60eae8a8518b44bca3add /drivers/media | |
parent | 187537d26639f5e866aec00a078c74bfea4beeae (diff) |
media: tegra: nvavp: Handle missing DMA address
If DMA address is not defined, use the physical address.
Bug 1500983
Change-Id: Ib2ceea2c910f3dbb9ea61580669dd4ae52ddba29
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: http://git-master/r/412106
(cherry picked from commit 9643861e8a20312c0d3df546f95494353736d373)
Reviewed-on: http://git-master/r/415239
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/tegra/nvavp/nvavp_dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/tegra/nvavp/nvavp_dev.c b/drivers/media/platform/tegra/nvavp/nvavp_dev.c index b0a7de6a0166..24ade15976af 100644 --- a/drivers/media/platform/tegra/nvavp/nvavp_dev.c +++ b/drivers/media/platform/tegra/nvavp/nvavp_dev.c @@ -1596,6 +1596,8 @@ static int nvavp_pushbuffer_submit_ioctl(struct file *filp, unsigned int cmd, } target_phys_addr = sg_dma_address(target_sgt->sgl); + if (!target_phys_addr) + target_phys_addr = sg_phys(target_sgt->sgl); target_phys_addr += clientctx->relocs[i].target_offset; writel(target_phys_addr, reloc_addr); dma_buf_unmap_attachment(target_attach, target_sgt, |