diff mbox series

drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency

Message ID 20210103140407.3917405-1-arnd@kernel.org (mailing list archive)
State Not Applicable, archived
Headers show
Series drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency | expand

Commit Message

Arnd Bergmann Jan. 3, 2021, 2:03 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

When LLCC support is in a loadable module, the adreno support
cannot be built-in:

aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_gpu_init':
a6xx_gpu.c:(.text+0xe0): undefined reference to `llcc_slice_getd'
a6xx_gpu.c:(.text+0xe0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd'
aarch64-linux-ld: a6xx_gpu.c:(.text+0xec): undefined reference to `llcc_slice_getd'
a6xx_gpu.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd'
aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_destroy':
a6xx_gpu.c:(.text+0x274): undefined reference to `llcc_slice_putd'
a6xx_gpu.c:(.text+0x274): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_putd'
aarch64-linux-ld: a6xx_gpu.c:(.text+0x27c): undefined reference to `llcc_slice_putd'

Add a Kconfig dependency that disallows the broken configuration
but allows all working ones.

Fixes: 474dadb8b0d5 ("drm/msm/a6xx: Add support for using system cache(LLC)")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/msm/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

kernel test robot Jan. 3, 2021, 3:09 p.m. UTC | #1
Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc1 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3516bd729358a2a9b090c1905bd2a3fa926e24c6
config: i386-randconfig-m021-20210103 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/7d8b8d7954012e210a5e6c77103e52382c6b5503
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
        git checkout 7d8b8d7954012e210a5e6c77103e52382c6b5503
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/Kconfig:74:error: recursive dependency detected!
   drivers/gpu/drm/Kconfig:74: symbol DRM_KMS_HELPER is selected by DRM_MSM
   drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_COMMAND_DB
   drivers/soc/qcom/Kconfig:19: symbol QCOM_COMMAND_DB depends on OF_RESERVED_MEM
   drivers/of/Kconfig:80: symbol OF_RESERVED_MEM default is visible depending on DMA_CMA
   kernel/dma/Kconfig:109: symbol DMA_CMA is selected by FB_HYPERV
   drivers/video/fbdev/Kconfig:2182: symbol FB_HYPERV depends on FB
   drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
   drivers/gpu/drm/Kconfig:80: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
   For a resolution refer to Documentation/kbuild/kconfig-language.rst
   subsection "Kconfig recursive dependency limitations"


vim +74 drivers/gpu/drm/Kconfig

6fcefd56f5060ca Dave Airlie   2009-09-08 @74  config DRM_KMS_HELPER
13a8195b148615b Dave Airlie   2009-09-07  75  	tristate
13a8195b148615b Dave Airlie   2009-09-07  76  	depends on DRM
92b6f89f6b85f43 Daniel Vetter 2013-10-08  77  	help
92b6f89f6b85f43 Daniel Vetter 2013-10-08  78  	  CRTC helpers for KMS drivers.
92b6f89f6b85f43 Daniel Vetter 2013-10-08  79  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Arnd Bergmann Jan. 3, 2021, 3:24 p.m. UTC | #2
On Sun, Jan 3, 2021 at 4:09 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Arnd,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v5.11-rc1 next-20201223]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3516bd729358a2a9b090c1905bd2a3fa926e24c6
> config: i386-randconfig-m021-20210103 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
>         # https://github.com/0day-ci/linux/commit/7d8b8d7954012e210a5e6c77103e52382c6b5503
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
>         git checkout 7d8b8d7954012e210a5e6c77103e52382c6b5503
>         # save the attached .config to linux build tree
>         make W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/gpu/drm/Kconfig:74:error: recursive dependency detected!
>    drivers/gpu/drm/Kconfig:74: symbol DRM_KMS_HELPER is selected by DRM_MSM
>    drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_COMMAND_DB
>    drivers/soc/qcom/Kconfig:19: symbol QCOM_COMMAND_DB depends on OF_RESERVED_MEM
>    drivers/of/Kconfig:80: symbol OF_RESERVED_MEM default is visible depending on DMA_CMA
>    kernel/dma/Kconfig:109: symbol DMA_CMA is selected by FB_HYPERV
>    drivers/video/fbdev/Kconfig:2182: symbol FB_HYPERV depends on FB
>    drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
>    drivers/gpu/drm/Kconfig:80: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
>    For a resolution refer to Documentation/kbuild/kconfig-language.rst
>    subsection "Kconfig recursive dependency limitations"

Ah, this depends on another patch of mine that I have in my randconfig tree, to
replace the 'select FB' in DRM_KMS_FB_HELPER with 'depends on FB'.

Should I resend that patch, or would someone suggest a different fix for
the CONFIG_QCOM_LLCC dependency issue?

       Arnd
