tegra: Add function to release resources

Add a companion function to nvhost_client_device_get_resources()
called nvhost_client_device_put_resources() that does the opposite
thing. This is useful for any nvhost clients that need to be loaded
as modules, since the driver removal path will be exercised in that
case.

Change-Id: Ib5cec6fce7b05c780b135b03fcd88e068f772244
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169833
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: tegra: Tegra videobuf2

This is based off of videobuf2-dma-contig, except we use Tegra's
nvmap for the buffer allocations.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: I15e689c33ee7b4fc0aade794c78701c82483df3f
Reviewed-on: http://git-master/r/145345
(cherry picked from commit 70a4f20fbdd6c2c719400d6c59ef58d845657031)

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Change-Id: Ia0632d7fcb28415e33fbb22c48f29117d7436f1d
Reviewed-on: http://git-master/r/170824
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Andrew Chew <achew@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: video: tegra: nvavp: Fix nvmap handle issue

In open call we were assigning the driver's nvmap handle to
the nvavp's client context which would get released in release
call to driver. This will cause driver's nvmap handle to be
invalid if a parallel client context is running and driver does
any nvmap operation.

Bug 1013063
Bug 1192772

Change-Id: Id02520ae8ec511bb8c50bc4d3908ea3e75e1ea6b
Reviewed-on: http://git-master/r/170585
Signed-off-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-on: http://git-master/r/171097
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>