diff options
author | Dave Airlie <airlied@redhat.com> | 2012-09-13 00:18:55 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-09-13 00:18:55 -0400 |
commit | b65523283c6853184f100c2c25642b02001e6364 (patch) | |
tree | dea81496806707062905b7ce6ea1f3bcc2d6ce6e /drivers | |
parent | 5e1782d224c79b26ab7d5c31e3f87657000714fb (diff) | |
parent | d9dd85dd4e18c255225bada181ffcee37f4ff9a6 (diff) |
Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes
Inki Dae writes:
- fix build warnings
- minor code cleanup
- remove non-standard format, DRM_FORMAT_NV12M
- add dummy mmap for exynos dmabuf
. dma_buf export needs this patch
* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
drm: Drop the NV12M and YUV420M formats
drm/exynos: remove DRM_FORMAT_NV12M from plane module
drm/exynos: fix double call of drm_prime_(init/destroy)_file_private
drm/exynos: add dummy support for dmabuf-mmap
drm/exynos: Add missing braces around sizeof in exynos_mixer.c
drm/exynos: Add missing braces around sizeof in exynos_hdmi.c
drm/exynos: Make g2d_pm_ops static
drm/exynos: Add dependency for G2D in Kconfig
drm/exynos: fixed page align bug.
drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
drm/exynos: Use devm_* functions in exynos_drm_g2d.c file
drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
drm/exynos: Remove redundant check in exynos_drm_fimd.c file
drm/exynos: Remove redundant check in exynos_hdmi.c file
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/exynos/Kconfig | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_g2d.c | 52 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 6 |
11 files changed, 29 insertions, 68 deletions
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 7f5096763b7d..59a26e577b57 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig | |||
@@ -36,6 +36,6 @@ config DRM_EXYNOS_VIDI | |||
36 | 36 | ||
37 | config DRM_EXYNOS_G2D | 37 | config DRM_EXYNOS_G2D |
38 | bool "Exynos DRM G2D" | 38 | bool "Exynos DRM G2D" |
39 | depends on DRM_EXYNOS | 39 | depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_G2D |
40 | help | 40 | help |
41 | Choose this option if you want to use Exynos G2D for DRM. | 41 | Choose this option if you want to use Exynos G2D for DRM. |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index 613bf8a5d9b2..ae13febe0eaa 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | |||
@@ -163,6 +163,12 @@ static void exynos_gem_dmabuf_kunmap(struct dma_buf *dma_buf, | |||
163 | /* TODO */ | 163 | /* TODO */ |
164 | } | 164 | } |
165 | 165 | ||
166 | static int exynos_gem_dmabuf_mmap(struct dma_buf *dma_buf, | ||
167 | struct vm_area_struct *vma) | ||
168 | { | ||
169 | return -ENOTTY; | ||
170 | } | ||
171 | |||
166 | static struct dma_buf_ops exynos_dmabuf_ops = { | 172 | static struct dma_buf_ops exynos_dmabuf_ops = { |
167 | .map_dma_buf = exynos_gem_map_dma_buf, | 173 | .map_dma_buf = exynos_gem_map_dma_buf, |
168 | .unmap_dma_buf = exynos_gem_unmap_dma_buf, | 174 | .unmap_dma_buf = exynos_gem_unmap_dma_buf, |
@@ -170,6 +176,7 @@ static struct dma_buf_ops exynos_dmabuf_ops = { | |||
170 | .kmap_atomic = exynos_gem_dmabuf_kmap_atomic, | 176 | .kmap_atomic = exynos_gem_dmabuf_kmap_atomic, |
171 | .kunmap = exynos_gem_dmabuf_kunmap, | 177 | .kunmap = exynos_gem_dmabuf_kunmap, |
172 | .kunmap_atomic = exynos_gem_dmabuf_kunmap_atomic, | 178 | .kunmap_atomic = exynos_gem_dmabuf_kunmap_atomic, |
179 | .mmap = exynos_gem_dmabuf_mmap, | ||
173 | .release = exynos_dmabuf_release, | 180 | .release = exynos_dmabuf_release, |
174 | }; | 181 | }; |
175 | 182 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 6345abe9fdee..d07071937453 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -160,7 +160,6 @@ static int exynos_drm_open(struct drm_device *dev, struct drm_file *file) | |||
160 | if (!file_priv) | 160 | if (!file_priv) |
161 | return -ENOMEM; | 161 | return -ENOMEM; |
162 | 162 | ||
163 | drm_prime_init_file_private(&file->prime); | ||
164 | file->driver_priv = file_priv; | 163 | file->driver_priv = file_priv; |
165 | 164 | ||
166 | return exynos_drm_subdrv_open(dev, file); | 165 | return exynos_drm_subdrv_open(dev, file); |
@@ -184,7 +183,6 @@ static void exynos_drm_preclose(struct drm_device *dev, | |||
184 | e->base.destroy(&e->base); | 183 | e->base.destroy(&e->base); |
185 | } | 184 | } |
186 | } | 185 | } |
187 | drm_prime_destroy_file_private(&file->prime); | ||
188 | spin_unlock_irqrestore(&dev->event_lock, flags); | 186 | spin_unlock_irqrestore(&dev->event_lock, flags); |
189 | 187 | ||
190 | exynos_drm_subdrv_close(dev, file); | 188 | exynos_drm_subdrv_close(dev, file); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index a68d2b313f03..b19cd93e7047 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -831,11 +831,6 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
831 | } | 831 | } |
832 | 832 | ||
833 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 833 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
834 | if (!res) { | ||
835 | dev_err(dev, "failed to find registers\n"); | ||
836 | ret = -ENOENT; | ||
837 | goto err_clk; | ||
838 | } | ||
839 | 834 | ||
840 | ctx->regs = devm_request_and_ioremap(&pdev->dev, res); | 835 | ctx->regs = devm_request_and_ioremap(&pdev->dev, res); |
841 | if (!ctx->regs) { | 836 | if (!ctx->regs) { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index d2d88f22a037..1065e90d0919 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c | |||
@@ -129,7 +129,6 @@ struct g2d_runqueue_node { | |||
129 | struct g2d_data { | 129 | struct g2d_data { |
130 | struct device *dev; | 130 | struct device *dev; |
131 | struct clk *gate_clk; | 131 | struct clk *gate_clk; |
132 | struct resource *regs_res; | ||
133 | void __iomem *regs; | 132 | void __iomem *regs; |
134 | int irq; | 133 | int irq; |
135 | struct workqueue_struct *g2d_workq; | 134 | struct workqueue_struct *g2d_workq; |
@@ -751,7 +750,7 @@ static int __devinit g2d_probe(struct platform_device *pdev) | |||
751 | struct exynos_drm_subdrv *subdrv; | 750 | struct exynos_drm_subdrv *subdrv; |
752 | int ret; | 751 | int ret; |
753 | 752 | ||
754 | g2d = kzalloc(sizeof(*g2d), GFP_KERNEL); | 753 | g2d = devm_kzalloc(&pdev->dev, sizeof(*g2d), GFP_KERNEL); |
755 | if (!g2d) { | 754 | if (!g2d) { |
756 | dev_err(dev, "failed to allocate driver data\n"); | 755 | dev_err(dev, "failed to allocate driver data\n"); |
757 | return -ENOMEM; | 756 | return -ENOMEM; |
@@ -759,10 +758,8 @@ static int __devinit g2d_probe(struct platform_device *pdev) | |||
759 | 758 | ||
760 | g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab", | 759 | g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab", |
761 | sizeof(struct g2d_runqueue_node), 0, 0, NULL); | 760 | sizeof(struct g2d_runqueue_node), 0, 0, NULL); |
762 | if (!g2d->runqueue_slab) { | 761 | if (!g2d->runqueue_slab) |
763 | ret = -ENOMEM; | 762 | return -ENOMEM; |
764 | goto err_free_mem; | ||
765 | } | ||
766 | 763 | ||
767 | g2d->dev = dev; | 764 | g2d->dev = dev; |
768 | 765 | ||
@@ -794,38 +791,26 @@ static int __devinit g2d_probe(struct platform_device *pdev) | |||
794 | pm_runtime_enable(dev); | 791 | pm_runtime_enable(dev); |
795 | 792 | ||
796 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 793 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
797 | if (!res) { | ||
798 | dev_err(dev, "failed to get I/O memory\n"); | ||
799 | ret = -ENOENT; | ||
800 | goto err_put_clk; | ||
801 | } | ||
802 | 794 | ||
803 | g2d->regs_res = request_mem_region(res->start, resource_size(res), | 795 | g2d->regs = devm_request_and_ioremap(&pdev->dev, res); |
804 | dev_name(dev)); | ||
805 | if (!g2d->regs_res) { | ||
806 | dev_err(dev, "failed to request I/O memory\n"); | ||
807 | ret = -ENOENT; | ||
808 | goto err_put_clk; | ||
809 | } | ||
810 | |||
811 | g2d->regs = ioremap(res->start, resource_size(res)); | ||
812 | if (!g2d->regs) { | 796 | if (!g2d->regs) { |
813 | dev_err(dev, "failed to remap I/O memory\n"); | 797 | dev_err(dev, "failed to remap I/O memory\n"); |
814 | ret = -ENXIO; | 798 | ret = -ENXIO; |
815 | goto err_release_res; | 799 | goto err_put_clk; |
816 | } | 800 | } |
817 | 801 | ||
818 | g2d->irq = platform_get_irq(pdev, 0); | 802 | g2d->irq = platform_get_irq(pdev, 0); |
819 | if (g2d->irq < 0) { | 803 | if (g2d->irq < 0) { |
820 | dev_err(dev, "failed to get irq\n"); | 804 | dev_err(dev, "failed to get irq\n"); |
821 | ret = g2d->irq; | 805 | ret = g2d->irq; |
822 | goto err_unmap_base; | 806 | goto err_put_clk; |
823 | } | 807 | } |
824 | 808 | ||
825 | ret = request_irq(g2d->irq, g2d_irq_handler, 0, "drm_g2d", g2d); | 809 | ret = devm_request_irq(&pdev->dev, g2d->irq, g2d_irq_handler, 0, |
810 | "drm_g2d", g2d); | ||
826 | if (ret < 0) { | 811 | if (ret < 0) { |
827 | dev_err(dev, "irq request failed\n"); | 812 | dev_err(dev, "irq request failed\n"); |
828 | goto err_unmap_base; | 813 | goto err_put_clk; |
829 | } | 814 | } |
830 | 815 | ||
831 | platform_set_drvdata(pdev, g2d); | 816 | platform_set_drvdata(pdev, g2d); |
@@ -838,7 +823,7 @@ static int __devinit g2d_probe(struct platform_device *pdev) | |||
838 | ret = exynos_drm_subdrv_register(subdrv); | 823 | ret = exynos_drm_subdrv_register(subdrv); |
839 | if (ret < 0) { | 824 | if (ret < 0) { |
840 | dev_err(dev, "failed to register drm g2d device\n"); | 825 | dev_err(dev, "failed to register drm g2d device\n"); |
841 | goto err_free_irq; | 826 | goto err_put_clk; |
842 | } | 827 | } |
843 | 828 | ||
844 | dev_info(dev, "The exynos g2d(ver %d.%d) successfully probed\n", | 829 | dev_info(dev, "The exynos g2d(ver %d.%d) successfully probed\n", |
@@ -846,13 +831,6 @@ static int __devinit g2d_probe(struct platform_device *pdev) | |||
846 | 831 | ||
847 | return 0; | 832 | return 0; |
848 | 833 | ||
849 | err_free_irq: | ||
850 | free_irq(g2d->irq, g2d); | ||
851 | err_unmap_base: | ||
852 | iounmap(g2d->regs); | ||
853 | err_release_res: | ||
854 | release_resource(g2d->regs_res); | ||
855 | kfree(g2d->regs_res); | ||
856 | err_put_clk: | 834 | err_put_clk: |
857 | pm_runtime_disable(dev); | 835 | pm_runtime_disable(dev); |
858 | clk_put(g2d->gate_clk); | 836 | clk_put(g2d->gate_clk); |
@@ -862,8 +840,6 @@ err_destroy_workqueue: | |||
862 | destroy_workqueue(g2d->g2d_workq); | 840 | destroy_workqueue(g2d->g2d_workq); |
863 | err_destroy_slab: | 841 | err_destroy_slab: |
864 | kmem_cache_destroy(g2d->runqueue_slab); | 842 | kmem_cache_destroy(g2d->runqueue_slab); |
865 | err_free_mem: | ||
866 | kfree(g2d); | ||
867 | return ret; | 843 | return ret; |
868 | } | 844 | } |
869 | 845 | ||
@@ -873,24 +849,18 @@ static int __devexit g2d_remove(struct platform_device *pdev) | |||
873 | 849 | ||
874 | cancel_work_sync(&g2d->runqueue_work); | 850 | cancel_work_sync(&g2d->runqueue_work); |
875 | exynos_drm_subdrv_unregister(&g2d->subdrv); | 851 | exynos_drm_subdrv_unregister(&g2d->subdrv); |
876 | free_irq(g2d->irq, g2d); | ||
877 | 852 | ||
878 | while (g2d->runqueue_node) { | 853 | while (g2d->runqueue_node) { |
879 | g2d_free_runqueue_node(g2d, g2d->runqueue_node); | 854 | g2d_free_runqueue_node(g2d, g2d->runqueue_node); |
880 | g2d->runqueue_node = g2d_get_runqueue_node(g2d); | 855 | g2d->runqueue_node = g2d_get_runqueue_node(g2d); |
881 | } | 856 | } |
882 | 857 | ||
883 | iounmap(g2d->regs); | ||
884 | release_resource(g2d->regs_res); | ||
885 | kfree(g2d->regs_res); | ||
886 | |||
887 | pm_runtime_disable(&pdev->dev); | 858 | pm_runtime_disable(&pdev->dev); |
888 | clk_put(g2d->gate_clk); | 859 | clk_put(g2d->gate_clk); |
889 | 860 | ||
890 | g2d_fini_cmdlist(g2d); | 861 | g2d_fini_cmdlist(g2d); |
891 | destroy_workqueue(g2d->g2d_workq); | 862 | destroy_workqueue(g2d->g2d_workq); |
892 | kmem_cache_destroy(g2d->runqueue_slab); | 863 | kmem_cache_destroy(g2d->runqueue_slab); |
893 | kfree(g2d); | ||
894 | 864 | ||
895 | return 0; | 865 | return 0; |
896 | } | 866 | } |
@@ -924,7 +894,7 @@ static int g2d_resume(struct device *dev) | |||
924 | } | 894 | } |
925 | #endif | 895 | #endif |
926 | 896 | ||
927 | SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume); | 897 | static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume); |
928 | 898 | ||
929 | struct platform_driver g2d_driver = { | 899 | struct platform_driver g2d_driver = { |
930 | .probe = g2d_probe, | 900 | .probe = g2d_probe, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index f9efde40c097..a38051c95ec4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c | |||
@@ -122,7 +122,7 @@ fail: | |||
122 | __free_page(pages[i]); | 122 | __free_page(pages[i]); |
123 | 123 | ||
124 | drm_free_large(pages); | 124 | drm_free_large(pages); |
125 | return ERR_PTR(PTR_ERR(p)); | 125 | return ERR_CAST(p); |
126 | } | 126 | } |
127 | 127 | ||
128 | static void exynos_gem_put_pages(struct drm_gem_object *obj, | 128 | static void exynos_gem_put_pages(struct drm_gem_object *obj, |
@@ -662,7 +662,7 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, | |||
662 | */ | 662 | */ |
663 | 663 | ||
664 | args->pitch = args->width * ((args->bpp + 7) / 8); | 664 | args->pitch = args->width * ((args->bpp + 7) / 8); |
665 | args->size = PAGE_ALIGN(args->pitch * args->height); | 665 | args->size = args->pitch * args->height; |
666 | 666 | ||
667 | exynos_gem_obj = exynos_drm_gem_create(dev, args->flags, args->size); | 667 | exynos_gem_obj = exynos_drm_gem_create(dev, args->flags, args->size); |
668 | if (IS_ERR(exynos_gem_obj)) | 668 | if (IS_ERR(exynos_gem_obj)) |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index 8ffcdf8b9e22..3fdf0b65f47e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c | |||
@@ -345,7 +345,7 @@ static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev) | |||
345 | 345 | ||
346 | DRM_DEBUG_KMS("%s\n", __FILE__); | 346 | DRM_DEBUG_KMS("%s\n", __FILE__); |
347 | 347 | ||
348 | ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); | 348 | ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); |
349 | if (!ctx) { | 349 | if (!ctx) { |
350 | DRM_LOG_KMS("failed to alloc common hdmi context.\n"); | 350 | DRM_LOG_KMS("failed to alloc common hdmi context.\n"); |
351 | return -ENOMEM; | 351 | return -ENOMEM; |
@@ -371,7 +371,6 @@ static int __devexit exynos_drm_hdmi_remove(struct platform_device *pdev) | |||
371 | DRM_DEBUG_KMS("%s\n", __FILE__); | 371 | DRM_DEBUG_KMS("%s\n", __FILE__); |
372 | 372 | ||
373 | exynos_drm_subdrv_unregister(&ctx->subdrv); | 373 | exynos_drm_subdrv_unregister(&ctx->subdrv); |
374 | kfree(ctx); | ||
375 | 374 | ||
376 | return 0; | 375 | return 0; |
377 | } | 376 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index b89829e5043a..e1f94b746bd7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c | |||
@@ -29,7 +29,6 @@ static const uint32_t formats[] = { | |||
29 | DRM_FORMAT_XRGB8888, | 29 | DRM_FORMAT_XRGB8888, |
30 | DRM_FORMAT_ARGB8888, | 30 | DRM_FORMAT_ARGB8888, |
31 | DRM_FORMAT_NV12, | 31 | DRM_FORMAT_NV12, |
32 | DRM_FORMAT_NV12M, | ||
33 | DRM_FORMAT_NV12MT, | 32 | DRM_FORMAT_NV12MT, |
34 | }; | 33 | }; |
35 | 34 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index bb1550c4dd57..537027a74fd5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -633,7 +633,7 @@ static int __devinit vidi_probe(struct platform_device *pdev) | |||
633 | 633 | ||
634 | DRM_DEBUG_KMS("%s\n", __FILE__); | 634 | DRM_DEBUG_KMS("%s\n", __FILE__); |
635 | 635 | ||
636 | ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); | 636 | ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); |
637 | if (!ctx) | 637 | if (!ctx) |
638 | return -ENOMEM; | 638 | return -ENOMEM; |
639 | 639 | ||
@@ -673,8 +673,6 @@ static int __devexit vidi_remove(struct platform_device *pdev) | |||
673 | ctx->raw_edid = NULL; | 673 | ctx->raw_edid = NULL; |
674 | } | 674 | } |
675 | 675 | ||
676 | kfree(ctx); | ||
677 | |||
678 | return 0; | 676 | return 0; |
679 | } | 677 | } |
680 | 678 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 409e2ec1207c..a6aea6f3ea1a 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -2172,7 +2172,7 @@ static int __devinit hdmi_resources_init(struct hdmi_context *hdata) | |||
2172 | 2172 | ||
2173 | DRM_DEBUG_KMS("HDMI resource init\n"); | 2173 | DRM_DEBUG_KMS("HDMI resource init\n"); |
2174 | 2174 | ||
2175 | memset(res, 0, sizeof *res); | 2175 | memset(res, 0, sizeof(*res)); |
2176 | 2176 | ||
2177 | /* get clocks, power */ | 2177 | /* get clocks, power */ |
2178 | res->hdmi = clk_get(dev, "hdmi"); | 2178 | res->hdmi = clk_get(dev, "hdmi"); |
@@ -2204,7 +2204,7 @@ static int __devinit hdmi_resources_init(struct hdmi_context *hdata) | |||
2204 | clk_set_parent(res->sclk_hdmi, res->sclk_pixel); | 2204 | clk_set_parent(res->sclk_hdmi, res->sclk_pixel); |
2205 | 2205 | ||
2206 | res->regul_bulk = kzalloc(ARRAY_SIZE(supply) * | 2206 | res->regul_bulk = kzalloc(ARRAY_SIZE(supply) * |
2207 | sizeof res->regul_bulk[0], GFP_KERNEL); | 2207 | sizeof(res->regul_bulk[0]), GFP_KERNEL); |
2208 | if (!res->regul_bulk) { | 2208 | if (!res->regul_bulk) { |
2209 | DRM_ERROR("failed to get memory for regulators\n"); | 2209 | DRM_ERROR("failed to get memory for regulators\n"); |
2210 | goto fail; | 2210 | goto fail; |
@@ -2243,7 +2243,7 @@ static int hdmi_resources_cleanup(struct hdmi_context *hdata) | |||
2243 | clk_put(res->sclk_hdmi); | 2243 | clk_put(res->sclk_hdmi); |
2244 | if (!IS_ERR_OR_NULL(res->hdmi)) | 2244 | if (!IS_ERR_OR_NULL(res->hdmi)) |
2245 | clk_put(res->hdmi); | 2245 | clk_put(res->hdmi); |
2246 | memset(res, 0, sizeof *res); | 2246 | memset(res, 0, sizeof(*res)); |
2247 | 2247 | ||
2248 | return 0; | 2248 | return 0; |
2249 | } | 2249 | } |
@@ -2312,11 +2312,6 @@ static int __devinit hdmi_probe(struct platform_device *pdev) | |||
2312 | } | 2312 | } |
2313 | 2313 | ||
2314 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2314 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2315 | if (!res) { | ||
2316 | DRM_ERROR("failed to find registers\n"); | ||
2317 | ret = -ENOENT; | ||
2318 | goto err_resource; | ||
2319 | } | ||
2320 | 2315 | ||
2321 | hdata->regs = devm_request_and_ioremap(&pdev->dev, res); | 2316 | hdata->regs = devm_request_and_ioremap(&pdev->dev, res); |
2322 | if (!hdata->regs) { | 2317 | if (!hdata->regs) { |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 30fcc12f81dd..25b97d5e5fcb 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -236,11 +236,11 @@ static inline void vp_filter_set(struct mixer_resources *res, | |||
236 | static void vp_default_filter(struct mixer_resources *res) | 236 | static void vp_default_filter(struct mixer_resources *res) |
237 | { | 237 | { |
238 | vp_filter_set(res, VP_POLY8_Y0_LL, | 238 | vp_filter_set(res, VP_POLY8_Y0_LL, |
239 | filter_y_horiz_tap8, sizeof filter_y_horiz_tap8); | 239 | filter_y_horiz_tap8, sizeof(filter_y_horiz_tap8)); |
240 | vp_filter_set(res, VP_POLY4_Y0_LL, | 240 | vp_filter_set(res, VP_POLY4_Y0_LL, |
241 | filter_y_vert_tap4, sizeof filter_y_vert_tap4); | 241 | filter_y_vert_tap4, sizeof(filter_y_vert_tap4)); |
242 | vp_filter_set(res, VP_POLY4_C0_LL, | 242 | vp_filter_set(res, VP_POLY4_C0_LL, |
243 | filter_cr_horiz_tap4, sizeof filter_cr_horiz_tap4); | 243 | filter_cr_horiz_tap4, sizeof(filter_cr_horiz_tap4)); |
244 | } | 244 | } |
245 | 245 | ||
246 | static void mixer_vsync_set_update(struct mixer_context *ctx, bool enable) | 246 | static void mixer_vsync_set_update(struct mixer_context *ctx, bool enable) |