Commit 67149a41 authored by Philipp Zabel's avatar Philipp Zabel

drm/imx: imx-tve: remove redundant enable tracking

The DRM core already takes care that encoder enable and disable calls
are balanced.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 07f2c94d
...@@ -103,7 +103,6 @@ struct imx_tve { ...@@ -103,7 +103,6 @@ struct imx_tve {
struct drm_connector connector; struct drm_connector connector;
struct drm_encoder encoder; struct drm_encoder encoder;
struct device *dev; struct device *dev;
bool enabled;
int mode; int mode;
int di_hsync_pin; int di_hsync_pin;
int di_vsync_pin; int di_vsync_pin;
...@@ -129,12 +128,8 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e) ...@@ -129,12 +128,8 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e)
static void tve_enable(struct imx_tve *tve) static void tve_enable(struct imx_tve *tve)
{ {
if (!tve->enabled) { clk_prepare_enable(tve->clk);
tve->enabled = true; regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, TVE_EN);
clk_prepare_enable(tve->clk);
regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
TVE_EN, TVE_EN);
}
/* clear interrupt status register */ /* clear interrupt status register */
regmap_write(tve->regmap, TVE_STAT_REG, 0xffffffff); regmap_write(tve->regmap, TVE_STAT_REG, 0xffffffff);
...@@ -151,11 +146,8 @@ static void tve_enable(struct imx_tve *tve) ...@@ -151,11 +146,8 @@ static void tve_enable(struct imx_tve *tve)
static void tve_disable(struct imx_tve *tve) static void tve_disable(struct imx_tve *tve)
{ {
if (tve->enabled) { regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, 0);
tve->enabled = false; clk_disable_unprepare(tve->clk);
regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, 0);
clk_disable_unprepare(tve->clk);
}
} }
static int tve_setup_tvout(struct imx_tve *tve) static int tve_setup_tvout(struct imx_tve *tve)
......
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