kernel test robot Jan. 3, 2021, 4:21 p.m. UTC | #3
Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc1 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3516bd729358a2a9b090c1905bd2a3fa926e24c6
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/7d8b8d7954012e210a5e6c77103e52382c6b5503
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
        git checkout 7d8b8d7954012e210a5e6c77103e52382c6b5503
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> Error: kernelrelease not valid - run 'make prepare' to update it
--
>> drivers/gpu/drm/Kconfig:74:error: recursive dependency detected!
   drivers/gpu/drm/Kconfig:74: symbol DRM_KMS_HELPER is selected by DRM_MSM
   drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_COMMAND_DB
   drivers/soc/qcom/Kconfig:19: symbol QCOM_COMMAND_DB depends on OF_RESERVED_MEM
   drivers/of/Kconfig:80: symbol OF_RESERVED_MEM default is visible depending on DMA_CMA
   kernel/dma/Kconfig:109: symbol DMA_CMA is selected by FB_HYPERV
   drivers/video/fbdev/Kconfig:2182: symbol FB_HYPERV depends on FB
   drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
   drivers/gpu/drm/Kconfig:80: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
   For a resolution refer to Documentation/kbuild/kconfig-language.rst
   subsection "Kconfig recursive dependency limitations"
--
   Makefile arch drivers include scripts source usr [scripts/kconfig/Makefile:71: syncconfig] Error 1
   Makefile arch drivers include scripts source usr [Makefile:602: syncconfig] Error 2
   Makefile arch drivers include scripts source usr [Makefile:710: include/config/auto.conf.cmd] Error 2
   Failed to remake makefile 'include/config/auto.conf.cmd'.
   Failed to remake makefile 'include/config/auto.conf'.
   Makefile arch drivers include scripts source usr [arch/x86/Makefile:278: checkbin] Error 1
>> Error: kernelrelease not valid - run 'make prepare' to update it
   Target 'prepare' not remade because of errors.
   make: Makefile arch drivers include scripts source usr [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Sai Prakash Ranjan Jan. 4, 2021, 7:23 a.m. UTC | #4
Hi Arnd,

On 2021-01-03 20:54, Arnd Bergmann wrote:
> On Sun, Jan 3, 2021 at 4:09 PM kernel test robot <lkp@intel.com> wrote:
>> 
>> Hi Arnd,
>> 
>> I love your patch! Yet something to improve:
>> 
>> [auto build test ERROR on linus/master]
>> [also build test ERROR on v5.11-rc1 next-20201223]
>> [If your patch is applied to the wrong git tree, kindly drop us a 
>> note.
>> And when submitting patch, we suggest to use '--base' as documented in
>> https://git-scm.com/docs/git-format-patch]
>> 
>> url:    
>> https://github.com/0day-ci/linux/commits/Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
>> base:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>> 3516bd729358a2a9b090c1905bd2a3fa926e24c6
>> config: i386-randconfig-m021-20210103 (attached as .config)
>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>> reproduce (this is a W=1 build):
>>         # 
>> https://github.com/0day-ci/linux/commit/7d8b8d7954012e210a5e6c77103e52382c6b5503
>>         git remote add linux-review https://github.com/0day-ci/linux
>>         git fetch --no-tags linux-review 
>> Arnd-Bergmann/drm-msm-a6xx-add-CONFIG_QCOM_LLCC-dependency/20210103-220704
>>         git checkout 7d8b8d7954012e210a5e6c77103e52382c6b5503
>>         # save the attached .config to linux build tree
>>         make W=1 ARCH=i386
>> 
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>> 
>> All errors (new ones prefixed by >>):
>> 
>> >> drivers/gpu/drm/Kconfig:74:error: recursive dependency detected!
>>    drivers/gpu/drm/Kconfig:74: symbol DRM_KMS_HELPER is selected by 
>> DRM_MSM
>>    drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on 
>> QCOM_COMMAND_DB
>>    drivers/soc/qcom/Kconfig:19: symbol QCOM_COMMAND_DB depends on 
>> OF_RESERVED_MEM
>>    drivers/of/Kconfig:80: symbol OF_RESERVED_MEM default is visible 
>> depending on DMA_CMA
>>    kernel/dma/Kconfig:109: symbol DMA_CMA is selected by FB_HYPERV
>>    drivers/video/fbdev/Kconfig:2182: symbol FB_HYPERV depends on FB
>>    drivers/video/fbdev/Kconfig:12: symbol FB is selected by 
>> DRM_KMS_FB_HELPER
>>    drivers/gpu/drm/Kconfig:80: symbol DRM_KMS_FB_HELPER depends on 
>> DRM_KMS_HELPER
>>    For a resolution refer to Documentation/kbuild/kconfig-language.rst
>>    subsection "Kconfig recursive dependency limitations"
> 
> Ah, this depends on another patch of mine that I have in my randconfig 
> tree, to
> replace the 'select FB' in DRM_KMS_FB_HELPER with 'depends on FB'.
> 
> Should I resend that patch, or would someone suggest a different fix 
> for
> the CONFIG_QCOM_LLCC dependency issue?
> 

Thanks, your patch looks good to me unless Rob has some other idea. Once 
the recursive
dependency thing is sorted,

Reviewed-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

Thanks,
Sai
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index dabb4a1ccdcf..b8e02859fd92 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -7,6 +7,8 @@  config DRM_MSM
 	depends on IOMMU_SUPPORT
 	depends on OF && COMMON_CLK
 	depends on QCOM_OCMEM || QCOM_OCMEM=n
+	depends on QCOM_LLCC || QCOM_LLCC=n
+	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
@@ -15,7 +17,6 @@  config DRM_MSM
 	select SHMEM
 	select TMPFS
 	select QCOM_SCM if ARCH_QCOM
-	select QCOM_COMMAND_DB if ARCH_QCOM
 	select WANT_DEV_COREDUMP
 	select SND_SOC_HDMI_CODEC if SND_SOC
 	select SYNC_FILE