[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eda19378-6184-accb-d310-793699d8220c@quicinc.com>
Date: Mon, 30 Jan 2023 08:42:01 -0700
From: Jeffrey Hugo <quic_jhugo@...cinc.com>
To: Arnd Bergmann <arnd@...nel.org>, Oded Gabbay <ogabbay@...nel.org>,
Dave Airlie <airlied@...hat.com>,
Melissa Wen <mwen@...lia.com>,
Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com>
CC: Arnd Bergmann <arnd@...db.de>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [v2] accel: fix CONFIG_DRM dependencies
On 1/27/2023 3:14 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> 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 <arnd@...db.de>
Reviewed-by: Jeffrey Hugo <quic_jhugo@...cinc.com>
Powered by blists - more mailing lists