All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
@ 2022-09-12  9:15 Uwe Kleine-König
  2022-11-28 16:39 ` Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2022-09-12  9:15 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter
  Cc: kernel, dri-devel

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@pengutronix.de>
---
Changes since v1
(20210514100142.1182997-1-u.kleine-koenig@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(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 198ba846d34b..593d7335b10a 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -13,7 +13,6 @@ menuconfig DRM
 	select HDMI
 	select FB_CMDLINE
 	select I2C
-	select I2C_ALGOBIT
 	select DMA_SHARED_BUFFER
 	select SYNC_FILE
 # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate
@@ -231,6 +230,8 @@ config DRM_RADEON
         select DRM_KMS_HELPER
         select DRM_TTM
 	select DRM_TTM_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	select POWER_SUPPLY
 	select HWMON
 	select BACKLIGHT_CLASS_DEVICE
@@ -262,6 +263,8 @@ config DRM_AMDGPU
 	select DRM_SCHED
 	select DRM_TTM
 	select DRM_TTM_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	select POWER_SUPPLY
 	select HWMON
 	select BACKLIGHT_CLASS_DEVICE
diff --git a/drivers/gpu/drm/ast/Kconfig b/drivers/gpu/drm/ast/Kconfig
index fbcf2f45cef5..bcc25decd485 100644
--- a/drivers/gpu/drm/ast/Kconfig
+++ b/drivers/gpu/drm/ast/Kconfig
@@ -6,6 +6,8 @@ config DRM_AST
 	select DRM_VRAM_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	help
 	 Say yes for experimental AST GPU driver. Do not enable
 	 this driver without having a working -modesetting,
diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig
index 807b989e3c77..2efc0eb41c64 100644
--- a/drivers/gpu/drm/gma500/Kconfig
+++ b/drivers/gpu/drm/gma500/Kconfig
@@ -3,6 +3,8 @@ config DRM_GMA500
 	tristate "Intel GMA500/600/3600/3650 KMS Framebuffer"
 	depends on DRM && PCI && X86 && MMU
 	select DRM_KMS_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915
 	select ACPI_VIDEO if ACPI
 	select BACKLIGHT_CLASS_DEVICE if ACPI
diff --git a/drivers/gpu/drm/hisilicon/hibmc/Kconfig b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
index 073adfe438dd..90b9e6cce49c 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/Kconfig
+++ b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
@@ -6,6 +6,8 @@ config DRM_HISI_HIBMC
 	select DRM_VRAM_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	help
 	  Choose this option if you have a Hisilicon Hibmc soc chipset.
 	  If M is selected the module will be called hibmc-drm.
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 3efce05d7b57..c6e3792622f2 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -18,6 +18,8 @@ config DRM_I915
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select RELAY
+	select I2C
+	select I2C_ALGOBIT
 	select IRQ_WORK
 	# i915 depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
diff --git a/drivers/gpu/drm/mgag200/Kconfig b/drivers/gpu/drm/mgag200/Kconfig
index eec59658a938..b28c5e4828f4 100644
--- a/drivers/gpu/drm/mgag200/Kconfig
+++ b/drivers/gpu/drm/mgag200/Kconfig
@@ -4,6 +4,8 @@ config DRM_MGAG200
 	depends on DRM && PCI && MMU
 	select DRM_GEM_SHMEM_HELPER
 	select DRM_KMS_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	help
 	 This is a KMS driver for Matrox G200 chips. It supports the original
 	 MGA G200 desktop chips and the server variants. It requires 0.3.0
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 03d12caf9e26..a0bb3987bf63 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -10,6 +10,8 @@ config DRM_NOUVEAU
 	select DRM_KMS_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
+	select I2C
+	select I2C_ALGOBIT
 	select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
 	select X86_PLATFORM_DEVICES if ACPI && X86
 	select ACPI_WMI if ACPI && X86
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-09-12  9:15 [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it Uwe Kleine-König
@ 2022-11-28 16:39 ` Uwe Kleine-König
  2022-11-28 16:54 ` Javier Martinez Canillas
  2022-11-28 18:16 ` Thomas Zimmermann
  2 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2022-11-28 16:39 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter
  Cc: dri-devel, kernel

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Mon, Sep 12, 2022 at 11:15:05AM +0200, Uwe Kleine-König wrote:
> 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@pengutronix.de>

