Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp220690pxb; Mon, 11 Apr 2022 23:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/lb9YN/UReHVOzpBXhCkDI9b37nuJQozgAXWfEVLAqohGV16xSDR94Pyjnnplq5hCBQsj X-Received: by 2002:a17:90b:3e85:b0:1c7:7eab:2649 with SMTP id rj5-20020a17090b3e8500b001c77eab2649mr3319969pjb.232.1649745625102; Mon, 11 Apr 2022 23:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649745625; cv=none; d=google.com; s=arc-20160816; b=b17QO/G1X7ZsxlaxJXgMErSS1+dadwKsVM0wDgIGyCV3iSAYC6lnwPsSxVroxpyeZO swRr0LHVmZFyM4FB3xT7giyvXCR+g9jh5f9Ej7zG3AwHIEu5mH0E1oD3F9o2tzM7u3Mj UAWnwMfmkb/Q8ar4XE8e8LRGHM6Oy7X7Lxh89gqKmo15o//nUWSCZDBBjajhJERHRJS+ cNs3XBscD6crgFsJEjLlUkv9Njzr8YQYRxeiJN8Dh6/qVcrp6ovSm+H7a8hUHtRFrwuC 3rqjwJbrnY3qqgUfHP/crUtIdGqHvFM90BXZfLmFgLBhYkf8yfm4Qay8e7z+0NWf1zUY zFIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YOgIRy8O0P5IR/RAaEBsZGjkr2tazMRVUJ7Q0pRF1bY=; b=SPIPHv39x0Hgl1wU8pTjyKr7jYod4+acNWnaUVmMv+MnE8AeMOgP/2wuGBTTMeyD3+ 4Iib32BYcrFQ3tUpnko3ZkkjjEVSeQCSB/hjQzna0pHmYwE9jc5eVBlrCM2F96gV5iFu NUeiGZq9UCODGUkDSCQeOFK0s7RBn0tvQHE9VzLpF0RnnaLhc/l954b5LKII4xgElCR2 KWd7FRHeMZyPkGz8QXKkxfEWvOZYBmu/rPsgqattxoSEkMskNHwrrbmkVYptPRAAzAQY Jpz3Y+6TzSjx+2V9aPGWGu4xE59Ij+a8zCXOQoBQp36huRdUcvEH4uvNtwXPdXQzTX53 bfog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h62-20020a638341000000b003816043f008si1830082pge.509.2022.04.11.23.40.11; Mon, 11 Apr 2022 23:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbiDKCbR (ORCPT + 99 others); Sun, 10 Apr 2022 22:31:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243662AbiDKCbF (ORCPT ); Sun, 10 Apr 2022 22:31:05 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37FE3878F for ; Sun, 10 Apr 2022 19:28:52 -0700 (PDT) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KcCNg2fF7zBsCw; Mon, 11 Apr 2022 10:24:35 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 11 Apr 2022 10:28:50 +0800 From: Zheng Bin To: , , , , , , CC: , Subject: [PATCH v3 -next] drm/vc4: Fix build error when CONFIG_DRM_VC4=y && CONFIG_RASPBERRYPI_FIRMWARE=m Date: Mon, 11 Apr 2022 10:43:25 +0800 Message-ID: <20220411024325.3968413-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_DRM_VC4=y, CONFIG_RASPBERRYPI_FIRMWARE=m, CONFIG_COMPILE_TEST=n, bulding fails: drivers/gpu/drm/vc4/vc4_drv.o: In function `vc4_drm_bind': vc4_drv.c:(.text+0x320): undefined reference to `rpi_firmware_get' vc4_drv.c:(.text+0x320): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_get' vc4_drv.c:(.text+0x34c): undefined reference to `rpi_firmware_property' vc4_drv.c:(.text+0x34c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_property' vc4_drv.c:(.text+0x354): undefined reference to `rpi_firmware_put' vc4_drv.c:(.text+0x354): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_put' Make DRM_VC4 depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE) to fix this. Fixes: c406ad5e4a85 ("drm/vc4: Notify the firmware when DRM is in charge") Reported-by: Hulk Robot Signed-off-by: Zheng Bin --- v3: add comment in drivers/gpu/drm/vc4/Kconfig v2: follow Maxime's advise, add RASPBERRYPI_FIRMWARE as an additional dependss drivers/gpu/drm/vc4/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index de3424fed2fc..6cf2621786e6 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -2,6 +2,9 @@ config DRM_VC4 tristate "Broadcom VC4 Graphics" depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST + # Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only + # happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE. + depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE) depends on DRM depends on SND && SND_SOC depends on COMMON_CLK -- 2.31.1