summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-08-15 12:12:16 +0300
committerSimone Willett <swillett@nvidia.com>2012-08-15 17:11:55 -0700
commit028042d5cc554c41a7b5f00fc2b20dce997fcc43 (patch)
tree5e32bd70aec809809ac441ae0c47632e6af56631 /drivers/video/tegra
parenta119ed4c1e0a0ffb650dd77c5d5f1b71378328c8 (diff)
video: tegra: host: Fix leak in 3D register read
When 3D register is read, and we need to do a context switch, the old context reference is incremented, but it never gets decremented. Fix by using nvhost_job_get_hwctx() to acquire the reference. Bug 1031746 Change-Id: Ic72637cb2399f960e2297733bfe45e585a8ec180 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/123678 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/host/host1x/host1x_channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/tegra/host/host1x/host1x_channel.c b/drivers/video/tegra/host/host1x/host1x_channel.c
index 1d02537..3c07460 100644
--- a/drivers/video/tegra/host/host1x/host1x_channel.c
+++ b/drivers/video/tegra/host/host1x/host1x_channel.c
@@ -365,7 +365,7 @@ static int host1x_channel_read_3d_reg(
if (hwctx_to_save) {
syncpt_incrs += hwctx_to_save->save_incrs;
hwctx_to_save->hwctx.valid = true;
- channel->ctxhandler->get(&hwctx_to_save->hwctx);
+ nvhost_job_get_hwctx(job, &hwctx_to_save->hwctx);
}
channel->cur_ctx = hwctx;
if (channel->cur_ctx && channel->cur_ctx->valid) {