diff options
author | Dave Airlie <airlied@redhat.com> | 2012-12-30 06:58:20 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-12-30 06:58:20 -0500 |
commit | d5757dbe79870d825d0dec30074d48683e1d7e9a (patch) | |
tree | f2edbd03bea099694bd3ce9effb6165cc104c55d | |
parent | 500df2e5d870ef5be3d37f0798f770028b69fd47 (diff) |
Revert "drm: tegra: protect DC register access with mutex"
This reverts commit 83c0bcb694be31dcd6c04bdd935b96a95a0af548.
Lucas pointed out this was a mistake, and I missed the discussion,
so just revert it out to save a rebase.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/drm.h | 1 |
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 3475bd9f9719..656b2e3334a6 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c | |||
@@ -171,8 +171,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, | |||
171 | return err; | 171 | return err; |
172 | } | 172 | } |
173 | 173 | ||
174 | mutex_lock(&dc->regs_mutex); | ||
175 | |||
176 | /* program display mode */ | 174 | /* program display mode */ |
177 | tegra_dc_set_timings(dc, mode); | 175 | tegra_dc_set_timings(dc, mode); |
178 | 176 | ||
@@ -270,8 +268,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, | |||
270 | tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_NOKEY); | 268 | tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_NOKEY); |
271 | tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_1WIN); | 269 | tegra_dc_writel(dc, 0xff00, DC_WIN_BLEND_1WIN); |
272 | 270 | ||
273 | mutex_unlock(&dc->regs_mutex); | ||
274 | |||
275 | return 0; | 271 | return 0; |
276 | } | 272 | } |
277 | 273 | ||
@@ -290,8 +286,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc) | |||
290 | else | 286 | else |
291 | syncpt = SYNCPT_VBLANK0; | 287 | syncpt = SYNCPT_VBLANK0; |
292 | 288 | ||
293 | mutex_lock(&dc->regs_mutex); | ||
294 | |||
295 | /* initialize display controller */ | 289 | /* initialize display controller */ |
296 | tegra_dc_writel(dc, 0x00000100, DC_CMD_GENERAL_INCR_SYNCPT_CNTRL); | 290 | tegra_dc_writel(dc, 0x00000100, DC_CMD_GENERAL_INCR_SYNCPT_CNTRL); |
297 | tegra_dc_writel(dc, 0x100 | syncpt, DC_CMD_CONT_SYNCPT_VSYNC); | 291 | 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 | 319 | ||
326 | value = VBLANK_INT | WIN_A_UF_INT | WIN_B_UF_INT | WIN_C_UF_INT; | 320 | value = VBLANK_INT | WIN_A_UF_INT | WIN_B_UF_INT | WIN_C_UF_INT; |
327 | tegra_dc_writel(dc, value, DC_CMD_INT_ENABLE); | 321 | tegra_dc_writel(dc, value, DC_CMD_INT_ENABLE); |
328 | |||
329 | mutex_unlock(&dc->regs_mutex); | ||
330 | } | 322 | } |
331 | 323 | ||
332 | static void tegra_crtc_commit(struct drm_crtc *crtc) | 324 | static void tegra_crtc_commit(struct drm_crtc *crtc) |
@@ -337,8 +329,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc) | |||
337 | 329 | ||
338 | update_mask = GENERAL_ACT_REQ | WIN_A_ACT_REQ; | 330 | update_mask = GENERAL_ACT_REQ | WIN_A_ACT_REQ; |
339 | 331 | ||
340 | mutex_lock(&dc->regs_mutex); | ||
341 | |||
342 | tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL); | 332 | tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL); |
343 | 333 | ||
344 | value = tegra_dc_readl(dc, DC_CMD_INT_ENABLE); | 334 | value = tegra_dc_readl(dc, DC_CMD_INT_ENABLE); |
@@ -350,8 +340,6 @@ static void tegra_crtc_commit(struct drm_crtc *crtc) | |||
350 | tegra_dc_writel(dc, value, DC_CMD_INT_MASK); | 340 | tegra_dc_writel(dc, value, DC_CMD_INT_MASK); |
351 | 341 | ||
352 | tegra_dc_writel(dc, update_mask, DC_CMD_STATE_CONTROL); | 342 | tegra_dc_writel(dc, update_mask, DC_CMD_STATE_CONTROL); |
353 | |||
354 | mutex_unlock(&dc->regs_mutex); | ||
355 | } | 343 | } |
356 | 344 | ||
357 | static void tegra_crtc_load_lut(struct drm_crtc *crtc) | 345 | static void tegra_crtc_load_lut(struct drm_crtc *crtc) |
@@ -758,7 +746,6 @@ static int tegra_dc_probe(struct platform_device *pdev) | |||
758 | return -ENOMEM; | 746 | return -ENOMEM; |
759 | 747 | ||
760 | INIT_LIST_HEAD(&dc->list); | 748 | INIT_LIST_HEAD(&dc->list); |
761 | mutex_init(&dc->regs_mutex); | ||
762 | dc->dev = &pdev->dev; | 749 | dc->dev = &pdev->dev; |
763 | 750 | ||
764 | dc->clk = devm_clk_get(&pdev->dev, NULL); | 751 | dc->clk = devm_clk_get(&pdev->dev, NULL); |
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h index 71e61f2b0741..741b5dc2742c 100644 --- a/drivers/gpu/drm/tegra/drm.h +++ b/drivers/gpu/drm/tegra/drm.h | |||
@@ -84,7 +84,6 @@ struct tegra_dc { | |||
84 | 84 | ||
85 | struct clk *clk; | 85 | struct clk *clk; |
86 | 86 | ||
87 | struct mutex regs_mutex; | ||
88 | void __iomem *regs; | 87 | void __iomem *regs; |
89 | int irq; | 88 | int irq; |
90 | 89 | ||