Hi,

On 02/12/2014 06:07 PM, Siarhei Siamashka wrote:
> On Wed, 12 Feb 2014 17:34:48 +0100
> Hans de Goede <[email protected]> wrote:
> 
>> The sunxi video PLL-s can unfortunately not make any random clock encountered
>> in EDID info. So hdmi_edid.c has a table to override the pixelclocks in some
>> EDID provided modes to a value which the PLL-s can actually make close to the
>> real value.
>>
>> This commit adds the preferred EDID mode from 2 hdmi projectors to this
>> table, so that sunxi-hdmi will work properly with these projectors.
>>
>> Reported-by: Jonathan Liu <[email protected]>
>> Tested-by: Jonathan Liu <[email protected]>
>> Signed-off-by: Hans de Goede <[email protected]>
>> ---
>>  drivers/video/sunxi/hdmi/hdmi_edid.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c 
>> b/drivers/video/sunxi/hdmi/hdmi_edid.c
>> index 226db0b..36bb243 100644
>> --- a/drivers/video/sunxi/hdmi/hdmi_edid.c
>> +++ b/drivers/video/sunxi/hdmi/hdmi_edid.cHi,
>> @@ -77,8 +77,10 @@ struct pclk_override {
>>  };
>>  
>>  struct pclk_override pclk_override[] = {
>> -    /* VIC PCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP  HPSW VT   VBP VFP VPSW 
>> I  HS VS   override */
>> +    /*  VIC        PCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP  HPSW  VT  VBP 
>> VFP VPSW I  HS VS   override */
>>      { { HDMI_EDID, 146250000, 0, 1680, 1050, 2240, 456, 104, 176, 1089, 36, 
>>  3, 6,  0, 0, 1 }, 146000000 },
>> +    { { HDMI_EDID,  83500000, 0, 1280,  800, 1680, 328,  72, 128,  831, 28, 
>>  3, 6,  0, 0, 1 },  83250000 },
>> +    { { HDMI_EDID,  83500000, 0, 1280,  800, 1680, 328,  72, 128,  831, 21, 
>> 10, 6,  0, 0, 1 },  83250000 },
>>      { { 0, }, -1 }
>>  };
> 
> Instead of populating this table all the time, would it be wrong to
> just always round down the pixel clock to the nearest supported value?
> And show a warning in the log whenever this happens.

That may or may not work, which is why I've gone for the table option instead, 
it is better to fall back to
something which is not native but will work, then to choose something which may 
or may not work. All the
entries in the table have been tested to actually work with at least one device 
advertising the modeline
in the table.

You got the round DOWN bit very correct BTW, at leats so far it seems that 
rounding down works better then
rounding to the closest value (which may be up).

Regards,

Hans

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to