Skip to contentSkip to conversation

atmel_lcdfb: max pixclock check

DISCUSSION Nicolas Ferre 1 participant 1 message May 12, 2009 1 message not in the archive Framebuffer layer

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Daniel Glöckner :

Quoted 10 lines

Hi,
in the current Atmel LCD framebuffer driver there is the following check in the fb_check_var callback:

if ((PICOS2KHZ(var->pixclock) * var->bits_per_pixel / 8) > clk_value_khz) {
	dev_err(dev, "%lu KHz pixel clock is too fast\n",
		PICOS2KHZ(var->pixclock));
	return -EINVAL;
}
Quoted 3 lines

I can't find any constraint like this in the data sheets and application note. What I can find is a minimum for clk_value_khz/PICOS2KHZ(var->pixclock) depending on the display type, scan mode, and interface width.

Indeed, I have just acked a patch from Ben Nizette removing this constrain.
http://lkml.org/lkml/2009/5/12/189

Quoted 2 lines

Is the quoted if-statement correct or should it be changed to a minimum clock divider check?

We can imagine such a check depending on display type. Patches welcome ;-)

Quoted 2 lines

And while we're at it, is it correct to return -EINVAL here instead of changing var->pixclock to the closest supported value?

I do not know... Maybe someone on linux-fb-devel can answer ?

Bye,

Signature · 1 line
Nicolas Ferre