aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dispc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r--drivers/video/omap2/dss/dispc.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index b801be4660e9..2bbdb7ff7daf 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2149,8 +2149,8 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
2149 *five_taps = false; 2149 *five_taps = false;
2150 2150
2151 do { 2151 do {
2152 in_height = DIV_ROUND_UP(height, *decim_y); 2152 in_height = height / *decim_y;
2153 in_width = DIV_ROUND_UP(width, *decim_x); 2153 in_width = width / *decim_x;
2154 *core_clk = dispc.feat->calc_core_clk(pclk, in_width, 2154 *core_clk = dispc.feat->calc_core_clk(pclk, in_width,
2155 in_height, out_width, out_height, mem_to_mem); 2155 in_height, out_width, out_height, mem_to_mem);
2156 error = (in_width > maxsinglelinewidth || !*core_clk || 2156 error = (in_width > maxsinglelinewidth || !*core_clk ||
@@ -2188,8 +2188,8 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
2188 dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); 2188 dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH);
2189 2189
2190 do { 2190 do {
2191 in_height = DIV_ROUND_UP(height, *decim_y); 2191 in_height = height / *decim_y;
2192 in_width = DIV_ROUND_UP(width, *decim_x); 2192 in_width = width / *decim_x;
2193 *five_taps = in_height > out_height; 2193 *five_taps = in_height > out_height;
2194 2194
2195 if (in_width > maxsinglelinewidth) 2195 if (in_width > maxsinglelinewidth)
@@ -2257,7 +2257,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
2257{ 2257{
2258 u16 in_width, in_width_max; 2258 u16 in_width, in_width_max;
2259 int decim_x_min = *decim_x; 2259 int decim_x_min = *decim_x;
2260 u16 in_height = DIV_ROUND_UP(height, *decim_y); 2260 u16 in_height = height / *decim_y;
2261 const int maxsinglelinewidth = 2261 const int maxsinglelinewidth =
2262 dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); 2262 dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH);
2263 const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE); 2263 const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
@@ -2276,7 +2276,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
2276 return -EINVAL; 2276 return -EINVAL;
2277 2277
2278 do { 2278 do {
2279 in_width = DIV_ROUND_UP(width, *decim_x); 2279 in_width = width / *decim_x;
2280 } while (*decim_x <= *x_predecim && 2280 } while (*decim_x <= *x_predecim &&
2281 in_width > maxsinglelinewidth && ++*decim_x); 2281 in_width > maxsinglelinewidth && ++*decim_x);
2282 2282
@@ -2455,8 +2455,8 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
2455 if (r) 2455 if (r)
2456 return r; 2456 return r;
2457 2457
2458 in_width = DIV_ROUND_UP(in_width, x_predecim); 2458 in_width = in_width / x_predecim;
2459 in_height = DIV_ROUND_UP(in_height, y_predecim); 2459 in_height = in_height / y_predecim;
2460 2460
2461 if (color_mode == OMAP_DSS_COLOR_YUV2 || 2461 if (color_mode == OMAP_DSS_COLOR_YUV2 ||
2462 color_mode == OMAP_DSS_COLOR_UYVY || 2462 color_mode == OMAP_DSS_COLOR_UYVY ||
@@ -3778,12 +3778,20 @@ static const struct dev_pm_ops dispc_pm_ops = {
3778 .runtime_resume = dispc_runtime_resume, 3778 .runtime_resume = dispc_runtime_resume,
3779}; 3779};
3780 3780
3781static const struct of_device_id dispc_of_match[] = {
3782 { .compatible = "ti,omap2-dispc", },
3783 { .compatible = "ti,omap3-dispc", },
3784 { .compatible = "ti,omap4-dispc", },
3785 {},
3786};
3787
3781static struct platform_driver omap_dispchw_driver = { 3788static struct platform_driver omap_dispchw_driver = {
3782 .remove = __exit_p(omap_dispchw_remove), 3789 .remove = __exit_p(omap_dispchw_remove),
3783 .driver = { 3790 .driver = {
3784 .name = "omapdss_dispc", 3791 .name = "omapdss_dispc",
3785 .owner = THIS_MODULE, 3792 .owner = THIS_MODULE,
3786 .pm = &dispc_pm_ops, 3793 .pm = &dispc_pm_ops,
3794 .of_match_table = dispc_of_match,
3787 }, 3795 },
3788}; 3796};
3789 3797