]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode()
authorJyri Sarha <jsarha@ti.com>
Thu, 12 Oct 2017 09:19:46 +0000 (12:19 +0300)
committerJyri Sarha <jsarha@ti.com>
Fri, 13 Oct 2017 12:24:21 +0000 (15:24 +0300)
commit8f72a832a9e4303febe515d00d137374bbde4be7
tree61d725de2ecd5fc218deefc92d6ff510e049924b
parent5260e3dcdcd6a4c6e177307bead4406a7465732a
drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode()

We need the total frame refresh time to check if we are too close to
vertical sync when updating the two framebuffer DMA registers and risk
a collision. This new method is more accurate that the previous that
based on mode's vrefresh value, which itself is inaccurate or may not
even be initialized.

Reported-by: Kevin Hao <kexin.hao@windriver.com>
Fixes: af1f521ec618 ("drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled")
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c