diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-07-21 17:16:21 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2020-10-26 10:42:38 +0100 |
commit | 67149a41b1a097cead2b024cb9533508bd85d953 (patch) | |
tree | e02729a8c9e91a4b1c3e29acfad3485d39615eda /drivers/gpu/drm/imx | |
parent | 07f2c94d033b3bac3236058a241de62383b048a1 (diff) | |
download | linux-67149a41b1a097cead2b024cb9533508bd85d953.tar.bz2 |
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: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r-- | drivers/gpu/drm/imx/imx-tve.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c index 854f56603210..ef3c25d87d87 100644 --- a/drivers/gpu/drm/imx/imx-tve.c +++ b/drivers/gpu/drm/imx/imx-tve.c @@ -103,7 +103,6 @@ struct imx_tve { struct drm_connector connector; struct drm_encoder encoder; struct device *dev; - bool enabled; int mode; int di_hsync_pin; int di_vsync_pin; @@ -129,12 +128,8 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e) static void tve_enable(struct imx_tve *tve) { - if (!tve->enabled) { - tve->enabled = true; - clk_prepare_enable(tve->clk); - 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 */ regmap_write(tve->regmap, TVE_STAT_REG, 0xffffffff); @@ -151,11 +146,8 @@ static void tve_enable(struct imx_tve *tve) static void tve_disable(struct imx_tve *tve) { - if (tve->enabled) { - tve->enabled = false; - regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, 0); - 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) |