Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01925C54EED for ; Mon, 30 Jan 2023 15:42:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236629AbjA3Pmd (ORCPT ); Mon, 30 Jan 2023 10:42:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236494AbjA3Pm1 (ORCPT ); Mon, 30 Jan 2023 10:42:27 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E9063E0B6 for ; Mon, 30 Jan 2023 07:42:26 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30UEuWTK015251; Mon, 30 Jan 2023 15:42:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=Sy3cavb3xCIujDLylXgk3jjhWmdinb6VMlAh8qsMmDI=; b=juhb/ygNm7Lyp329GKHY4f1sHr0MUb5Mjq6OGhXC1Lek7m7ddw+Op2j7rRIjqgZsk5xT EPAYEHVKrkpsa2r7UuIi9o8BXON2GlA/QJs9o4hR+QKdMOMCX82tkS6MrASYqKHzUTwm dg+Vg6XEvv3cWLHEGBuUVVymA7L9QRWcxhFUJGITBVEY5z17ljK1mWA2GfBUPFP6OT4F VrAzM1VuUl/0TNVC2TJtwztqJTDysRyEtxJTkHQ1RJ3Miy+S9fngHxbtdsODJdK4RHqK inWgpTVTZyA6hwxDb0bZ3I0HrnS+BSTtB/NBA0al/e0+VnoBDggUE8QNxpEJLtVeajpl mQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ncsdpv4k2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 15:42:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30UFg2fE018006 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 15:42:02 GMT Received: from [10.226.59.182] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 30 Jan 2023 07:42:01 -0800 Message-ID: Date: Mon, 30 Jan 2023 08:42:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH] [v2] accel: fix CONFIG_DRM dependencies Content-Language: en-US To: Arnd Bergmann , Oded Gabbay , Dave Airlie , Melissa Wen , Jacek Lawrynowicz CC: Arnd Bergmann , Daniel Vetter , Greg Kroah-Hartman , Thomas Zimmermann , , References: <20230127221504.2522909-1-arnd@kernel.org> From: Jeffrey Hugo In-Reply-To: <20230127221504.2522909-1-arnd@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: NfEGFvhmKX8kOwcVk4V6Dhz6dfKP0k2Y X-Proofpoint-ORIG-GUID: NfEGFvhmKX8kOwcVk4V6Dhz6dfKP0k2Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-30_14,2023-01-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxlogscore=921 spamscore=0 clxscore=1011 impostorscore=0 mlxscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301300152 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/2023 3:14 PM, Arnd Bergmann wrote: > From: Arnd Bergmann > > At the moment, accel drivers can be built-in even with CONFIG_DRM=m, > but this causes a link failure: > > x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_dev_init': > ivpu_drv.c:(.text+0x1535): undefined reference to `drmm_kmalloc' > x86_64-linux-ld: ivpu_drv.c:(.text+0x1562): undefined reference to `drmm_kmalloc' > x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_remove': > ivpu_drv.c:(.text+0x1faa): undefined reference to `drm_dev_unregister' > x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_probe': > ivpu_drv.c:(.text+0x1fef): undefined reference to `__devm_drm_dev_alloc' > > The problem is that DRM_ACCEL is a 'bool' symbol symbol, so driver that > only depend on DRM_ACCEL but not also on DRM do not see the restriction > to =m configs. > > To ensure that each accel driver has an implied dependency on CONFIG_DRM, > enclose the entire Kconfig file in an if/endif check. > > Fixes: 8bf4889762a8 ("drivers/accel: define kconfig and register a new major") > Signed-off-by: Arnd Bergmann Reviewed-by: Jeffrey Hugo