[PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it

Alex Deucher alexdeucher at gmail.com
Fri Dec 16 18:25:32 UTC 2022


On Fri, Dec 16, 2022 at 1:11 PM Uwe Kleine-König
<u.kleine-koenig at pengutronix.de> wrote:
>
> On Mon, Nov 28, 2022 at 07:16:11PM +0100, Thomas Zimmermann wrote:
> > Hi
> >
> > Am 12.09.22 um 11:15 schrieb Uwe Kleine-König:
> > > While working on a drm driver that doesn't need the i2c algobit stuff I
> > > noticed that DRM selects this code even tough only 8 drivers actually use
> > > it. While also only some drivers use i2c, keep the select for I2C for the
> > > next cleanup patch. Still prepare this already by also selecting I2C for
> > > the individual drivers.
> > >
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> > > ---
> > > Changes since v1
> > > (20210514100142.1182997-1-u.kleine-koenig at pengutronix.de) from
> > > 2021-05-14:
> > >
> > >   - rebased to next-20220909
> > >     was something around v5.13-rc2 before, required to fix context
> > >     changes in the nouveau Kconfig file. git am -3 handled it just fine.
> > >
> > > I reverified that no new drivers were added that need a corresponding
> > > select.
> > >
> > > Best regards
> > > Uwe
> > >
> > >   drivers/gpu/drm/Kconfig                 | 5 ++++-
> > >   drivers/gpu/drm/ast/Kconfig             | 2 ++
> > >   drivers/gpu/drm/gma500/Kconfig          | 2 ++
> > >   drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 ++
> > >   drivers/gpu/drm/i915/Kconfig            | 2 ++
> > >   drivers/gpu/drm/mgag200/Kconfig         | 2 ++
> > >   drivers/gpu/drm/nouveau/Kconfig         | 2 ++
> > >   7 files changed, 16 insertions(+), 1 deletion(-)
> >
> > amdgpu and radeon also include <linux/i2c-algo-bit.h>. Are they special in
> > some way?
>
> You wonder why there is no change in drivers/gpu/drm/amd/amdgpu/Kconfig
> and drivers/gpu/drm/radeon/Kconfig, right?
>
> Yes, amdgpu and radeon are special because their toplevel Kconfig
> symbols (DRM_AMDGPU and DRM_RADEON respectively) are defined in
> drivers/gpu/drm/Kconfig. For the other 6 drivers it's in their own
> Kconfig file.

FWIW, these moved into their own for 6.2.

Alex

>
> If that isn't your concern, please retry explaining it to me.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |


More information about the dri-devel mailing list