El 21/08/14 a las 15:28, Luc Verhaegen escibió:
On Thu, Aug 21, 2014 at 04:21:16AM +0200, Luc Verhaegen wrote:

My test CRT is refusing to show 640x480 though, so while i diligently
tested through the edges of the ranges (both of the internal loop, as
of the external divider), i did mess something else up :)

Ooh, that poor monitor, will it survive its 13th year? ;)

Rounding error:
        clk_set_rate(lcdc->clock_ch1_s2, frequency_result / divider);

If you do not do this beforehand, you will usually get a lower divider
actually set:
        frequency_result += divider - 1;

So you're doing DIV_ROUND_UP(frequency_result, divider)

Thanks to the sunxi clock code thinking it should be higher level than
is useful or sensible.

Maybe you need a different rounding policy, like to closest instead of <=. I haven't looked at the code though, so feel free to ignore me if I'm talking nonsense :)

--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to