drm/msm/mdp4: Initialize LCDC encoder even if panel driver isn't available
authorArchit Taneja <architt@codeaurora.org>
Wed, 18 Nov 2015 11:45:50 +0000 (17:15 +0530)
committerRob Clark <robdclark@gmail.com>
Mon, 14 Dec 2015 15:39:36 +0000 (10:39 -0500)
commita6bf7f63828bf10c1da4da0b339b3c1df7c0d1f1
tree240d8f47ee695be83735a790f2109a4126f4aceb
parentec141af624bbd3932aab90b85e1fabe7fa1ca70b
drm/msm/mdp4: Initialize LCDC encoder even if panel driver isn't available

Currently, the driver defers if it doesn't find a drm_panel. This forces
us to have a drm_panel, if not, the driver isn't usable.

Make the lcdc encoder initialization independent of the availability of
the drm panel. We only check if there is a panel node specified in DT. If
it isn't, then we don't initialize the encoder at all. The panel node is
passed to the lcdc encoder and lvds connector drivers.

The connector driver takes the responsibility to retrieve the drm_panel
from the panel node, and update the status on whether the panel is
connected or not. This makes the panel usable even if the drm_panel
driver is inserted as a module later on.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c