video: tegra: hdmi: Fix potential crash when setting up HDMI
authorAlban Bedel <alban.bedel@avionic-design.de>
Tue, 12 May 2015 08:28:51 +0000 (13:28 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Tue, 19 May 2015 18:04:46 +0000 (11:04 -0700)
commitafa0e03b25cc6107ac9882d91f5aee233840e92d
treefc00760334bc7ff48d721069a6c1ce6e6a2148bc
parent909e29cb3cf1f71cf0579f5d9df029c16c8b7dbb
video: tegra: hdmi: Fix potential crash when setting up HDMI

The HDMI state machine registers an IRQ handler before all the resources
it needs are available. Ideally the IRQ handler should be registered
later, however it would mean a quite large change. Instead we just add
some check to avoid running the state machine as long as the
framebuffer hasn't been registered.
While at it also prevent scheduling the state machine if it hasn't been
initialized yet.

Bug 1618089

Change-Id: I8f9dc07d2a4bf7e33e869206ad83ed80af93f566
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/741616
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/video/tegra/dc/hdmi_state_machine.c