]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
tegra: dc: nvhdcp: check dc powergating status
authorAnshuman Nath Kar <anshumank@nvidia.com>
Sat, 5 Jul 2014 22:26:07 +0000 (15:26 -0700)
committerEric Chuang <echuang@nvidia.com>
Sun, 6 Jul 2014 01:42:03 +0000 (18:42 -0700)
Bug 200017536
Bug 200018316
Bug 200018314

Change-Id: I7c58049166ef1e6e74daab218eb7f6abc918289f
Signed-off-by: Anshuman Nath Kar <anshumank@nvidia.com>
Reviewed-on: http://git-master/r/434862
Reviewed-by: Eric Chuang <echuang@nvidia.com>
drivers/video/tegra/dc/nvhdcp.c

index 607acaff79090abdec8e8952afdf21b18594bd00..dbf2ef2103962566df987f76a594d02a3db3fea3 100644 (file)
@@ -868,6 +868,13 @@ static void nvhdcp_downstream_worker(struct work_struct *work)
        nvhdcp_vdbg("%s():started thread %s\n", __func__, nvhdcp->name);
        tegra_dc_io_start(dc);
 
+       if ((!tegra_is_clk_enabled(dc->clk)) ||
+               (!tegra_powergate_is_powered(dc->powergate_id))) {
+               nvhdcp_err("%s, dc is  clockgated\n", __func__);
+               tegra_dc_io_end(dc);
+               return;
+       }
+
        mutex_lock(&nvhdcp->lock);
        if (nvhdcp->state == STATE_OFF) {
                nvhdcp_err("nvhdcp failure - giving up\n");