Skip to content

Commit

Permalink
drm/imx: imx-tve: remove redundant enable tracking
Browse files Browse the repository at this point in the history
The DRM core already takes care that encoder enable and disable calls
are balanced.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
  • Loading branch information
Philipp Zabel committed Oct 26, 2020
1 parent 07f2c94 commit 67149a4
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions drivers/gpu/drm/imx/imx-tve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 67149a4

Please sign in to comment.