Commit 0373cac6 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

OMAPDSS: FEATURES: Create a range param to get max downscaling

Create a dss_range_param member called FEAT_PARAM_DOWNSCALE to get the maximum
downscaling possible on the current platform. Use this in
dispc_ovl_calc_scaling().
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 79ad75f2
...@@ -1692,7 +1692,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane, ...@@ -1692,7 +1692,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
enum omap_color_mode color_mode, bool *five_taps) enum omap_color_mode color_mode, bool *five_taps)
{ {
struct omap_overlay *ovl = omap_dss_get_overlay(plane); struct omap_overlay *ovl = omap_dss_get_overlay(plane);
const int maxdownscale = cpu_is_omap34xx() ? 4 : 2; const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
unsigned long fclk = 0; unsigned long fclk = 0;
if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) { if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) {
......
...@@ -288,6 +288,7 @@ static const struct dss_param_range omap2_dss_param_range[] = { ...@@ -288,6 +288,7 @@ static const struct dss_param_range omap2_dss_param_range[] = {
[FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, 0 }, [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, 0 },
[FEAT_PARAM_DSIPLL_FINT] = { 0, 0 }, [FEAT_PARAM_DSIPLL_FINT] = { 0, 0 },
[FEAT_PARAM_DSIPLL_LPDIV] = { 0, 0 }, [FEAT_PARAM_DSIPLL_LPDIV] = { 0, 0 },
[FEAT_PARAM_DOWNSCALE] = { 1, 2 },
}; };
static const struct dss_param_range omap3_dss_param_range[] = { static const struct dss_param_range omap3_dss_param_range[] = {
...@@ -299,6 +300,7 @@ static const struct dss_param_range omap3_dss_param_range[] = { ...@@ -299,6 +300,7 @@ static const struct dss_param_range omap3_dss_param_range[] = {
[FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 4) - 1 }, [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 4) - 1 },
[FEAT_PARAM_DSIPLL_FINT] = { 750000, 2100000 }, [FEAT_PARAM_DSIPLL_FINT] = { 750000, 2100000 },
[FEAT_PARAM_DSIPLL_LPDIV] = { 1, (1 << 13) - 1}, [FEAT_PARAM_DSIPLL_LPDIV] = { 1, (1 << 13) - 1},
[FEAT_PARAM_DOWNSCALE] = { 1, 4 },
}; };
static const struct dss_param_range omap4_dss_param_range[] = { static const struct dss_param_range omap4_dss_param_range[] = {
...@@ -310,6 +312,7 @@ static const struct dss_param_range omap4_dss_param_range[] = { ...@@ -310,6 +312,7 @@ static const struct dss_param_range omap4_dss_param_range[] = {
[FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 5) - 1 }, [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 5) - 1 },
[FEAT_PARAM_DSIPLL_FINT] = { 500000, 2500000 }, [FEAT_PARAM_DSIPLL_FINT] = { 500000, 2500000 },
[FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 }, [FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 },
[FEAT_PARAM_DOWNSCALE] = { 1, 4 },
}; };
/* OMAP2 DSS Features */ /* OMAP2 DSS Features */
......
...@@ -84,6 +84,7 @@ enum dss_range_param { ...@@ -84,6 +84,7 @@ enum dss_range_param {
FEAT_PARAM_DSIPLL_REGM_DSI, FEAT_PARAM_DSIPLL_REGM_DSI,
FEAT_PARAM_DSIPLL_FINT, FEAT_PARAM_DSIPLL_FINT,
FEAT_PARAM_DSIPLL_LPDIV, FEAT_PARAM_DSIPLL_LPDIV,
FEAT_PARAM_DOWNSCALE,
}; };
/* DSS Feature Functions */ /* DSS Feature Functions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment