mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
video: tegra: lock around DC suspend/resume
Change-Id: I9c134a2417106538b15cc1cfd615cfb65573e878 Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
@@ -1066,8 +1066,10 @@ static int tegra_dc_suspend(struct nvhost_device *ndev, pm_message_t state)
|
||||
|
||||
dev_info(&ndev->dev, "suspend\n");
|
||||
|
||||
mutex_lock(&dc->lock);
|
||||
if (dc->enabled)
|
||||
_tegra_dc_disable(dc);
|
||||
mutex_unlock(&dc->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1078,8 +1080,10 @@ static int tegra_dc_resume(struct nvhost_device *ndev)
|
||||
|
||||
dev_info(&ndev->dev, "resume\n");
|
||||
|
||||
mutex_lock(&dc->lock);
|
||||
if (dc->enabled)
|
||||
_tegra_dc_enable(dc);
|
||||
mutex_unlock(&dc->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user