drm/tegra: Prevent BOs from being freed during job submission
authorDmitry Osipenko <digetx@gmail.com>
Fri, 11 Aug 2017 17:54:56 +0000 (19:54 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 17 Aug 2017 15:57:18 +0000 (17:57 +0200)
commitec73c4cfe7de6229e49989f7d7754a7039cd5c28
treefd877987480f0f64a6dfdff08734d3451b878da5
parenta8bc8c6510d64b759644647a03f8aec55056bded
drm/tegra: Prevent BOs from being freed during job submission

Since DRM IOCTL's are lockless, there is a chance that BOs could be
released while a job submission is in progress. To avoid that, keep the
GEM reference until the job has been pinned, part of which will be to
take another reference.

v2: remove redundant check and avoid memory leak

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c