video: tegra: host: Rework nvhost_vm
authorArto Merilainen <amerilainen@nvidia.com>
Sun, 16 Aug 2015 07:13:18 +0000 (10:13 +0300)
committermobile promotions <svcmobile_promotions@nvidia.com>
Mon, 2 Nov 2015 20:18:12 +0000 (12:18 -0800)
commit5def2c9889a982d9086e3020212302682c807034
treeaabc376df88454a6dcd71add5823e79f8dda98af
parent8299a767708d55261c7374b795936ca34a02b60e
video: tegra: host: Rework nvhost_vm

This patch effectively removes buffer mapping support from
nvhost_vm. The code was originally added to allow context specific
virtual memory with assumption that nvhost would use iommu API
directly, however, DMA API approach was later selected due to
easier integration.

The code is reworked to allocate vm instance each time when the
channel is mapped and the vm is released when the channel
is is unmapped. VM allocation triggers call to hardware specific
initialization routine.

This patch modifies buffer pinning to happen toward host1x
(gathers) or the vm device (relocations).

Bug 1688003
Bug 1243060
Bug 200148952

Change-Id: I1d36f98316fd48a15b0fe06424b7cb8417ed5e52
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/792128
(cherry-picked from commit 445a666a57a33b94d9540b95def0411b3f216424)
Reviewed-on: http://git-master/r/784030
(cherry picked from commit 4d3ada6221dfd814d99a6c91a4fde1e0915480d4)
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/823502
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
GVS: Gerrit_Virtual_Submit
drivers/video/tegra/host/bus_client.c
drivers/video/tegra/host/host1x/host1x.h
drivers/video/tegra/host/host1x/host1x_debug.c
drivers/video/tegra/host/nvhost_channel.c
drivers/video/tegra/host/nvhost_channel.h
drivers/video/tegra/host/nvhost_job.c
drivers/video/tegra/host/nvhost_job.h
drivers/video/tegra/host/nvhost_vm.c
drivers/video/tegra/host/nvhost_vm.h
drivers/video/tegra/host/t124/t124.c
drivers/video/tegra/host/t210/t210.c