Hi,
On Tue, Aug 07, 2012 at 01:57:42PM +0530, Chandrabhanu Mahapatra wrote:
> diff --git a/drivers/video/omap2/dss/dss_features.c
> b/drivers/video/omap2/dss/dss_features.c
> index 9387097..b8d5095 100644
> --- a/drivers/video/omap2/dss/dss_features.c
> +++ b/drivers/video/omap2/dss/dss_features.c
> @@ -567,6 +567,48 @@ static const struct omap_dss_features omap4_dss_features
> = {
> .burst_size_unit = 16,
> };
>
> +static const struct dispc_ops omap2_dispc_ops = {
> + .calc_scaling = dispc_ovl_calc_scaling_24xx,
> + .calc_core_clk = calc_core_clk_24xx,
> + .lcd_timings_ok = _dispc_lcd_timings_ok_24xx,
> + .set_lcd_timings_hv = _dispc_mgr_set_lcd_timings_hv_24xx,
> +};
> +
> +static const struct dispc_ops omap3_2_1_dispc_ops = {
> + .calc_scaling = dispc_ovl_calc_scaling_34xx,
> + .calc_core_clk = calc_core_clk_34xx,
> + .lcd_timings_ok = _dispc_lcd_timings_ok_24xx,
> + .set_lcd_timings_hv = _dispc_mgr_set_lcd_timings_hv_24xx,
> +};
> +
> +static const struct dispc_ops omap3_3_0_dispc_ops = {
> + .calc_scaling = dispc_ovl_calc_scaling_34xx,
> + .calc_core_clk = calc_core_clk_34xx,
> + .lcd_timings_ok = _dispc_lcd_timings_ok_44xx,
> + .set_lcd_timings_hv = _dispc_mgr_set_lcd_timings_hv_44xx,
> +};
> +
> +static const struct dispc_ops omap4_dispc_ops = {
> + .calc_scaling = dispc_ovl_calc_scaling_44xx,
> + .calc_core_clk = calc_core_clk_44xx,
> + .lcd_timings_ok = _dispc_lcd_timings_ok_44xx,
> + .set_lcd_timings_hv = _dispc_mgr_set_lcd_timings_hv_44xx,
> +};
> +
> +void dispc_init_ops(const struct dispc_ops *ops)
> +{
> + if (cpu_is_omap24xx()) {
> + ops = &omap2_dispc_ops;
> + } else if (cpu_is_omap34xx()) {
> + if (omap_rev() < OMAP3430_REV_ES3_0)
> + ops = &omap3_2_1_dispc_ops;
> + else
> + ops = &omap3_3_0_dispc_ops;
> + } else {
> + ops = &omap4_dispc_ops;
> + }
> +}you're not really removing. You're moving cpu_is_* somewhere else. A better approach, IMHO, would be to use the DSS_REVISION register to differentiate the DSS IP itself, not the OMAP. -- balbi
signature.asc
Description: Digital signature
