On Tue, Dec 08, 2009 at 08:22:37AM +0100, Rafał Miłecki wrote: > W dniu 8 grudnia 2009 00:55 użytkownik Alex Deucher > <alexdeuc...@gmail.com> napisał: > > 2009/12/7 Rafał Miłecki <zaj...@gmail.com>: > >> W dniu 3 grudnia 2009 11:20 użytkownik Jerome Glisse > >> <gli...@freedesktop.org> napisał: > >>> The first design i thought for PM long time ago was : > >>> func_compute_clock > >>> func_set_clock > >>> func_irq_powersave > >>> > >>> func_compute_clock is call any time there is a mode change to > >>> compute new minimum clock. > >>> > >>> func_set_clock is call after func_compute_clock (if we need to > >>> upclock gpu to have enough bandwidth for a new video mode) or > >>> from func_irq_powersave. func_set_clock would have to take all > >>> necessary lock to ensure exclusive hw access. > >>> > >>> func_irq_powersave is the function responsible for downclocking > >>> or not the GPU, it's call from irq handler, and it would call > >>> func_set_clock to do the work if necessary > >> > >> Do you think it's alright to do modeset on downclocked GPU? With my > >> patch I upclocked before every modeset operation, but not sure anymore > >> if that is necessary... > > > > For engine clock it should be fine. for mem you'll need to make sure > > memory bandwidth is adequate. > > So Jerome's solution is not really correct as it does not include that? > > Then we're back to something similar I've implemented: we have to > disable PM for a time of modesetting and then when it's done and when > we know needed details to calculate bandwidth - start it again? > > -- > Rafał
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. The only issue with my solution is on ATOM with irq handler, it should be fine to use a workqueue and wakeup the PM from their. As we can't execute atombios code from the handler without switching to busy wait. 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