Commit b9fe8620 authored by Ricardo Cañuelo's avatar Ricardo Cañuelo Committed by Sam Ravnborg

drm/bridge: tfp410: Fix setup and hold time calculation

This fixes a bug in the calculation of the setup and hold times based on
the deskew configuration.
Signed-off-by: default avatarRicardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200617094633.19663-5-ricardo.canuelo@collabora.com
parent db8f92a5
...@@ -278,8 +278,8 @@ static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c) ...@@ -278,8 +278,8 @@ static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c)
if (deskew > 7) if (deskew > 7)
return -EINVAL; return -EINVAL;
timings->setup_time_ps = min(0, 1200 - 350 * ((s32)deskew - 4)); timings->setup_time_ps = 1200 - 350 * ((s32)deskew - 4);
timings->hold_time_ps = min(0, 1300 + 350 * ((s32)deskew - 4)); timings->hold_time_ps = max(0, 1300 + 350 * ((s32)deskew - 4));
return 0; return 0;
} }
......
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