drm/panel: simple: Fix data type in KEO TX31D200VM0BAA timings
authorStefan Agner <stefan@agner.ch>
Thu, 19 Apr 2018 21:20:03 +0000 (23:20 +0200)
committerThierry Reding <treding@nvidia.com>
Fri, 18 May 2018 10:53:35 +0000 (12:53 +0200)
All values in a struct struct timing_entry (every entry in
struct display_timing) require an integer. Choose the closest
safe integer of 32.

This avoids a warning seen with clang:
  drivers/gpu/drm/panel/panel-simple.c:1250:27: warning: implicit
       conversion from 'double' to 'u32' (aka 'unsigned int')
       changes value from 33.5 to 33 [-Wliteral-conversion]
         .vfront_porch = { 6, 21, 33.5 },
                         ~        ^~~~
  drivers/gpu/drm/panel/panel-simple.c:1251:26: warning: implicit
        conversion from 'double' to 'u32' (aka 'unsigned int')
        changes value from 33.5 to 33 [-Wliteral-conversion]
          .vback_porch = { 6, 21, 33.5 },
                         ~        ^~~~

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180419212003.8155-1-stefan@agner.ch
drivers/gpu/drm/panel/panel-simple.c

index ba2631a7de0bb56ddaecd525c063a1fe5f59ff69..964c261cfb78a6f0594cd14f2e31cdcba81aebc2 100644 (file)
@@ -1270,8 +1270,8 @@ static const struct display_timing koe_tx31d200vm0baa_timing = {
        .hback_porch = { 16, 36, 56 },
        .hsync_len = { 8, 8, 8 },
        .vactive = { 480, 480, 480 },
-       .vfront_porch = { 6, 21, 33.5 },
-       .vback_porch = { 6, 21, 33.5 },
+       .vfront_porch = { 6, 21, 33 },
+       .vback_porch = { 6, 21, 33 },
        .vsync_len = { 8, 8, 8 },
        .flags = DISPLAY_FLAGS_DE_HIGH,
 };