diff mbox series

[v4,2/2] drm/exynos: trigger build of all modules

Message ID 20190622115623.16314-3-sam@ravnborg.org (mailing list archive)
State New, archived
Headers show
Series drm/exynos: drop use of drmP.h | expand

Commit Message

Sam Ravnborg June 22, 2019, 11:56 a.m. UTC
Add COMPILE_TEST dependency to force exynos driver to
built for more than arm and to built modules
that otherwise required other symbols to be de-selected.

This will increase build coverage of the exynos driver
thus allowing most trivial build errors to be detected/fixed early.

This introduces one warning when built using sh:
exynos7_drm_decon.c: In function ‘decon_remove’:
exynos7_drm_decon.c:769:24: warning: unused variable ‘ctx’
  struct decon_context *ctx = dev_get_drvdata(&pdev->dev);

This is due to the definition of iounmap() in sh,
and nothing that exynos driver can fix.

Include fix of exynos build for alpha.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
---
 drivers/gpu/drm/exynos/Kconfig            | 6 +++---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Inki Dae June 24, 2019, 1:47 p.m. UTC | #1
HI Sam,

2019년 6월 22일 (토) 오후 8:56, Sam Ravnborg <sam@ravnborg.org>님이 작성:
>
> Add COMPILE_TEST dependency to force exynos driver to
> built for more than arm and to built modules
> that otherwise required other symbols to be de-selected.
>
> This will increase build coverage of the exynos driver
> thus allowing most trivial build errors to be detected/fixed early.
>
> This introduces one warning when built using sh:
> exynos7_drm_decon.c: In function ‘decon_remove’:
> exynos7_drm_decon.c:769:24: warning: unused variable ‘ctx’
>   struct decon_context *ctx = dev_get_drvdata(&pdev->dev);
>
> This is due to the definition of iounmap() in sh,
> and nothing that exynos driver can fix.
>
> Include fix of exynos build for alpha.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> ---
>  drivers/gpu/drm/exynos/Kconfig            | 6 +++---
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 1 +
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
> index cbe58d307d1c..60ce4a8ad9e1 100644
> --- a/drivers/gpu/drm/exynos/Kconfig
> +++ b/drivers/gpu/drm/exynos/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_EXYNOS
>         tristate "DRM Support for Samsung SoC EXYNOS Series"
> -       depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM)
> +       depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST)
>         select DRM_KMS_HELPER
>         select VIDEOMODE_HELPERS
>         select SND_SOC_HDMI_CODEC if SND_SOC
> @@ -86,7 +86,7 @@ comment "Sub-drivers"
>
>  config DRM_EXYNOS_G2D
>         bool "G2D"
> -       depends on VIDEO_SAMSUNG_S5P_G2D=n
> +       depends on VIDEO_SAMSUNG_S5P_G2D=n || COMPILE_TEST
>         select FRAME_VECTOR
>         help
>           Choose this option if you want to use Exynos G2D for DRM.
> @@ -114,7 +114,7 @@ config DRM_EXYNOS_SCALER
>
>  config DRM_EXYNOS_GSC
>         bool "GScaler"
> -       depends on VIDEO_SAMSUNG_EXYNOS_GSC=n
> +       depends on VIDEO_SAMSUNG_EXYNOS_GSC=n || COMPILE_TEST
>         select DRM_EXYNOS_IPP
>         help
>           Choose this option if you want to use Exynos GSC for DRM.
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index aefcd624fe32..b0877b97291c 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -10,6 +10,7 @@
>
>  #include <linux/console.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/vmalloc.h>

Is this change related to this patch?

Thanks,
Inki Dae

>
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_fb_helper.h>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sam Ravnborg June 24, 2019, 3:29 p.m. UTC | #2
Hi Inki

From changelog:
> >
> > Include fix of exynos build for alpha.
> >


> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> > index aefcd624fe32..b0877b97291c 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> > @@ -10,6 +10,7 @@
> >
> >  #include <linux/console.h>
> >  #include <linux/dma-mapping.h>
> > +#include <linux/vmalloc.h>
> 
> Is this change related to this patch?

This is the above mentioned fix.
Alpha often needs one to pull in vmalloc.h - where all other
architectures get it indirect via other headers.
I have never bothered to find out why alpa needs more headers files,
but I always make sure to test things using alpha so 0-day do not yell at me.

	Sam
Sam Ravnborg June 25, 2019, 4:59 a.m. UTC | #3
Hi Inki.

> > Alpha often needs one to pull in vmalloc.h - where all other
> > architectures get it indirect via other headers.
> > I have never bothered to find out why alpa needs more headers files,
> > but I always make sure to test things using alpha so 0-day do not yell at me.
> 
> I couldn't see any warning message while building your patch after dropping above change.
> Could you check it again on top of below git repo.?
>  git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
> 
> I'm going to request GIT-PULL as soon as you get back to me.

With the COMPILE_TEST patch, but without the extra fix I get:

  CC [M]  drivers/gpu/drm/exynos/exynos_drm_fbdev.o
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c: In function ‘exynos_drm_fbdev_update’:
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:94:40: error: implicit declaration of function ‘vmap’; did you mean ‘bmap’? [-Werror=implicit-function-declaration]
  exynos_gem->kvaddr = (void __iomem *) vmap(exynos_gem->pages, nr_pages,
                                        ^~~~
                                        bmap
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:95:5: error: ‘VM_MAP’ undeclared (first use in this function); did you mean ‘VM_MPX’?
     VM_MAP, pgprot_writecombine(PAGE_KERNEL));
     ^~~~~~
     VM_MPX
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c: In function ‘exynos_drm_fbdev_destroy’:
/home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:243:2: error: implicit declaration of function ‘vunmap’; did you mean ‘iounmap’? [-Werror=implicit-function-declaration]
  vunmap(exynos_gem->kvaddr);
  ^~~~~~
  iounmap
