On Tue, Dec 08, 2009 at 11:23:41AM +0100, Rafał Miłecki wrote:
> W dniu 8 grudnia 2009 10:18 użytkownik Jerome Glisse
> <gli...@freedesktop.org> napisał:
> > My solution is correst i said that you need to call func_set_clock
> > after func_compute_clock which determine the lower memory clock limit
> > according to the video mode. Note that func_compute_clock is call
> > while doing modesetting but before doing the actual video mode
> > change. As a first approach you can do an empty func_compute_clock
> > and set a limit to somethings safe for your display.
> 
> Then sorry, I did not understand you correctly. Could you tell me
> where should I put func_compute_clock (and  func_set_clock) calls to
> make it happen before modesetting? Previously I used DPMS but not sure
> if that place is correct.
> 
> -- 
> Rafał
> 

You need to call func_compute_clock in mode_fixup callback.
func_compute_clock then call func_set_clock. At init you
create a workqueue like your did in your previous patch,
but now you can remove all the change you did into dpms.

Then when doing a clock change you ask for vblank irq and
wakeup the actual work queue from the irq handler. Workqueue
should be scheduled fast enough to have time to run in vblank.

So here is what it should looks like:
        - func_compute_clock (do a simple function which set
        default minimun clock to safe value final version
        need complex formula to determine this clock values).
        Func compute clock call func_schedule_reclock
        - func_schedule_reclock is the workqueue you should
        create at init it ask for a vblank interrupt
        - in the irq handler you must wakeup the func_reclock
        function to do the work when getting an interrupt
        - func_reclock do the reclocking

Then i think you need 3 values for each clock :
current, next, minimum, func_schedule_reclock will compute
the next value, current will be updated by func_reclock and
minimum by func_compute_clock.

With this scheme it should properly if func_reclock is
scheduled early enough to have enough time to finish before
vblank end.

Cheers,
Jerome

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to