Commit 195e672a authored by Chandrabhanu Mahapatra's avatar Chandrabhanu Mahapatra Committed by Tomi Valkeinen

OMAPDSS: DPI: Remove cpu_is_xxxx checks

The OMAP3 checks have been removed and replaced by a dss feature
FEAT_DPI_USES_VDDS_DSI for cleaner implementation. The patches
"OMAP: DSS2: enable VDDS_DSI when using DPI" (8a2cfea8) by Tomi Valkeinen
<tomi.valkeinen@nokia.com> and "ARM: omap: fix oops in
drivers/video/omap2/dss/dpi.c" (40410715) by Russell King
<rmk+kernel@arm.linux.org.uk> had introduced these checks. As it is evident
from these patches a dependency exists for some DSS pins on VDDS_DSI which is
better shown by dss feature FEAT_DPI_USES_VDDS_DSI.
Signed-off-by: default avatarChandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent ee223b70
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <plat/cpu.h> #include <plat/cpu.h>
#include "dss.h" #include "dss.h"
#include "dss_features.h"
static struct { static struct {
struct regulator *vdds_dsi_reg; struct regulator *vdds_dsi_reg;
...@@ -175,7 +176,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) ...@@ -175,7 +176,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
mutex_lock(&dpi.lock); mutex_lock(&dpi.lock);
if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) && !dpi.vdds_dsi_reg) {
DSSERR("no VDSS_DSI regulator\n"); DSSERR("no VDSS_DSI regulator\n");
r = -ENODEV; r = -ENODEV;
goto err_no_reg; goto err_no_reg;
...@@ -193,7 +194,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) ...@@ -193,7 +194,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
goto err_start_dev; goto err_start_dev;
} }
if (cpu_is_omap34xx()) { if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI)) {
r = regulator_enable(dpi.vdds_dsi_reg); r = regulator_enable(dpi.vdds_dsi_reg);
if (r) if (r)
goto err_reg_enable; goto err_reg_enable;
...@@ -239,7 +240,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) ...@@ -239,7 +240,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
err_get_dsi: err_get_dsi:
dispc_runtime_put(); dispc_runtime_put();
err_get_dispc: err_get_dispc:
if (cpu_is_omap34xx()) if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI))
regulator_disable(dpi.vdds_dsi_reg); regulator_disable(dpi.vdds_dsi_reg);
err_reg_enable: err_reg_enable:
omap_dss_stop_device(dssdev); omap_dss_stop_device(dssdev);
...@@ -265,7 +266,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) ...@@ -265,7 +266,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
dispc_runtime_put(); dispc_runtime_put();
if (cpu_is_omap34xx()) if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI))
regulator_disable(dpi.vdds_dsi_reg); regulator_disable(dpi.vdds_dsi_reg);
omap_dss_stop_device(dssdev); omap_dss_stop_device(dssdev);
...@@ -362,7 +363,8 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) ...@@ -362,7 +363,8 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
{ {
DSSDBG("init_display\n"); DSSDBG("init_display\n");
if (cpu_is_omap34xx() && dpi.vdds_dsi_reg == NULL) { if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
dpi.vdds_dsi_reg == NULL) {
struct regulator *vdds_dsi; struct regulator *vdds_dsi;
vdds_dsi = dss_get_vdds_dsi(); vdds_dsi = dss_get_vdds_dsi();
......
...@@ -373,6 +373,7 @@ static const enum dss_feat_id omap3430_dss_feat_list[] = { ...@@ -373,6 +373,7 @@ static const enum dss_feat_id omap3430_dss_feat_list[] = {
FEAT_ALPHA_FIXED_ZORDER, FEAT_ALPHA_FIXED_ZORDER,
FEAT_FIFO_MERGE, FEAT_FIFO_MERGE,
FEAT_OMAP3_DSI_FIFO_BUG, FEAT_OMAP3_DSI_FIFO_BUG,
FEAT_DPI_USES_VDDS_DSI,
}; };
static const enum dss_feat_id omap3630_dss_feat_list[] = { static const enum dss_feat_id omap3630_dss_feat_list[] = {
......
...@@ -50,6 +50,7 @@ enum dss_feat_id { ...@@ -50,6 +50,7 @@ enum dss_feat_id {
FEAT_DSI_VC_OCP_WIDTH, FEAT_DSI_VC_OCP_WIDTH,
FEAT_DSI_REVERSE_TXCLKESC, FEAT_DSI_REVERSE_TXCLKESC,
FEAT_DSI_GNQ, FEAT_DSI_GNQ,
FEAT_DPI_USES_VDDS_DSI,
FEAT_HDMI_CTS_SWMODE, FEAT_HDMI_CTS_SWMODE,
FEAT_HDMI_AUDIO_USE_MCLK, FEAT_HDMI_AUDIO_USE_MCLK,
FEAT_HANDLE_UV_SEPARATE, FEAT_HANDLE_UV_SEPARATE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment