[PATCH edid-decode 1/3] Do the EDID version parsing before anything else

walter harms wharms at bfs.de
Wed Dec 21 04:48:20 PST 2011



Am 21.12.2011 11:40, schrieb Tormod Volden:
> On Wed, Dec 21, 2011 at 10:23 AM, walter harms <wharms at bfs.de> wrote:
>>
>>
>> Am 20.12.2011 22:17, schrieb Tormod Volden:
>>> From: Tormod Volden <debian.tormod at gmail.com>
>>>
>>> So that the version conformance flags can be used in other code.
>>>
>>> Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
>>> ---
>>>  edid-decode.c |   38 +++++++++++++++++++-------------------
>>>  1 files changed, 19 insertions(+), 19 deletions(-)
>>>
>>> diff --git a/edid-decode.c b/edid-decode.c
>>> index ab4bde8..c3e556f 100644
>>> --- a/edid-decode.c
>>> +++ b/edid-decode.c
>>> @@ -944,6 +944,25 @@ int main(int argc, char **argv)
>>>       // return 1;
>>>      }
>>>
>>> +    printf("EDID version: %hd.%hd\n", edid[0x12], edid[0x13]);
>>> +    if (edid[0x12] == 1) {
>>> +     if (edid[0x13] > 4) {
>>> +         printf("Claims > 1.4, assuming 1.4 conformance\n");
>>> +         edid[0x13] = 4;
>>> +     }
>>
>> I have  learned that changing the original data can lead to
>> fatal consequences later on. It may not a problem now but could
>> you store edid[0x13] in revesion_id or so ?
>> That would improve readability and keep the data in the original state.
>>
>>
>>> +     switch (edid[0x13]) {
>>> +     case 4:
>>> +         claims_one_point_four = 1;
>>> +     case 3:
>>> +         claims_one_point_three = 1;
>>> +     case 2:
>>> +         claims_one_point_two = 1;
>>> +     default:
>>> +         break;
>>> +     }
>>> +     claims_one_point_oh = 1;
>>> +    }
>>> +
>>
>> Is the fall thou intended here ? If yes a small comment would help.
>> re,
>>  wh
>>
> 
> Hi Walter,
> 
> Good points, but I should maybe have been more clear about it: This
> patch just moves a block of code, I am not changing it at all.
> 
> I will consider your comments for later patches.
> 

I have no problem with that approach.
Its only when i see a potential problem i consider it unfair
if i do not ask if someone is aware of that. Sometimes it may look
a bit stupid but IMHO this is how the review process works.

re,
 wh


More information about the xorg-devel mailing list