diff options
Diffstat (limited to 'drivers/video/tegra/dc/hdmi.c')
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index a636ae8945f6..c43a6abe10b2 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -669,12 +669,18 @@ static bool tegra_dc_hdmi_mode_equal(const struct fb_videomode *mode1, int clock_per_frame = tegra_dc_calc_clock_per_frame(mode1); /* allows up to 1Hz of pixclock difference */ - return mode1->xres == mode2->xres && - mode1->yres == mode2->yres && - (mode1->pixclock == mode2->pixclock || - (abs(PICOS2KHZ(mode1->pixclock - mode2->pixclock)) * - 1000 / clock_per_frame <= 1)) && - mode1->vmode == mode2->vmode; + if (mode1->pixclock != mode2->pixclock) { + return (mode1->xres == mode2->xres && + mode1->yres == mode2->yres && + mode1->vmode == mode2->vmode && + (abs(PICOS2KHZ(mode1->pixclock) - + PICOS2KHZ(mode2->pixclock)) * + 1000 / clock_per_frame <= 1)); + } else { + return (mode1->xres == mode2->xres && + mode1->yres == mode2->yres && + mode1->vmode == mode2->vmode); + } } static bool tegra_dc_hdmi_valid_pixclock(const struct tegra_dc *dc, |