Commit 96525a2f authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie

drm_edid: There should be 6 Standard Timings

Smatch complained that we initialize 6 elements in add_detailed_modes()
but the timings[] array is declared with 5 elements.  Adam Jackson
verified that 6 is the correct number of timings.

On Mon, May 10, 2010 at 12:08:24PM -0400, Adam Jackson wrote:
> > >                 struct std_timing timings[5];
> > >                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> This decl is wrong, should be 6.  From the 1.4 spec:
>
> "Six additional Standard Timings may be listed as a display descriptor
> (tag #FAh)."
>
> The 1.3 spec is a little less explicit about it, but does show 6
> standard timing codes in the 0xFA detailed subblock, terminated by 0x0A
> in the 18th byte.  I don't have the docs for 1.2 or earlier, but we're
> paranoid enough about not adding broken timings that we should be fine.

This patch is basically a clean up, because timings[] is declared inside
a union and increasing the number of elements here doesn't change the
overall size of the union.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f405a1ab
...@@ -120,7 +120,7 @@ struct detailed_non_pixel { ...@@ -120,7 +120,7 @@ struct detailed_non_pixel {
struct detailed_data_string str; struct detailed_data_string str;
struct detailed_data_monitor_range range; struct detailed_data_monitor_range range;
struct detailed_data_wpindex color; struct detailed_data_wpindex color;
struct std_timing timings[5]; struct std_timing timings[6];
struct cvt_timing cvt[4]; struct cvt_timing cvt[4];
} data; } data;
} __attribute__((packed)); } __attribute__((packed));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment