Skip to content

Commit

Permalink
drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAV…
Browse files Browse the repository at this point in the history
…E_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,
          ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Chen Gang S authored and Dave Airlie committed Feb 3, 2015
1 parent 44df9c4 commit db88c8f
Showing 6 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion drivers/gpu/drm/imx/Kconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion drivers/gpu/drm/rcar-du/Kconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion drivers/gpu/drm/shmobile/Kconfig
Original file line number Diff line number Diff line change
@@ -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
depends on FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
select BACKLIGHT_CLASS_DEVICE
2 changes: 1 addition & 1 deletion drivers/gpu/drm/sti/Kconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion drivers/gpu/drm/tilcdc/Kconfig
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit db88c8f

Please sign in to comment.