On Tue, 2012-05-08 at 09:54 +0530, Archit Taneja wrote:
> Hi,
> 
> On Monday 07 May 2012 08:17 PM, Tomi Valkeinen wrote:
> > Hi,

> > dss_<ovl|mgr>_<enable|disable>  functions handle GO, so you could have a
> > look at them. However, setting the timings is a bit different, so I'm
> > not sure how it should be done.
> >
> > I think we have a few different options:
> >
> > - Separate omapdss internal function (in apply.c) that can be used to
> > set GO after set_timings
> >
> > - set GO in dss_mgr_set_timings(), but don't block
> >
> > - set GO in dss_mgr_set_timings(), and block until the changes are in HW
> > (this is more or less what the dss_<ovl|mgr>_<enable|disable>  functions
> > do).
> >
> > The first one would be good if the interface drivers would need to set
> > multiple configurations, and we don't want to block after each set call.
> > But we don't have anything like that, at least currently.
> >
> > The second one avoids blocking, but could perhaps cause problems because
> > the timings are not actually used yet when the function returns.
> >
> > I don't see any problem with the last option, so I'm slightly leaning
> > towards it.
> 
> The 3rd option looks good to me too, but I'm wondering if we would need 
> to do the same things with all manager parameters which are in shadow 
> registers. Like in dpi.c, in dpi_set_mode() we set the DISPC_POL_FREQ 
> and DISPC_DIVISORo registers, writing GO for each parameter would be in 
> efficient, it's good that it doesn't happen much often. Maybe we could 
> group the rest of these parameters.

Hmm, that's true.

We could make shortcuts with settings that are only changed while the
display is off. For example, currently DISPC_POL_FREQ cannot be changed
dynamically, so it could only be set when before enabling the output.
However, it seems we currently do call dispc_mgr_set_pol_freq() in
dpi_set_mode(), which could be called when the output is enabled. But
even then we always set the same values, so it doesn't matter.

For DISPC_DIVISORo, I guess we could make a shortcut with that also.
While it is a shadow register, when we are changing the dss clocks we
also set non-shadowed registers. So I think the best way to change clock
frequencies is to turn off the output temporarily.

Perhaps all the shadow registers currently being set directly from
interface drivers are such settings? The code should still be changed so
that we only touch the registers when enabling the output.

But, of course, a better design and also more future proof would be to
handle all shadow registers properly, even if we currently only set them
while the output is off. That may be left for future, though.

In any case, I think we should mark clearly the places where we set
shadow registers directly, without using the apply.c. Perhaps we should
even mark all the dispc functions that set shadow registers, like
dispc_mgr_set_pol_freq_sh(). But let's not do that now either, as we're
quite close to merge window.

 Tomi

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to