cc1: some warnings being treated as errors


This is with a freshly pulled tree from drm-exynos.git exynos-drm-next

The warning only appear if you build for alpha.
So the extra fix is indeed needed. But always good to double check -
thanks for asking.

Note:
My gcc version for alpha:
$ alpha-linux-gnu-gcc --version
alpha-linux-gnu-gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0

	Sam
Inki Dae June 25, 2019, 12:48 p.m. UTC | #4
Hi Sam,

On 19. 6. 25. 오전 12:29, Sam Ravnborg wrote:
> Hi Inki
> 
> From changelog:
>>>
>>> Include fix of exynos build for alpha.
>>>
> 
> 
>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>>> index aefcd624fe32..b0877b97291c 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>>> @@ -10,6 +10,7 @@
>>>
>>>  #include <linux/console.h>
>>>  #include <linux/dma-mapping.h>
>>> +#include <linux/vmalloc.h>
>>
>> Is this change related to this patch?
> 
> This is the above mentioned fix.
> Alpha often needs one to pull in vmalloc.h - where all other
> architectures get it indirect via other headers.
> I have never bothered to find out why alpa needs more headers files,
> but I always make sure to test things using alpha so 0-day do not yell at me.

I couldn't see any warning message while building your patch after dropping above change.
Could you check it again on top of below git repo.?
 git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next

I'm going to request GIT-PULL as soon as you get back to me.

Thanks,
Inki Dae

> 
> 	Sam
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Inki Dae June 26, 2019, 3:54 p.m. UTC | #5
Hi Sam,

On 19. 6. 25. 오후 1:59, Sam Ravnborg wrote:
> Hi Inki.
> 
>>> Alpha often needs one to pull in vmalloc.h - where all other
>>> architectures get it indirect via other headers.
>>> I have never bothered to find out why alpa needs more headers files,
>>> but I always make sure to test things using alpha so 0-day do not yell at me.
>>
>> I couldn't see any warning message while building your patch after dropping above change.
>> Could you check it again on top of below git repo.?
>>  git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
>>
>> I'm going to request GIT-PULL as soon as you get back to me.
> 
> With the COMPILE_TEST patch, but without the extra fix I get:
> 
>   CC [M]  drivers/gpu/drm/exynos/exynos_drm_fbdev.o
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c: In function ‘exynos_drm_fbdev_update’:
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:94:40: error: implicit declaration of function ‘vmap’; did you mean ‘bmap’? [-Werror=implicit-function-declaration]
>   exynos_gem->kvaddr = (void __iomem *) vmap(exynos_gem->pages, nr_pages,
>                                         ^~~~
>                                         bmap
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:95:5: error: ‘VM_MAP’ undeclared (first use in this function); did you mean ‘VM_MPX’?
>      VM_MAP, pgprot_writecombine(PAGE_KERNEL));
>      ^~~~~~
>      VM_MPX
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c: In function ‘exynos_drm_fbdev_destroy’:
> /home/sam/kernel/drm-exynos/drivers/gpu/drm/exynos/exynos_drm_fbdev.c:243:2: error: implicit declaration of function ‘vunmap’; did you mean ‘iounmap’? [-Werror=implicit-function-declaration]
>   vunmap(exynos_gem->kvaddr);
>   ^~~~~~
>   iounmap
> cc1: some warnings being treated as errors
> 
> 
> This is with a freshly pulled tree from drm-exynos.git exynos-drm-next
> 
> The warning only appear if you build for alpha.
> So the extra fix is indeed needed. But always good to double check -
> thanks for asking.

Thanks for check,
Inki Dae

> 
> Note:
> My gcc version for alpha:
> $ alpha-linux-gnu-gcc --version
> alpha-linux-gnu-gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0
> 
> 	Sam
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
index cbe58d307d1c..60ce4a8ad9e1 100644
--- a/drivers/gpu/drm/exynos/Kconfig
+++ b/drivers/gpu/drm/exynos/Kconfig
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_EXYNOS
 	tristate "DRM Support for Samsung SoC EXYNOS Series"
-	depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM)
+	depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select VIDEOMODE_HELPERS
 	select SND_SOC_HDMI_CODEC if SND_SOC
@@ -86,7 +86,7 @@  comment "Sub-drivers"
 
 config DRM_EXYNOS_G2D
 	bool "G2D"
-	depends on VIDEO_SAMSUNG_S5P_G2D=n
+	depends on VIDEO_SAMSUNG_S5P_G2D=n || COMPILE_TEST
 	select FRAME_VECTOR
 	help
 	  Choose this option if you want to use Exynos G2D for DRM.
@@ -114,7 +114,7 @@  config DRM_EXYNOS_SCALER
 
 config DRM_EXYNOS_GSC
 	bool "GScaler"
-	depends on VIDEO_SAMSUNG_EXYNOS_GSC=n
+	depends on VIDEO_SAMSUNG_EXYNOS_GSC=n || COMPILE_TEST
 	select DRM_EXYNOS_IPP
 	help
 	  Choose this option if you want to use Exynos GSC for DRM.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index aefcd624fe32..b0877b97291c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -10,6 +10,7 @@ 
 
 #include <linux/console.h>
 #include <linux/dma-mapping.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_crtc.h>
 #include <drm/drm_fb_helper.h>