diff options
author | Dave Airlie <airlied@redhat.com> | 2016-02-16 23:14:22 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-16 23:14:22 -0500 |
commit | e8f051e9d8fe15d71d8d47c0d878d51bf5f864ad (patch) | |
tree | 11aeab7a494850a2fe9b07f93fb852c8d4084281 | |
parent | 8ae22cb419ad0bae84d3ed9784c92922fa6343eb (diff) | |
parent | 00780f3b1a10d1be006b920505faf1d02f76f0e4 (diff) |
Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
Summary:
- fix compilation warnings on ARM64bit.
- fix mic driver initialization.
. MIC is a part of KMS so it converts it to use component framework
like other KMS drivers did.
- fix wrong driver state and disable clock order on DECON driver.
- fix incorrect use of dma_mmap_attrs function.
* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos/decon: fix disable clocks order
drm/exynos: fix incorrect cpu address for dma_mmap_attrs()
drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable
drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable
drm/exynos: dsi: restore support for drm bridge
drm/exynos: mic: make all functions static
drm/exynos: mic: convert to component framework
drm/exynos: mic: use devm_clk interface
drm/exynos: fix types for compilation on 64bit architectures
drm/exynos: ipp: fix incorrect format specifiers in debug messages
drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
-rw-r--r-- | drivers/gpu/drm/exynos/Kconfig | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_g2d.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 32 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_mic.c | 72 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 |
12 files changed, 77 insertions, 63 deletions
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 83efca941388..f17d39279596 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DRM_EXYNOS | 1 | config DRM_EXYNOS |
2 | tristate "DRM Support for Samsung SoC EXYNOS Series" | 2 | tristate "DRM Support for Samsung SoC EXYNOS Series" |
3 | depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM) | 3 | depends on OF && DRM && (ARCH_S3C64XX || ARCH_EXYNOS || ARCH_MULTIPLATFORM) |
4 | select DRM_KMS_HELPER | 4 | select DRM_KMS_HELPER |
5 | select DRM_KMS_FB_HELPER | 5 | select DRM_KMS_FB_HELPER |
6 | select FB_CFB_FILLRECT | 6 | select FB_CFB_FILLRECT |
diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 1bf6a21130c7..162ab93e99cb 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c | |||
@@ -93,7 +93,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc) | |||
93 | if (test_bit(BIT_SUSPENDED, &ctx->flags)) | 93 | if (test_bit(BIT_SUSPENDED, &ctx->flags)) |
94 | return -EPERM; | 94 | return -EPERM; |
95 | 95 | ||
96 | if (test_and_set_bit(BIT_IRQS_ENABLED, &ctx->flags)) { | 96 | if (!test_and_set_bit(BIT_IRQS_ENABLED, &ctx->flags)) { |
97 | val = VIDINTCON0_INTEN; | 97 | val = VIDINTCON0_INTEN; |
98 | if (ctx->out_type == IFTYPE_I80) | 98 | if (ctx->out_type == IFTYPE_I80) |
99 | val |= VIDINTCON0_FRAMEDONE; | 99 | val |= VIDINTCON0_FRAMEDONE; |
@@ -402,8 +402,6 @@ static void decon_enable(struct exynos_drm_crtc *crtc) | |||
402 | decon_enable_vblank(ctx->crtc); | 402 | decon_enable_vblank(ctx->crtc); |
403 | 403 | ||
404 | decon_commit(ctx->crtc); | 404 | decon_commit(ctx->crtc); |
405 | |||
406 | set_bit(BIT_SUSPENDED, &ctx->flags); | ||
407 | } | 405 | } |
408 | 406 | ||
409 | static void decon_disable(struct exynos_drm_crtc *crtc) | 407 | static void decon_disable(struct exynos_drm_crtc *crtc) |
@@ -582,9 +580,9 @@ out: | |||
582 | static int exynos5433_decon_suspend(struct device *dev) | 580 | static int exynos5433_decon_suspend(struct device *dev) |
583 | { | 581 | { |
584 | struct decon_context *ctx = dev_get_drvdata(dev); | 582 | struct decon_context *ctx = dev_get_drvdata(dev); |
585 | int i; | 583 | int i = ARRAY_SIZE(decon_clks_name); |
586 | 584 | ||
587 | for (i = 0; i < ARRAY_SIZE(decon_clks_name); i++) | 585 | while (--i >= 0) |
588 | clk_disable_unprepare(ctx->clks[i]); | 586 | clk_disable_unprepare(ctx->clks[i]); |
589 | 587 | ||
590 | return 0; | 588 | return 0; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index e977a81af2e6..26e81d191f56 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c | |||
@@ -1782,6 +1782,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, | |||
1782 | 1782 | ||
1783 | bridge = of_drm_find_bridge(dsi->bridge_node); | 1783 | bridge = of_drm_find_bridge(dsi->bridge_node); |
1784 | if (bridge) { | 1784 | if (bridge) { |
1785 | encoder->bridge = bridge; | ||
1785 | drm_bridge_attach(drm_dev, bridge); | 1786 | drm_bridge_attach(drm_dev, bridge); |
1786 | } | 1787 | } |
1787 | 1788 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index f6118baa8e3e..8baabd813ff5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -50,7 +50,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info, | |||
50 | if (vm_size > exynos_gem->size) | 50 | if (vm_size > exynos_gem->size) |
51 | return -EINVAL; | 51 | return -EINVAL; |
52 | 52 | ||
53 | ret = dma_mmap_attrs(helper->dev->dev, vma, exynos_gem->pages, | 53 | ret = dma_mmap_attrs(helper->dev->dev, vma, exynos_gem->cookie, |
54 | exynos_gem->dma_addr, exynos_gem->size, | 54 | exynos_gem->dma_addr, exynos_gem->size, |
55 | &exynos_gem->dma_attrs); | 55 | &exynos_gem->dma_attrs); |
56 | if (ret < 0) { | 56 | if (ret < 0) { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index c747824f3c98..8a4f4a0211d0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c | |||
@@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev) | |||
1723 | goto err_put_clk; | 1723 | goto err_put_clk; |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv); | 1726 | DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv); |
1727 | 1727 | ||
1728 | spin_lock_init(&ctx->lock); | 1728 | spin_lock_init(&ctx->lock); |
1729 | platform_set_drvdata(pdev, ctx); | 1729 | platform_set_drvdata(pdev, ctx); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index c17efdb238a6..8dfe6e113a88 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c | |||
@@ -1166,7 +1166,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data, | |||
1166 | goto err_free_event; | 1166 | goto err_free_event; |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | cmd = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd; | 1169 | cmd = (struct drm_exynos_g2d_cmd *)(unsigned long)req->cmd; |
1170 | 1170 | ||
1171 | if (copy_from_user(cmdlist->data + cmdlist->last, | 1171 | if (copy_from_user(cmdlist->data + cmdlist->last, |
1172 | (void __user *)cmd, | 1172 | (void __user *)cmd, |
@@ -1184,7 +1184,8 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data, | |||
1184 | if (req->cmd_buf_nr) { | 1184 | if (req->cmd_buf_nr) { |
1185 | struct drm_exynos_g2d_cmd *cmd_buf; | 1185 | struct drm_exynos_g2d_cmd *cmd_buf; |
1186 | 1186 | ||
1187 | cmd_buf = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd_buf; | 1187 | cmd_buf = (struct drm_exynos_g2d_cmd *) |
1188 | (unsigned long)req->cmd_buf; | ||
1188 | 1189 | ||
1189 | if (copy_from_user(cmdlist->data + cmdlist->last, | 1190 | if (copy_from_user(cmdlist->data + cmdlist->last, |
1190 | (void __user *)cmd_buf, | 1191 | (void __user *)cmd_buf, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index 32358c5e3db4..26b5e4bd55b6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c | |||
@@ -218,7 +218,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev, | |||
218 | return ERR_PTR(ret); | 218 | return ERR_PTR(ret); |
219 | } | 219 | } |
220 | 220 | ||
221 | DRM_DEBUG_KMS("created file object = 0x%x\n", (unsigned int)obj->filp); | 221 | DRM_DEBUG_KMS("created file object = %p\n", obj->filp); |
222 | 222 | ||
223 | return exynos_gem; | 223 | return exynos_gem; |
224 | } | 224 | } |
@@ -335,7 +335,7 @@ static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem, | |||
335 | if (vm_size > exynos_gem->size) | 335 | if (vm_size > exynos_gem->size) |
336 | return -EINVAL; | 336 | return -EINVAL; |
337 | 337 | ||
338 | ret = dma_mmap_attrs(drm_dev->dev, vma, exynos_gem->pages, | 338 | ret = dma_mmap_attrs(drm_dev->dev, vma, exynos_gem->cookie, |
339 | exynos_gem->dma_addr, exynos_gem->size, | 339 | exynos_gem->dma_addr, exynos_gem->size, |
340 | &exynos_gem->dma_attrs); | 340 | &exynos_gem->dma_attrs); |
341 | if (ret < 0) { | 341 | if (ret < 0) { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 7aecd23cfa11..5d20da8f957e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c | |||
@@ -1723,7 +1723,7 @@ static int gsc_probe(struct platform_device *pdev) | |||
1723 | return ret; | 1723 | return ret; |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv); | 1726 | DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv); |
1727 | 1727 | ||
1728 | mutex_init(&ctx->lock); | 1728 | mutex_init(&ctx->lock); |
1729 | platform_set_drvdata(pdev, ctx); | 1729 | platform_set_drvdata(pdev, ctx); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 67d24236e745..95eeb9116f10 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c | |||
@@ -208,7 +208,7 @@ static struct exynos_drm_ippdrv *ipp_find_drv_by_handle(u32 prop_id) | |||
208 | * e.g PAUSE state, queue buf, command control. | 208 | * e.g PAUSE state, queue buf, command control. |
209 | */ | 209 | */ |
210 | list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) { | 210 | list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) { |
211 | DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", count++, (int)ippdrv); | 211 | DRM_DEBUG_KMS("count[%d]ippdrv[%p]\n", count++, ippdrv); |
212 | 212 | ||
213 | mutex_lock(&ippdrv->cmd_lock); | 213 | mutex_lock(&ippdrv->cmd_lock); |
214 | list_for_each_entry(c_node, &ippdrv->cmd_list, list) { | 214 | list_for_each_entry(c_node, &ippdrv->cmd_list, list) { |
@@ -388,8 +388,8 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data, | |||
388 | } | 388 | } |
389 | property->prop_id = ret; | 389 | property->prop_id = ret; |
390 | 390 | ||
391 | DRM_DEBUG_KMS("created prop_id[%d]cmd[%d]ippdrv[0x%x]\n", | 391 | DRM_DEBUG_KMS("created prop_id[%d]cmd[%d]ippdrv[%p]\n", |
392 | property->prop_id, property->cmd, (int)ippdrv); | 392 | property->prop_id, property->cmd, ippdrv); |
393 | 393 | ||
394 | /* stored property information and ippdrv in private data */ | 394 | /* stored property information and ippdrv in private data */ |
395 | c_node->property = *property; | 395 | c_node->property = *property; |
@@ -518,7 +518,7 @@ static int ipp_put_mem_node(struct drm_device *drm_dev, | |||
518 | { | 518 | { |
519 | int i; | 519 | int i; |
520 | 520 | ||
521 | DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node); | 521 | DRM_DEBUG_KMS("node[%p]\n", m_node); |
522 | 522 | ||
523 | if (!m_node) { | 523 | if (!m_node) { |
524 | DRM_ERROR("invalid dequeue node.\n"); | 524 | DRM_ERROR("invalid dequeue node.\n"); |
@@ -562,7 +562,7 @@ static struct drm_exynos_ipp_mem_node | |||
562 | m_node->buf_id = qbuf->buf_id; | 562 | m_node->buf_id = qbuf->buf_id; |
563 | INIT_LIST_HEAD(&m_node->list); | 563 | INIT_LIST_HEAD(&m_node->list); |
564 | 564 | ||
565 | DRM_DEBUG_KMS("m_node[0x%x]ops_id[%d]\n", (int)m_node, qbuf->ops_id); | 565 | DRM_DEBUG_KMS("m_node[%p]ops_id[%d]\n", m_node, qbuf->ops_id); |
566 | DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]\n", qbuf->prop_id, m_node->buf_id); | 566 | DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]\n", qbuf->prop_id, m_node->buf_id); |
567 | 567 | ||
568 | for_each_ipp_planar(i) { | 568 | for_each_ipp_planar(i) { |
@@ -582,8 +582,8 @@ static struct drm_exynos_ipp_mem_node | |||
582 | 582 | ||
583 | buf_info->handles[i] = qbuf->handle[i]; | 583 | buf_info->handles[i] = qbuf->handle[i]; |
584 | buf_info->base[i] = *addr; | 584 | buf_info->base[i] = *addr; |
585 | DRM_DEBUG_KMS("i[%d]base[0x%x]hd[0x%lx]\n", i, | 585 | DRM_DEBUG_KMS("i[%d]base[%pad]hd[0x%lx]\n", i, |
586 | buf_info->base[i], buf_info->handles[i]); | 586 | &buf_info->base[i], buf_info->handles[i]); |
587 | } | 587 | } |
588 | } | 588 | } |
589 | 589 | ||
@@ -664,7 +664,7 @@ static void ipp_put_event(struct drm_exynos_ipp_cmd_node *c_node, | |||
664 | 664 | ||
665 | mutex_lock(&c_node->event_lock); | 665 | mutex_lock(&c_node->event_lock); |
666 | list_for_each_entry_safe(e, te, &c_node->event_list, base.link) { | 666 | list_for_each_entry_safe(e, te, &c_node->event_list, base.link) { |
667 | DRM_DEBUG_KMS("count[%d]e[0x%x]\n", count++, (int)e); | 667 | DRM_DEBUG_KMS("count[%d]e[%p]\n", count++, e); |
668 | 668 | ||
669 | /* | 669 | /* |
670 | * qbuf == NULL condition means all event deletion. | 670 | * qbuf == NULL condition means all event deletion. |
@@ -755,7 +755,7 @@ static struct drm_exynos_ipp_mem_node | |||
755 | 755 | ||
756 | /* find memory node from memory list */ | 756 | /* find memory node from memory list */ |
757 | list_for_each_entry(m_node, head, list) { | 757 | list_for_each_entry(m_node, head, list) { |
758 | DRM_DEBUG_KMS("count[%d]m_node[0x%x]\n", count++, (int)m_node); | 758 | DRM_DEBUG_KMS("count[%d]m_node[%p]\n", count++, m_node); |
759 | 759 | ||
760 | /* compare buffer id */ | 760 | /* compare buffer id */ |
761 | if (m_node->buf_id == qbuf->buf_id) | 761 | if (m_node->buf_id == qbuf->buf_id) |
@@ -772,7 +772,7 @@ static int ipp_set_mem_node(struct exynos_drm_ippdrv *ippdrv, | |||
772 | struct exynos_drm_ipp_ops *ops = NULL; | 772 | struct exynos_drm_ipp_ops *ops = NULL; |
773 | int ret = 0; | 773 | int ret = 0; |
774 | 774 | ||
775 | DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node); | 775 | DRM_DEBUG_KMS("node[%p]\n", m_node); |
776 | 776 | ||
777 | if (!m_node) { | 777 | if (!m_node) { |
778 | DRM_ERROR("invalid queue node.\n"); | 778 | DRM_ERROR("invalid queue node.\n"); |
@@ -1237,7 +1237,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv, | |||
1237 | m_node = list_first_entry(head, | 1237 | m_node = list_first_entry(head, |
1238 | struct drm_exynos_ipp_mem_node, list); | 1238 | struct drm_exynos_ipp_mem_node, list); |
1239 | 1239 | ||
1240 | DRM_DEBUG_KMS("m_node[0x%x]\n", (int)m_node); | 1240 | DRM_DEBUG_KMS("m_node[%p]\n", m_node); |
1241 | 1241 | ||
1242 | ret = ipp_set_mem_node(ippdrv, c_node, m_node); | 1242 | ret = ipp_set_mem_node(ippdrv, c_node, m_node); |
1243 | if (ret) { | 1243 | if (ret) { |
@@ -1610,8 +1610,8 @@ static int ipp_subdrv_probe(struct drm_device *drm_dev, struct device *dev) | |||
1610 | } | 1610 | } |
1611 | ippdrv->prop_list.ipp_id = ret; | 1611 | ippdrv->prop_list.ipp_id = ret; |
1612 | 1612 | ||
1613 | DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]ipp_id[%d]\n", | 1613 | DRM_DEBUG_KMS("count[%d]ippdrv[%p]ipp_id[%d]\n", |
1614 | count++, (int)ippdrv, ret); | 1614 | count++, ippdrv, ret); |
1615 | 1615 | ||
1616 | /* store parent device for node */ | 1616 | /* store parent device for node */ |
1617 | ippdrv->parent_dev = dev; | 1617 | ippdrv->parent_dev = dev; |
@@ -1668,7 +1668,7 @@ static int ipp_subdrv_open(struct drm_device *drm_dev, struct device *dev, | |||
1668 | 1668 | ||
1669 | file_priv->ipp_dev = dev; | 1669 | file_priv->ipp_dev = dev; |
1670 | 1670 | ||
1671 | DRM_DEBUG_KMS("done priv[0x%x]\n", (int)dev); | 1671 | DRM_DEBUG_KMS("done priv[%p]\n", dev); |
1672 | 1672 | ||
1673 | return 0; | 1673 | return 0; |
1674 | } | 1674 | } |
@@ -1685,8 +1685,8 @@ static void ipp_subdrv_close(struct drm_device *drm_dev, struct device *dev, | |||
1685 | mutex_lock(&ippdrv->cmd_lock); | 1685 | mutex_lock(&ippdrv->cmd_lock); |
1686 | list_for_each_entry_safe(c_node, tc_node, | 1686 | list_for_each_entry_safe(c_node, tc_node, |
1687 | &ippdrv->cmd_list, list) { | 1687 | &ippdrv->cmd_list, list) { |
1688 | DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", | 1688 | DRM_DEBUG_KMS("count[%d]ippdrv[%p]\n", |
1689 | count++, (int)ippdrv); | 1689 | count++, ippdrv); |
1690 | 1690 | ||
1691 | if (c_node->filp == file) { | 1691 | if (c_node->filp == file) { |
1692 | /* | 1692 | /* |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index 4eaef36aec5a..9869d70e9e54 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_graph.h> | 19 | #include <linux/of_graph.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/component.h> | ||
21 | #include <drm/drmP.h> | 22 | #include <drm/drmP.h> |
22 | #include <linux/mfd/syscon.h> | 23 | #include <linux/mfd/syscon.h> |
23 | #include <linux/regmap.h> | 24 | #include <linux/regmap.h> |
@@ -306,9 +307,9 @@ exit: | |||
306 | return ret; | 307 | return ret; |
307 | } | 308 | } |
308 | 309 | ||
309 | void mic_disable(struct drm_bridge *bridge) { } | 310 | static void mic_disable(struct drm_bridge *bridge) { } |
310 | 311 | ||
311 | void mic_post_disable(struct drm_bridge *bridge) | 312 | static void mic_post_disable(struct drm_bridge *bridge) |
312 | { | 313 | { |
313 | struct exynos_mic *mic = bridge->driver_private; | 314 | struct exynos_mic *mic = bridge->driver_private; |
314 | int i; | 315 | int i; |
@@ -328,7 +329,7 @@ already_disabled: | |||
328 | mutex_unlock(&mic_mutex); | 329 | mutex_unlock(&mic_mutex); |
329 | } | 330 | } |
330 | 331 | ||
331 | void mic_pre_enable(struct drm_bridge *bridge) | 332 | static void mic_pre_enable(struct drm_bridge *bridge) |
332 | { | 333 | { |
333 | struct exynos_mic *mic = bridge->driver_private; | 334 | struct exynos_mic *mic = bridge->driver_private; |
334 | int ret, i; | 335 | int ret, i; |
@@ -371,11 +372,35 @@ already_enabled: | |||
371 | mutex_unlock(&mic_mutex); | 372 | mutex_unlock(&mic_mutex); |
372 | } | 373 | } |
373 | 374 | ||
374 | void mic_enable(struct drm_bridge *bridge) { } | 375 | static void mic_enable(struct drm_bridge *bridge) { } |
375 | 376 | ||
376 | void mic_destroy(struct drm_bridge *bridge) | 377 | static const struct drm_bridge_funcs mic_bridge_funcs = { |
378 | .disable = mic_disable, | ||
379 | .post_disable = mic_post_disable, | ||
380 | .pre_enable = mic_pre_enable, | ||
381 | .enable = mic_enable, | ||
382 | }; | ||
383 | |||
384 | static int exynos_mic_bind(struct device *dev, struct device *master, | ||
385 | void *data) | ||
377 | { | 386 | { |
378 | struct exynos_mic *mic = bridge->driver_private; | 387 | struct exynos_mic *mic = dev_get_drvdata(dev); |
388 | int ret; | ||
389 | |||
390 | mic->bridge.funcs = &mic_bridge_funcs; | ||
391 | mic->bridge.of_node = dev->of_node; | ||
392 | mic->bridge.driver_private = mic; | ||
393 | ret = drm_bridge_add(&mic->bridge); | ||
394 | if (ret) | ||
395 | DRM_ERROR("mic: Failed to add MIC to the global bridge list\n"); | ||
396 | |||
397 | return ret; | ||
398 | } | ||
399 | |||
400 | static void exynos_mic_unbind(struct device *dev, struct device *master, | ||
401 | void *data) | ||
402 | { | ||
403 | struct exynos_mic *mic = dev_get_drvdata(dev); | ||
379 | int i; | 404 | int i; |
380 | 405 | ||
381 | mutex_lock(&mic_mutex); | 406 | mutex_lock(&mic_mutex); |
@@ -387,16 +412,16 @@ void mic_destroy(struct drm_bridge *bridge) | |||
387 | 412 | ||
388 | already_disabled: | 413 | already_disabled: |
389 | mutex_unlock(&mic_mutex); | 414 | mutex_unlock(&mic_mutex); |
415 | |||
416 | drm_bridge_remove(&mic->bridge); | ||
390 | } | 417 | } |
391 | 418 | ||
392 | static const struct drm_bridge_funcs mic_bridge_funcs = { | 419 | static const struct component_ops exynos_mic_component_ops = { |
393 | .disable = mic_disable, | 420 | .bind = exynos_mic_bind, |
394 | .post_disable = mic_post_disable, | 421 | .unbind = exynos_mic_unbind, |
395 | .pre_enable = mic_pre_enable, | ||
396 | .enable = mic_enable, | ||
397 | }; | 422 | }; |
398 | 423 | ||
399 | int exynos_mic_probe(struct platform_device *pdev) | 424 | static int exynos_mic_probe(struct platform_device *pdev) |
400 | { | 425 | { |
401 | struct device *dev = &pdev->dev; | 426 | struct device *dev = &pdev->dev; |
402 | struct exynos_mic *mic; | 427 | struct exynos_mic *mic; |
@@ -435,17 +460,8 @@ int exynos_mic_probe(struct platform_device *pdev) | |||
435 | goto err; | 460 | goto err; |
436 | } | 461 | } |
437 | 462 | ||
438 | mic->bridge.funcs = &mic_bridge_funcs; | ||
439 | mic->bridge.of_node = dev->of_node; | ||
440 | mic->bridge.driver_private = mic; | ||
441 | ret = drm_bridge_add(&mic->bridge); | ||
442 | if (ret) { | ||
443 | DRM_ERROR("mic: Failed to add MIC to the global bridge list\n"); | ||
444 | goto err; | ||
445 | } | ||
446 | |||
447 | for (i = 0; i < NUM_CLKS; i++) { | 463 | for (i = 0; i < NUM_CLKS; i++) { |
448 | mic->clks[i] = of_clk_get_by_name(dev->of_node, clk_names[i]); | 464 | mic->clks[i] = devm_clk_get(dev, clk_names[i]); |
449 | if (IS_ERR(mic->clks[i])) { | 465 | if (IS_ERR(mic->clks[i])) { |
450 | DRM_ERROR("mic: Failed to get clock (%s)\n", | 466 | DRM_ERROR("mic: Failed to get clock (%s)\n", |
451 | clk_names[i]); | 467 | clk_names[i]); |
@@ -454,7 +470,10 @@ int exynos_mic_probe(struct platform_device *pdev) | |||
454 | } | 470 | } |
455 | } | 471 | } |
456 | 472 | ||
473 | platform_set_drvdata(pdev, mic); | ||
474 | |||
457 | DRM_DEBUG_KMS("MIC has been probed\n"); | 475 | DRM_DEBUG_KMS("MIC has been probed\n"); |
476 | return component_add(dev, &exynos_mic_component_ops); | ||
458 | 477 | ||
459 | err: | 478 | err: |
460 | return ret; | 479 | return ret; |
@@ -462,14 +481,7 @@ err: | |||
462 | 481 | ||
463 | static int exynos_mic_remove(struct platform_device *pdev) | 482 | static int exynos_mic_remove(struct platform_device *pdev) |
464 | { | 483 | { |
465 | struct exynos_mic *mic = platform_get_drvdata(pdev); | 484 | component_del(&pdev->dev, &exynos_mic_component_ops); |
466 | int i; | ||
467 | |||
468 | drm_bridge_remove(&mic->bridge); | ||
469 | |||
470 | for (i = NUM_CLKS - 1; i > -1; i--) | ||
471 | clk_put(mic->clks[i]); | ||
472 | |||
473 | return 0; | 485 | return 0; |
474 | } | 486 | } |
475 | 487 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index bea0f7826d30..ce59f4443394 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c | |||
@@ -754,7 +754,7 @@ static int rotator_probe(struct platform_device *pdev) | |||
754 | goto err_ippdrv_register; | 754 | goto err_ippdrv_register; |
755 | } | 755 | } |
756 | 756 | ||
757 | DRM_DEBUG_KMS("ippdrv[0x%x]\n", (int)ippdrv); | 757 | DRM_DEBUG_KMS("ippdrv[%p]\n", ippdrv); |
758 | 758 | ||
759 | platform_set_drvdata(pdev, rot); | 759 | platform_set_drvdata(pdev, rot); |
760 | 760 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 62ac4e5fa51d..b605bd7395ec 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -223,7 +223,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work) | |||
223 | } | 223 | } |
224 | } | 224 | } |
225 | 225 | ||
226 | static int vidi_show_connection(struct device *dev, | 226 | static ssize_t vidi_show_connection(struct device *dev, |
227 | struct device_attribute *attr, char *buf) | 227 | struct device_attribute *attr, char *buf) |
228 | { | 228 | { |
229 | struct vidi_context *ctx = dev_get_drvdata(dev); | 229 | struct vidi_context *ctx = dev_get_drvdata(dev); |
@@ -238,7 +238,7 @@ static int vidi_show_connection(struct device *dev, | |||
238 | return rc; | 238 | return rc; |
239 | } | 239 | } |
240 | 240 | ||
241 | static int vidi_store_connection(struct device *dev, | 241 | static ssize_t vidi_store_connection(struct device *dev, |
242 | struct device_attribute *attr, | 242 | struct device_attribute *attr, |
243 | const char *buf, size_t len) | 243 | const char *buf, size_t len) |
244 | { | 244 | { |
@@ -294,7 +294,9 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, | |||
294 | } | 294 | } |
295 | 295 | ||
296 | if (vidi->connection) { | 296 | if (vidi->connection) { |
297 | struct edid *raw_edid = (struct edid *)(uint32_t)vidi->edid; | 297 | struct edid *raw_edid; |
298 | |||
299 | raw_edid = (struct edid *)(unsigned long)vidi->edid; | ||
298 | if (!drm_edid_is_valid(raw_edid)) { | 300 | if (!drm_edid_is_valid(raw_edid)) { |
299 | DRM_DEBUG_KMS("edid data is invalid.\n"); | 301 | DRM_DEBUG_KMS("edid data is invalid.\n"); |
300 | return -EINVAL; | 302 | return -EINVAL; |