drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS
Subsystems (9)
PATCH 1/1 drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS
DRM_GEM_CMA_HELPER is depend on HAVE_DMA_ATTRS, or it will break the building. The related error (with allmodconfig under xtensa):
CC [M] drivers/gpu/drm/drm_gem_cma_helper.o
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_create':
drivers/gpu/drm/drm_gem_cma_helper.c:110:19: error: implicit declaration of function 'dma_alloc_writecombine' [-Werror=implicit-function-declaration]
cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size,
^
drivers/gpu/drm/drm_gem_cma_helper.c:110:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size,
^
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_free_object':
drivers/gpu/drm/drm_gem_cma_helper.c:193:3: error: implicit declaration of function 'dma_free_writecombine' [-Werror=implicit-function-declaration]
dma_free_writecombine(gem_obj->dev->dev, cma_obj->base.size,
^
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_mmap_obj':
drivers/gpu/drm/drm_gem_cma_helper.c:330:8: error: implicit declaration of function 'dma_mmap_writecombine' [-Werror=implicit-function-declaration]
ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma,
^--- drivers/gpu/drm/Kconfig | 3 ++- drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +- drivers/gpu/drm/imx/Kconfig | 2 +- drivers/gpu/drm/rcar-du/Kconfig | 2 +- drivers/gpu/drm/shmobile/Kconfig | 2 +- drivers/gpu/drm/sti/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/Kconfig +2 -1
@@ -62,12 +62,13 @@ config DRM_TTM config DRM_GEM_CMA_HELPER bool - depends on DRM + depends on DRM && HAVE_DMA_ATTRS help Choose this if you need the GEM CMA helper functions config DRM_KMS_CMA_HELPER bool + depends on DRM && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT
drivers/gpu/drm/atmel-hlcdc/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_ATMEL_HLCDC tristate "DRM Support for ATMEL HLCDC Display Controller" - depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC + depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER select DRM_KMS_FB_HELPER
drivers/gpu/drm/imx/Kconfig +1 -1
@@ -5,7 +5,7 @@ config DRM_IMX select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER - depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) && HAVE_DMA_ATTRS depends on IMX_IPUV3_CORE help enable i.MX graphics support
drivers/gpu/drm/rcar-du/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_RCAR_DU tristate "DRM Support for R-Car Display Unit" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER
drivers/gpu/drm/shmobile/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPER
drivers/gpu/drm/sti/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH41x Series" - depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) && HAVE_DMA_ATTRS select RESET_CONTROLLER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER
drivers/gpu/drm/tilcdc/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" - depends on DRM && OF && ARM + depends on DRM && OF && ARM && HAVE_DMA_ATTRS select DRM_KMS_HELPER select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER
Signature · 1 line
1.9.3
After this fixing building patch, xtensa can pass allmodconfig.
- There are still several warnings for it (I sent several patches for them, but not for all).
- Xtensa gcc5 cross compiler has issues:
it causes more than 10 broken areas with allmodconfig (but no issues with defconfig). I guess, in fact, it is only 1 real issue (which can cause all breaks), and I shall try to fix it within this month.
Welcome any ideas, suggestions, or completions.
Thanks.
Quoted 124 lines · Chen Gang S
DRM_GEM_CMA_HELPERis depend onHAVE_DMA_ATTRS, or it will break the building. The related error (with allmodconfig under xtensa):CC [M]
drivers/gpu/drm/drm_gem_cma_helper.o
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_create':
drivers/gpu/drm/drm_gem_cma_helper.c:110:19: error: implicit declaration of function 'dma_alloc_writecombine' [-Werror=implicit-function-declaration]cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size, ^ drivers/gpu/drm/drm_gem_cma_helper.c:110:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size, ^ drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_free_object': drivers/gpu/drm/drm_gem_cma_helper.c:193:3: error: implicit declaration of function 'dma_free_writecombine' [-Werror=implicit-function-declaration] dma_free_writecombine(gem_obj->dev->dev, cma_obj->base.size, ^ drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_mmap_obj': drivers/gpu/drm/drm_gem_cma_helper.c:330:8: error: implicit declaration of function 'dma_mmap_writecombine' [-Werror=implicit-function-declaration] ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma, ^Signed-off-by Chen Gang <[email protected]>--- drivers/gpu/drm/Kconfig | 3 ++- drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +- drivers/gpu/drm/imx/Kconfig | 2 +- drivers/gpu/drm/rcar-du/Kconfig | 2 +- drivers/gpu/drm/shmobile/Kconfig | 2 +- drivers/gpu/drm/sti/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-)drivers/gpu/drm/Kconfig +2
-1@@ -62,12 +62,13 @@ config DRM_TTM config DRM_GEM_CMA_HELPER bool - depends on DRM + depends on DRM && HAVE_DMA_ATTRS help Choose this if you need the GEM CMA helper functions config DRM_KMS_CMA_HELPER bool + depends on DRM && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_FB_HELPER select FB_SYS_FILLRECTdrivers/gpu/drm/atmel-hlcdc/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_ATMEL_HLCDC tristate "DRM Support for ATMEL HLCDC Display Controller" - depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC + depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER select DRM_KMS_FB_HELPERdrivers/gpu/drm/imx/Kconfig +1
-1@@ -5,7 +5,7 @@ config DRM_IMX select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER - depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) && HAVE_DMA_ATTRS depends on IMX_IPUV3_CORE help enable i.MX graphics supportdrivers/gpu/drm/rcar-du/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_RCAR_DU tristate "DRM Support for R-Car Display Unit" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select DRM_KMS_HELPER select DRM_KMS_CMA_HELPERdrivers/gpu/drm/shmobile/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPERdrivers/gpu/drm/sti/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH41x Series" - depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) && HAVE_DMA_ATTRS select RESET_CONTROLLER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPERdrivers/gpu/drm/tilcdc/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" - depends on DRM && OF && ARM + depends on DRM && OF && ARM && HAVE_DMA_ATTRS select DRM_KMS_HELPER select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water, and life which God blessed
On 2/3/15 05:26, Chen Gang S wrote:
[...]
Quoted 7 lines
- Xtensa gcc5 cross compiler has issues:
it causes more than 10 broken areas with allmodconfig (but no issues with defconfig). I guess, in fact, it is only 1 real issue (which can cause all breaks), and I shall try to fix it within this month.
I finish analysing for it, it is really only one issue for gcc5, and I guess, this issue is also not only for xtensa. I send related fix patch to gcc patch mailing list, hope it can pass checking.
The cause is "the variables are not initialized before using them", the bug information is "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65117".
After fix this issue, it can build xtensa Linux kernel with allmodconfig successfully.
[...]
Thanks.
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water, and life which God blessed
Quoted 16 lines · Chen Gang S
[...]
Quoted 7 lines
- Xtensa gcc5 cross compiler has issues:
it causes more than 10 broken areas with allmodconfig (but no issues with defconfig). I guess, in fact, it is only 1 real issue (which can cause all breaks), and I shall try to fix it within this month.
I finish analysing for it, it is really only one issue for gcc5, and I guess, this issue is also not only for xtensa. I send related fix patch to gcc patch mailing list, hope it can pass checking.
Quoted 6 lines
The cause is "the variables are not initialized before using them", the bug information is "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65117".
After fix this issue, it can build xtensa Linux kernel with allmodconfig successfully.
Oh, sorry, my fix is incorrect, but gcc related members will fix it. I guess, it will be fixed soon.
But because of this issue, I can send another patch for gcc (it can not fix this issue, but it is related with this issue) :-).
Thanks.
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water, and life which God blessed
Hi Chen,
Thank you for the patch.
Quoted 61 lines · On Sunday 01 February 2015 22:08:33 Chen Gang S wrote:
DRM_GEM_CMA_HELPERis depend onHAVE_DMA_ATTRS, or it will break the building. The related error (with allmodconfig under xtensa):CC [M]
drivers/gpu/drm/drm_gem_cma_helper.o
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_create':
drivers/gpu/drm/drm_gem_cma_helper.c:110:19: error: implicit declaration
of function 'dma_alloc_writecombine' [-Werror=implicit-function-declaration]cma_obj->vaddr= dma_alloc_writecombine(drm->dev, size,^ drivers/gpu/drm/drm_gem_cma_helper.c:110:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size, ^
drivers/gpu/drm/drm_gem_cma_helper.c: In function
'drm_gem_cma_free_object':drivers/gpu/drm/drm_gem_cma_helper.c:193:3:
error: implicit declaration of function 'dma_free_writecombine' [-Werror=implicit-function-declaration] dma_free_writecombine(gem_obj->dev->dev,cma_obj->base.size,^
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_mmap_obj':
drivers/gpu/drm/drm_gem_cma_helper.c:330:8: error: implicit declaration of
function 'dma_mmap_writecombine' [-Werror=implicit-function-declaration] ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma,^Signed-off-by Chen Gang <[email protected]>--- drivers/gpu/drm/Kconfig | 3 ++- drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +- drivers/gpu/drm/imx/Kconfig | 2 +- drivers/gpu/drm/rcar-du/Kconfig | 2 +- drivers/gpu/drm/shmobile/Kconfig | 2 +- drivers/gpu/drm/sti/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-)drivers/gpu/drm/Kconfig +2
-1@@ -62,12 +62,13 @@ config DRM_TTM config DRM_GEM_CMA_HELPER bool - depends on DRM + depends on DRM && HAVE_DMA_ATTRS help Choose this if you need the GEM CMA helper functions config DRM_KMS_CMA_HELPER bool + depends on DRM && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT(quoted diff) +0
-0b/drivers/gpu/drm/atmel-hlcdc/Kconfig index 1a08562..219fc87 100644
drivers/gpu/drm/atmel-hlcdc/Kconfig line 3
Quoted 4 lines
drivers/gpu/drm/atmel-hlcdc/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_ATMEL_HLCDC tristate "DRM Support for ATMEL HLCDC Display Controller" - depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC + depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && HAVE_DMA_ATTRS
I don't like having to add the explicit dependency to all users of DRM_GEM_CMA_HELPER and DRM_KMS_CMA_HELPER, but there's no way around this given the select vs. depends issues in Kconfig.
A better solution in the longer term would be to implement HAVE_DMA_ATTRS support for xtensa (and all the other architectures that miss it), but this patch looks fine to me as an interim solution.
Quoted 64 lines
drivers/gpu/drm/atmel-hlcdc/Kconfig +0
-0select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER select DRM_KMS_FB_HELPERdrivers/gpu/drm/imx/Kconfig +1
-1@@ -5,7 +5,7 @@ config DRM_IMX select VIDEOMODE_HELPERS select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER - depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) && HAVE_DMA_ATTRS depends on IMX_IPUV3_CORE help enable i.MX graphics support(quoted diff) +0
-0b/drivers/gpu/drm/rcar-du/Kconfig index 2324a52..11485a4 100644
drivers/gpu/drm/rcar-du/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_RCAR_DU tristate "DRM Support for R-Car Display Unit" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER(quoted diff) +0
-0b/drivers/gpu/drm/shmobile/Kconfig index a50fe0e..7321c41 100644
drivers/gpu/drm/shmobile/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_SHMOBILE tristate "DRM Support for SH Mobile" - depends on DRM && ARM + depends on DRM && ARM && HAVE_DMA_ATTRS depends on ARCH_SHMOBILE || COMPILE_TEST select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPERdrivers/gpu/drm/sti/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH41x Series" - depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) &&
HAVE_DMA_ATTRSselectRESET_CONTROLLERdrivers/gpu/drm/sti/Kconfig +0
-0select DRM_KMS_HELPER select DRM_GEM_CMA_HELPERdrivers/gpu/drm/tilcdc/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" - depends on DRM && OF && ARM + depends on DRM && OF && ARM && HAVE_DMA_ATTRS select DRM_KMS_HELPER select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 75 lines · Laurent Pinchart
Hi Chen,
Thank you for the patch.
Quoted 61 lines · On Sunday 01 February 2015 22:08:33 Chen Gang S wrote:
DRM_GEM_CMA_HELPERis depend onHAVE_DMA_ATTRS, or it will break the building. The related error (with allmodconfig under xtensa):CC [M]
drivers/gpu/drm/drm_gem_cma_helper.o
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_create':
drivers/gpu/drm/drm_gem_cma_helper.c:110:19: error: implicit declaration
of function 'dma_alloc_writecombine' [-Werror=implicit-function-declaration]cma_obj->vaddr= dma_alloc_writecombine(drm->dev, size,^ drivers/gpu/drm/drm_gem_cma_helper.c:110:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size, ^
drivers/gpu/drm/drm_gem_cma_helper.c: In function
'drm_gem_cma_free_object':drivers/gpu/drm/drm_gem_cma_helper.c:193:3:
error: implicit declaration of function 'dma_free_writecombine' [-Werror=implicit-function-declaration] dma_free_writecombine(gem_obj->dev->dev,cma_obj->base.size,^
drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_mmap_obj':
drivers/gpu/drm/drm_gem_cma_helper.c:330:8: error: implicit declaration of
function 'dma_mmap_writecombine' [-Werror=implicit-function-declaration] ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma,^Signed-off-by Chen Gang <[email protected]>--- drivers/gpu/drm/Kconfig | 3 ++- drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +- drivers/gpu/drm/imx/Kconfig | 2 +- drivers/gpu/drm/rcar-du/Kconfig | 2 +- drivers/gpu/drm/shmobile/Kconfig | 2 +- drivers/gpu/drm/sti/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-)drivers/gpu/drm/Kconfig +2
-1@@ -62,12 +62,13 @@ config DRM_TTM config DRM_GEM_CMA_HELPER bool - depends on DRM + depends on DRM && HAVE_DMA_ATTRS help Choose this if you need the GEM CMA helper functions config DRM_KMS_CMA_HELPER bool + depends on DRM && HAVE_DMA_ATTRS select DRM_GEM_CMA_HELPER select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT(quoted diff) +0
-0b/drivers/gpu/drm/atmel-hlcdc/Kconfig index 1a08562..219fc87 100644
drivers/gpu/drm/atmel-hlcdc/Kconfig line 3
Quoted 4 lines
drivers/gpu/drm/atmel-hlcdc/Kconfig +1
-1@@ -1,6 +1,6 @@ config DRM_ATMEL_HLCDC tristate "DRM Support for ATMEL HLCDC Display Controller" - depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC + depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && HAVE_DMA_ATTRSI don't like having to add the explicit dependency to all users of
DRM_GEM_CMA_HELPERandDRM_KMS_CMA_HELPER, but there's no way around this given the select vs. depends issues inKconfig.
Quoted 6 lines
A better solution in the longer term would be to implement
HAVE_DMA_ATTRSsupport for xtensa (and all the other architectures that miss it), but this patch looks fine to me as an interim solution.Acked-by Laurent Pinchart <[email protected]>
OK, thanks. At present, 15 archs implement HAVE_DMA_ATTRS. I guess, it is not quite easy to let the left 15 archs support HAVE_DMA_ATTRS, so we have to accept the current interim solution.
Thanks.
Signature · 1 line
Open, share, and attitude like air, water, and life which God blessed.