]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commitce99f7206c9105851d97202ed08c058af6f11ac4
tree61d725de2ecd5fc218deefc92d6ff510e049924b
parentba3fd954f0b4c2df1e0d7e243cb6735c6f4c5bdc
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: 11abbc9f39e0 ("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