ping! Is there anything I do wrong to not get any attention here?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-09-12  9:15 [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it Uwe Kleine-König
  2022-11-28 16:39 ` Uwe Kleine-König
@ 2022-11-28 16:54 ` Javier Martinez Canillas
  2022-11-28 17:48   ` Uwe Kleine-König
  2022-11-28 18:16 ` Thomas Zimmermann
  2 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2022-11-28 16:54 UTC (permalink / raw)
  To: Uwe Kleine-König, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter
  Cc: dri-devel, kernel

Hello Uwe,

Thanks for your patch.

On 9/12/22 11:15, Uwe Kleine-König wrote:
> 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@pengutronix.de>
> ---

Makes sense to me. It would be good to drop this dependency, specially now
that many distros have CONFIG_DRM=y to use simpledrm for early boot.

> Changes since v1
> (20210514100142.1182997-1-u.kleine-koenig@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(-)
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 198ba846d34b..593d7335b10a 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -13,7 +13,6 @@ menuconfig DRM
>  	select HDMI
>  	select FB_CMDLINE
>  	select I2C

Is I2C still required or was just a dependency of I2C_ALGOBIT ?

I'll wait a few days in case others want to review this change too
and then can push this to drm-misc-next. 

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-11-28 16:54 ` Javier Martinez Canillas
@ 2022-11-28 17:48   ` Uwe Kleine-König
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2022-11-28 17:48 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Zimmermann, David Airlie, dri-devel, kernel

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hello Javier,

On Mon, Nov 28, 2022 at 05:54:32PM +0100, Javier Martinez Canillas wrote:
> On 9/12/22 11:15, Uwe Kleine-König wrote:
> > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> > index 198ba846d34b..593d7335b10a 100644
> > --- a/drivers/gpu/drm/Kconfig
> > +++ b/drivers/gpu/drm/Kconfig
> > @@ -13,7 +13,6 @@ menuconfig DRM
> >  	select HDMI
> >  	select FB_CMDLINE
> >  	select I2C
> 
> Is I2C still required or was just a dependency of I2C_ALGOBIT ?

I didn't convince myself I2C can go away, but I would expect this to be
an opportunity for another cleanup as I mentioned in the commit log.
 
> I'll wait a few days in case others want to review this change too
> and then can push this to drm-misc-next. 

I'm looking forward to all the people reviewing my patch now who missed
the patch during the last 18 months but who will take the opportunity of
these additional few days :-)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-09-12  9:15 [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it Uwe Kleine-König
  2022-11-28 16:39 ` Uwe Kleine-König
  2022-11-28 16:54 ` Javier Martinez Canillas
@ 2022-11-28 18:16 ` Thomas Zimmermann
  2022-12-16 13:01   ` Javier Martinez Canillas
  2022-12-16 18:11   ` Uwe Kleine-König
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2022-11-28 18:16 UTC (permalink / raw)
  To: Uwe Kleine-König, Maarten Lankhorst, Maxime Ripard,
	David Airlie, Daniel Vetter
  Cc: dri-devel, kernel


[-- Attachment #1.1: Type: text/plain, Size: 5634 bytes --]

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@pengutronix.de>
> ---
> Changes since v1
> (20210514100142.1182997-1-u.kleine-koenig@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?

Best regards
Thomas

> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 198ba846d34b..593d7335b10a 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -13,7 +13,6 @@ menuconfig DRM
>   	select HDMI
>   	select FB_CMDLINE
>   	select I2C
> -	select I2C_ALGOBIT
>   	select DMA_SHARED_BUFFER
>   	select SYNC_FILE
>   # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate
> @@ -231,6 +230,8 @@ config DRM_RADEON
>           select DRM_KMS_HELPER
>           select DRM_TTM
>   	select DRM_TTM_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	select POWER_SUPPLY
>   	select HWMON
>   	select BACKLIGHT_CLASS_DEVICE
> @@ -262,6 +263,8 @@ config DRM_AMDGPU
>   	select DRM_SCHED
>   	select DRM_TTM
>   	select DRM_TTM_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	select POWER_SUPPLY
>   	select HWMON
>   	select BACKLIGHT_CLASS_DEVICE
> diff --git a/drivers/gpu/drm/ast/Kconfig b/drivers/gpu/drm/ast/Kconfig
> index fbcf2f45cef5..bcc25decd485 100644
> --- a/drivers/gpu/drm/ast/Kconfig
> +++ b/drivers/gpu/drm/ast/Kconfig
> @@ -6,6 +6,8 @@ config DRM_AST
>   	select DRM_VRAM_HELPER
>   	select DRM_TTM
>   	select DRM_TTM_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	help
>   	 Say yes for experimental AST GPU driver. Do not enable
>   	 this driver without having a working -modesetting,
> diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig
> index 807b989e3c77..2efc0eb41c64 100644
> --- a/drivers/gpu/drm/gma500/Kconfig
> +++ b/drivers/gpu/drm/gma500/Kconfig
> @@ -3,6 +3,8 @@ config DRM_GMA500
>   	tristate "Intel GMA500/600/3600/3650 KMS Framebuffer"
>   	depends on DRM && PCI && X86 && MMU
>   	select DRM_KMS_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915
>   	select ACPI_VIDEO if ACPI
>   	select BACKLIGHT_CLASS_DEVICE if ACPI
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/Kconfig b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
> index 073adfe438dd..90b9e6cce49c 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/Kconfig
> +++ b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
> @@ -6,6 +6,8 @@ config DRM_HISI_HIBMC
>   	select DRM_VRAM_HELPER
>   	select DRM_TTM
>   	select DRM_TTM_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	help
>   	  Choose this option if you have a Hisilicon Hibmc soc chipset.
>   	  If M is selected the module will be called hibmc-drm.
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index 3efce05d7b57..c6e3792622f2 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -18,6 +18,8 @@ config DRM_I915
>   	select DRM_PANEL
>   	select DRM_MIPI_DSI
>   	select RELAY
> +	select I2C
> +	select I2C_ALGOBIT
>   	select IRQ_WORK
>   	# i915 depends on ACPI_VIDEO when ACPI is enabled
>   	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
> diff --git a/drivers/gpu/drm/mgag200/Kconfig b/drivers/gpu/drm/mgag200/Kconfig
> index eec59658a938..b28c5e4828f4 100644
> --- a/drivers/gpu/drm/mgag200/Kconfig
> +++ b/drivers/gpu/drm/mgag200/Kconfig
> @@ -4,6 +4,8 @@ config DRM_MGAG200
>   	depends on DRM && PCI && MMU
>   	select DRM_GEM_SHMEM_HELPER
>   	select DRM_KMS_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	help
>   	 This is a KMS driver for Matrox G200 chips. It supports the original
>   	 MGA G200 desktop chips and the server variants. It requires 0.3.0
> diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
> index 03d12caf9e26..a0bb3987bf63 100644
> --- a/drivers/gpu/drm/nouveau/Kconfig
> +++ b/drivers/gpu/drm/nouveau/Kconfig
> @@ -10,6 +10,8 @@ config DRM_NOUVEAU
>   	select DRM_KMS_HELPER
>   	select DRM_TTM
>   	select DRM_TTM_HELPER
> +	select I2C
> +	select I2C_ALGOBIT
>   	select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
>   	select X86_PLATFORM_DEVICES if ACPI && X86
>   	select ACPI_WMI if ACPI && X86

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-11-28 18:16 ` Thomas Zimmermann
@ 2022-12-16 13:01   ` Javier Martinez Canillas
  2022-12-16 18:11   ` Uwe Kleine-König
  1 sibling, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2022-12-16 13:01 UTC (permalink / raw)
  To: Thomas Zimmermann, Uwe Kleine-König, Maarten Lankhorst,
	Maxime Ripard, David Airlie, Daniel Vetter
  Cc: kernel, dri-devel

On 11/28/22 19:16, 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@pengutronix.de>
>> ---
>> Changes since v1
>> (20210514100142.1182997-1-u.kleine-koenig@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?
> 

Uwe, do you have an answer for this question? I wan to merge this patch
but don't know if need to wait for a v3 including those drivers too.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-11-28 18:16 ` Thomas Zimmermann
  2022-12-16 13:01   ` Javier Martinez Canillas
@ 2022-12-16 18:11   ` Uwe Kleine-König
  2022-12-16 18:25     ` Alex Deucher
  1 sibling, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2022-12-16 18:11 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: David Airlie, dri-devel, kernel

[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]

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@pengutronix.de>
> > ---
> > Changes since v1
> > (20210514100142.1182997-1-u.kleine-koenig@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.

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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-12-16 18:11   ` Uwe Kleine-König
@ 2022-12-16 18:25     ` Alex Deucher
  2022-12-17 23:19       ` Uwe Kleine-König
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2022-12-16 18:25 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: David Airlie, kernel, dri-devel, Thomas Zimmermann

On Fri, Dec 16, 2022 at 1:11 PM Uwe Kleine-König
<u.kleine-koenig@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@pengutronix.de>
> > > ---
> > > Changes since v1
> > > (20210514100142.1182997-1-u.kleine-koenig@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/ |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it
  2022-12-16 18:25     ` Alex Deucher
@ 2022-12-17 23:19       ` Uwe Kleine-König
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2022-12-17 23:19 UTC (permalink / raw)
  To: Alex Deucher; +Cc: David Airlie, Thomas Zimmermann, dri-devel, kernel

[-- Attachment #1: Type: text/plain, Size: 2487 bytes --]

Hello,

On Fri, Dec 16, 2022 at 01:25:32PM -0500, Alex Deucher wrote:
> On Fri, Dec 16, 2022 at 1:11 PM Uwe Kleine-König
> <u.kleine-koenig@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@pengutronix.de>
> > > > ---
> > > > Changes since v1
> > > > (20210514100142.1182997-1-u.kleine-koenig@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.

Then I guess I have to adapt and resend based on 6.2-rc1.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-17 23:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12  9:15 [PATCH v2] drm: Only select I2C_ALGOBIT for drivers that actually need it Uwe Kleine-König
2022-11-28 16:39 ` Uwe Kleine-König
2022-11-28 16:54 ` Javier Martinez Canillas
2022-11-28 17:48   ` Uwe Kleine-König
2022-11-28 18:16 ` Thomas Zimmermann
2022-12-16 13:01   ` Javier Martinez Canillas
2022-12-16 18:11   ` Uwe Kleine-König
2022-12-16 18:25     ` Alex Deucher
2022-12-17 23:19       ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.