diff options
author | Yu-Huan Hsu <yhsu@nvidia.com> | 2011-03-01 23:57:41 -0800 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-06-29 07:00:06 -0700 |
commit | 56ca96938ee143005f4e50ac6b56cbd6e2d867a5 (patch) | |
tree | 239864187dd32be574443a49e3121954bb19f29c | |
parent | 3a9ccdfff46284d7873592dd1bf4e2aa18a2201c (diff) |
video: tegra: Skip syncpoint increments if disabled
Avoid Display Controller (DC) syncpoint increments if that instance of DC is
not enabled.
Bug 793874
(cherry picked from commit 5be1dd4dd04db4a4c4e8004e364d504bf9f56857)
Change-Id: I91f05694044bbefb15c3b92047be3be47b2ceacc
Reviewed-on: http://git-master/r/38464
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index b9546209ae9b..57ca161f9765 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -661,7 +661,8 @@ u32 tegra_dc_incr_syncpt_max(struct tegra_dc *dc) u32 max; mutex_lock(&dc->lock); - max = nvhost_syncpt_incr_max(&dc->ndev->host->syncpt, dc->syncpt_id, 1); + max = nvhost_syncpt_incr_max(&dc->ndev->host->syncpt, dc->syncpt_id, + ((dc->enabled) ? 1 : 0) ); dc->syncpt_max = max; mutex_unlock(&dc->lock); @@ -671,10 +672,12 @@ u32 tegra_dc_incr_syncpt_max(struct tegra_dc *dc) void tegra_dc_incr_syncpt_min(struct tegra_dc *dc, u32 val) { mutex_lock(&dc->lock); - while (dc->syncpt_min < val) { - dc->syncpt_min++; - nvhost_syncpt_cpu_incr(&dc->ndev->host->syncpt, dc->syncpt_id); - } + if ( dc->enabled ) + while (dc->syncpt_min < val) { + dc->syncpt_min++; + nvhost_syncpt_cpu_incr(&dc->ndev->host->syncpt, + dc->syncpt_id); + } mutex_unlock(&dc->lock); } |