diff options
author | Jon Mayo <jmayo@nvidia.com> | 2011-07-07 21:34:12 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:01:24 -0400 |
commit | 23f183789019d1d2aab951a3bdd17f22f167deef (patch) | |
tree | c60b88cf8f26f60a5ea5db2388475a2a5c0549e7 /drivers/video/tegra/dc/dc.c | |
parent | 580a8afe9fc1d9ef5b54588da544d3103fe6d345 (diff) |
video: tegra: dc: only set supported filters
Not all windows are created equal, only set vertical or horizontal
filters when the window supports them.
Bug 850852
Original-Change-Id: I69b40ff47fd8ed8499857408c249ddd35299ae95
Reviewed-on: http://git-master/r/40132
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R339412d8ca44cd3bbe69f4af8c9bdde32a6d56c7
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 847689303..cd038ca70 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c | |||
@@ -811,8 +811,6 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n) | |||
811 | return -EFAULT; | 811 | return -EFAULT; |
812 | } | 812 | } |
813 | 813 | ||
814 | tegra_dc_set_dynamic_emc(windows, n); | ||
815 | |||
816 | if (no_vsync) | 814 | if (no_vsync) |
817 | tegra_dc_writel(dc, WRITE_MUX_ACTIVE | READ_MUX_ACTIVE, DC_CMD_STATE_ACCESS); | 815 | tegra_dc_writel(dc, WRITE_MUX_ACTIVE | READ_MUX_ACTIVE, DC_CMD_STATE_ACCESS); |
818 | else | 816 | else |
@@ -926,6 +924,13 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n) | |||
926 | else if (tegra_dc_fmt_bpp(win->fmt) < 24) | 924 | else if (tegra_dc_fmt_bpp(win->fmt) < 24) |
927 | val |= COLOR_EXPAND; | 925 | val |= COLOR_EXPAND; |
928 | 926 | ||
927 | /* only B and C have H filer, force it on if scaling */ | ||
928 | if (win->idx != 0 && win->w != win->out_w) | ||
929 | win->flags |= TEGRA_WIN_FLAG_H_FILTER; | ||
930 | /* only B has V filter, set it if scaling */ | ||
931 | if (win->idx == 1 && win->h != win->out_h) | ||
932 | win->flags |= TEGRA_WIN_FLAG_V_FILTER; | ||
933 | |||
929 | if (WIN_USE_H_FILTER(win)) | 934 | if (WIN_USE_H_FILTER(win)) |
930 | val |= H_FILTER_ENABLE; | 935 | val |= H_FILTER_ENABLE; |
931 | if (WIN_USE_V_FILTER(win)) | 936 | if (WIN_USE_V_FILTER(win)) |
@@ -950,6 +955,8 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n) | |||
950 | } | 955 | } |
951 | } | 956 | } |
952 | 957 | ||
958 | tegra_dc_set_dynamic_emc(windows, n); | ||
959 | |||
953 | tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL); | 960 | tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL); |
954 | 961 | ||
955 | if (!no_vsync) { | 962 | if (!no_vsync) { |