Commit d5757dbe authored by Dave Airlie's avatar Dave Airlie

Revert "drm: tegra: protect DC register access with mutex"

This reverts commit 83c0bcb6.

Lucas pointed out this was a mistake, and I missed the discussion,
so just revert it out to save a rebase.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 500df2e5
...@@ -171,8 +171,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, ...@@ -171,8 +171,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
return err; return err;
} }
mutex_lock(&dc->regs_mutex);
/* program display mode */ /* program display mode */
tegra_dc_set_timings(dc, mode); tegra_dc_set_timings(dc, mode);
...@@ -270,8 +268,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, ...@@ -270,8 +268,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_NOKEY); tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_NOKEY);
tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_1WIN); tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_1WIN);
mutex_unlock(&dc->regs_mutex);
return 0; return 0;
} }
...@@ -290,8 +286,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc) ...@@ -290,8 +286,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc)
else else
syncpt = SYNCPT_VBLANK0; syncpt = SYNCPT_VBLANK0;
mutex_lock(&dc->regs_mutex);
/* initialize display controller */ /* initialize display controller */
tegra_dc_writel(dc, 0x00000100, DC_CMD_GENERAL_INCR_SYNCPT_CNTRL); tegra_dc_writel(dc, 0x00000100, DC_CMD_GENERAL_INCR_SYNCPT_CNTRL);
tegra_dc_writel(dc, 0x100 | syncpt, DC_CMD_CONT_SYNCPT_VSYNC); tegra_dc_writel(dc, 0x100 | syncpt, DC_CMD_CONT_SYNCPT_VSYNC);
...@@ -325,8 +319,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc) ...@@ -325,8 +319,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc)
value = VBLANK_INT | WIN_A_UF_INT | WIN_B_UF_INT | WIN_C_UF_INT; value = VBLANK_INT | WIN_A_UF_INT | WIN_B_UF_INT | WIN_C_UF_INT;
tegra_dc_writel(dc, value, DC_CMD_INT_ENABLE); tegra_dc_writel(dc, value, DC_CMD_INT_ENABLE);
mutex_unlock(&dc->regs_mutex);
} }
static void tegra_crtc_commit(struct drm_crtc *crtc) static void tegra_crtc_commit(struct drm_crtc *crtc)
...@@ -337,8 +329,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc) ...@@ -337,8 +329,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc)
update_mask = GENERAL_ACT_REQ | WIN_A_ACT_REQ; update_mask = GENERAL_ACT_REQ | WIN_A_ACT_REQ;
mutex_lock(&dc->regs_mutex);
tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL); tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL);
value = tegra_dc_readl(dc, DC_CMD_INT_ENABLE); value = tegra_dc_readl(dc, DC_CMD_INT_ENABLE);
...@@ -350,8 +340,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc) ...@@ -350,8 +340,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc)
tegra_dc_writel(dc, value, DC_CMD_INT_MASK); tegra_dc_writel(dc, value, DC_CMD_INT_MASK);
tegra_dc_writel(dc, update_mask, DC_CMD_STATE_CONTROL); tegra_dc_writel(dc, update_mask, DC_CMD_STATE_CONTROL);
mutex_unlock(&dc->regs_mutex);
} }
static void tegra_crtc_load_lut(struct drm_crtc *crtc) static void tegra_crtc_load_lut(struct drm_crtc *crtc)
...@@ -758,7 +746,6 @@ static int tegra_dc_probe(struct platform_device *pdev) ...@@ -758,7 +746,6 @@ static int tegra_dc_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
INIT_LIST_HEAD(&dc->list); INIT_LIST_HEAD(&dc->list);
mutex_init(&dc->regs_mutex);
dc->dev = &pdev->dev; dc->dev = &pdev->dev;
dc->clk = devm_clk_get(&pdev->dev, NULL); dc->clk = devm_clk_get(&pdev->dev, NULL);
......
...@@ -84,7 +84,6 @@ struct tegra_dc { ...@@ -84,7 +84,6 @@ struct tegra_dc {
struct clk *clk; struct clk *clk;
struct mutex regs_mutex;
void __iomem *regs; void __iomem *regs;
int irq; int irq;
......
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