diff options
author | Bibek Basu <bbasu@nvidia.com> | 2015-08-17 16:48:59 +0530 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2015-08-25 11:36:57 -0700 |
commit | 1f780e61562572ce809de0592a4ab6967d21267e (patch) | |
tree | 9af0a0df4e280a4e0bcef0067f5e262867f9da62 /drivers/video | |
parent | fb27f592bdfe703c5b43550d4aded73ab08d4622 (diff) |
video: tegra: dc: handle tegra_dc_sync_windows error
In case tegra_dc_sync_windows is interrupted by signal,
return the error to caller application
Bug 200090492
Change-Id: Id69fbe38d0abe0b3e71eb5a413db241ebcf0a0ae
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/784754
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 13 | ||||
-rw-r--r-- | drivers/video/tegra/dc/ext/dev.c | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 872bff43019a..588ef13c3c62 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -2660,17 +2660,18 @@ bool tegra_dc_stats_get(struct tegra_dc *dc) } /* blank selected windows by disabling them */ -void tegra_dc_blank(struct tegra_dc *dc, unsigned windows) +int tegra_dc_blank(struct tegra_dc *dc, unsigned windows) { struct tegra_dc_win *dcwins[DC_N_WINDOWS]; unsigned i; unsigned long int blank_windows; int nr_win = 0; + int ret = 0; blank_windows = windows & dc->valid_windows; if (!blank_windows) - return; + return ret; for_each_set_bit(i, &blank_windows, DC_N_WINDOWS) { dcwins[nr_win] = tegra_dc_get_window(dc, i); @@ -2680,8 +2681,14 @@ void tegra_dc_blank(struct tegra_dc *dc, unsigned windows) } tegra_dc_update_windows(dcwins, nr_win, NULL); - tegra_dc_sync_windows(dcwins, nr_win); + ret = tegra_dc_sync_windows(dcwins, nr_win); + if (ret <= 0) { + dev_dbg(&dc->ndev->dev, "Error %d\n", ret); + return ret; + } + tegra_dc_program_bandwidth(dc, true); + return ret; } int tegra_dc_restore(struct tegra_dc *dc) diff --git a/drivers/video/tegra/dc/ext/dev.c b/drivers/video/tegra/dc/ext/dev.c index 0560a8b49297..38dc4a928ee8 100644 --- a/drivers/video/tegra/dc/ext/dev.c +++ b/drivers/video/tegra/dc/ext/dev.c @@ -1210,7 +1210,9 @@ static long tegra_dc_ioctl(struct file *filp, unsigned int cmd, case TEGRA_DC_EXT_PUT_WINDOW: ret = tegra_dc_ext_put_window(user, arg); if (!ret) { - tegra_dc_blank(user->ext->dc, BIT(arg)); + ret = tegra_dc_blank(user->ext->dc, BIT(arg)); + if (ret < 0) + return ret; tegra_dc_ext_unpin_window(&user->ext->win[arg]); } return ret; |