Commit e5507d2c authored by Paul Cercueil's avatar Paul Cercueil

drm/ingenic: Set DMA descriptor chain address in probe

The address of the DMA descriptor never changes. It can therefore be set
in the probe function.

v2-v3: No change
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-6-paul@crapouillou.net
parent 1f7596f4
...@@ -358,8 +358,6 @@ static void ingenic_drm_crtc_atomic_flush(struct drm_crtc *crtc, ...@@ -358,8 +358,6 @@ static void ingenic_drm_crtc_atomic_flush(struct drm_crtc *crtc,
ingenic_drm_crtc_update_ctrl(priv, finfo); ingenic_drm_crtc_update_ctrl(priv, finfo);
clk_set_rate(priv->pix_clk, state->adjusted_mode.clock * 1000); clk_set_rate(priv->pix_clk, state->adjusted_mode.clock * 1000);
regmap_write(priv->map, JZ_REG_LCD_DA0, priv->dma_hwdesc->next);
} }
if (event) { if (event) {
...@@ -757,6 +755,9 @@ static int ingenic_drm_probe(struct platform_device *pdev) ...@@ -757,6 +755,9 @@ static int ingenic_drm_probe(struct platform_device *pdev)
} }
} }
/* Set address of our DMA descriptor chain */
regmap_write(priv->map, JZ_REG_LCD_DA0, priv->dma_hwdesc_phys);
ret = drm_dev_register(drm, 0); ret = drm_dev_register(drm, 0);
if (ret) { if (ret) {
dev_err(dev, "Failed to register DRM driver\n"); dev_err(dev, "Failed to register DRM driver\n");
......
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