diff options
author | Erik Gilling <konkers@android.com> | 2011-04-19 13:36:37 -0700 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2011-04-19 13:36:39 -0700 |
commit | f249634bf50fbfcd3b8730cb1a343bc3c59635ec (patch) | |
tree | f60887bb10420887bf925733e7f5903df3cd1201 /drivers/video | |
parent | d99cea140dba998d7ee1a24a7d32ec1b78c02f3f (diff) | |
parent | 390426653550474a432a051a81441678c4ef6eaa (diff) |
Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36
Change-Id: I023482f230dc4f413647f47b3c7c36fd4c98b97d
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 8 | ||||
-rw-r--r-- | drivers/video/tegra/dc/dc_priv.h | 1 | ||||
-rw-r--r-- | drivers/video/tegra/dc/nvhdcp.c | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 43d31840fd34..a61e86fb5dd7 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -1103,7 +1103,9 @@ void tegra_dc_disable(struct tegra_dc *dc) if (dc->enabled) { dc->enabled = false; - _tegra_dc_disable(dc); + + if (!dc->suspended) + _tegra_dc_disable(dc); } mutex_unlock(&dc->lock); @@ -1335,6 +1337,8 @@ static int tegra_dc_suspend(struct nvhost_device *ndev, pm_message_t state) if (dc->enabled) { tegra_fb_suspend(dc->fb); _tegra_dc_disable(dc); + + dc->suspended = true; } mutex_unlock(&dc->lock); @@ -1348,6 +1352,8 @@ static int tegra_dc_resume(struct nvhost_device *ndev) dev_info(&ndev->dev, "resume\n"); mutex_lock(&dc->lock); + dc->suspended = false; + if (dc->enabled) _tegra_dc_enable(dc); diff --git a/drivers/video/tegra/dc/dc_priv.h b/drivers/video/tegra/dc/dc_priv.h index 3f7fdbff023b..c8476f8b5ffc 100644 --- a/drivers/video/tegra/dc/dc_priv.h +++ b/drivers/video/tegra/dc/dc_priv.h @@ -63,6 +63,7 @@ struct tegra_dc { struct clk *emc_clk; bool enabled; + bool suspended; struct tegra_dc_out *out; struct tegra_dc_out_ops *out_ops; diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c index 7c8869a563f5..5c2d9050a14b 100644 --- a/drivers/video/tegra/dc/nvhdcp.c +++ b/drivers/video/tegra/dc/nvhdcp.c @@ -354,6 +354,9 @@ static int get_ksvfifo(struct tegra_nvhdcp *nvhdcp, if (!ksv_list || num_bksv_list > TEGRA_NVHDCP_MAX_DEVS) return -EINVAL; + if (num_bksv_list == 0) + return 0; + buf = kmalloc(buf_len, GFP_KERNEL); if (IS_ERR_OR_NULL(buf)) return -ENOMEM; |