]> git.openfabrics.org - ~emulex/infiniband.git/commit
drm/omap: fix output enable/disable sequence
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 2 Apr 2014 08:37:06 +0000 (11:37 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 14 Apr 2014 09:34:14 +0000 (12:34 +0300)
commit2ec8e3787ae6957f738bb133e755213b9d7c066e
tree47ec00c3ca196eeea817c8eab277f1952dbd973b
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
drm/omap: fix output enable/disable sequence

At the moment it's quite easy to get the following errors when the HDMI
output is enabled or disabled:

[drm:omap_crtc_error_irq] *ERROR* tv: errors: 00008000

The reason for the errors is that the omapdrm driver doesn't properly
handle the sync-lost irqs that happen when enabling the DIGIT crtc,
which is used for HDMI and analog TV. The driver does disable the
sync-lost irq properly, but it fails to wait until the output has been
fully enabled (i.e. the first vsync), so the sync-lost errors are still
seen occasionally.

This patch makes the omapdrm act the same way as the omapfb does:

- When enabling a display, we'll wait for the first vsync.
- When disabling a display, we'll wait for framedone if available, or
  odd and even vsyncs.

These changes make sure the output is fully enabled or disabled at the
end of the function.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/omapdrm/omap_crtc.c