• Arnd Bergmann's avatar
    drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM · bdab8e8b
    Arnd Bergmann authored
    When compile-testing for something other than ARCH_QCOM,
    we run into a link error:
    
    drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init':
    a5xx_gpu.c:(.text.a5xx_hw_init+0x600): undefined reference to `qcom_mdt_get_size'
    a5xx_gpu.c:(.text.a5xx_hw_init+0x93c): undefined reference to `qcom_mdt_load'
    
    There is already an #ifdef that tries to check for CONFIG_QCOM_MDT_LOADER,
    but that symbol is only meaningful when building for ARCH_QCOM.
    
    This adds a compile-time check for ARCH_QCOM, and clarifies the
    Kconfig select statement so we don't even try it for other targets.
    
    The check for CONFIG_QCOM_MDT_LOADER can then go away, which also
    improves compile-time coverage and makes the code a little nicer
    to read.
    
    Fixes: 7c65817e ("drm/msm: gpu: Enable zap shader for A5XX")
    Acked-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
    Acked-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
    bdab8e8b
a5xx_gpu.c 31.3 KB