On Thu, 2012-06-28 at 20:00 +0530, Archit Taneja wrote: > Replace the DISPC fuctions used to configure LCD channel related manager > parameters with dss_mgr_set_lcd_config() in APPLY. This function ensures that > the DISPC registers are written at the right time by using the shadow register > programming model. > > The LCD manager configurations is stored as a private data of manager in > APPLY. > It is treated as an extra info as it's the panel drivers which trigger this > apply via interface drivers, and not a DSS2 user like omapfb or omapdrm. > > Storing LCD manager related properties in APPLY also prevents the need to > refer > to the panel connected to the manager for information. This helps in making > the > DSS driver less dependent on panel. > > A helper function is added to check whether the manager is LCD or TV. The > direct > DISPC register writes are removed from the interface drivers.
> +static void dss_apply_mgr_lcd_config(struct omap_overlay_manager *mgr,
> + struct dss_lcd_mgr_config config)
> +{
This one should take a pointer to the config, not a copy (and const).
> + struct mgr_priv_data *mp = get_mgr_priv(mgr);
> +
> + mp->lcd_config = config;
> + mp->extra_info_dirty = true;
> +}
> +
> +void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr,
> + struct dss_lcd_mgr_config config)
And this.
> +{
> + unsigned long flags;
> + struct mgr_priv_data *mp = get_mgr_priv(mgr);
> +
> + mutex_lock(&apply_lock);
> +
> + if (mp->enabled)
> + goto out;
Hmm. Should we print a warning or such here? Isn't it a bug in the
interface driver, if it tries to set the lcd config when the output is
enabled?
Tomi
signature.asc
Description: This is a digitally signed message part
