mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
@ 2025-07-30 10:21 Geert Uytterhoeven
  2025-07-30 10:32 ` Jani Nikula
  2025-07-30 12:18 ` Raag Jadav
  0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2025-07-30 10:21 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rodrigo Vivi, Tomas Winkler, Alexander Usyskin, Raag Jadav,
	Jani Nikula
  Cc: linux-mtd, intel-gfx, intel-xe, linux-kernel, Geert Uytterhoeven

Intel Discrete Graphics non-volatile memory is onlt present on intel
discrete graphics devices, and its auxiliary device is instantiated by
the Intel i915 and Xe2 DRM drivers.  Hence add dependencies on DRM_I915
and DRM_XE, to prevent asking the user about this driver when
configuring a kernel without Intel graphics support.

Fixes: ceb5ab3cb6463795 ("mtd: add driver for intel graphics non-volatile memory device")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mtd/devices/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 46cebde79f34b0b7..f0ab74d695347117 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -185,8 +185,8 @@ config MTD_POWERNV_FLASH
 
 config MTD_INTEL_DG
 	tristate "Intel Discrete Graphics non-volatile memory driver"
-	depends on AUXILIARY_BUS
-	depends on MTD
+	depends on AUXILIARY_BUS && MTD
+	depends on DRM_I915 || DRM_XE || COMPILE_TEST
 	help
 	  This provides an MTD device to access Intel Discrete Graphics
 	  non-volatile memory.
-- 
2.43.0


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

* Re: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
  2025-07-30 10:21 [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE Geert Uytterhoeven
@ 2025-07-30 10:32 ` Jani Nikula
  2025-07-30 11:08   ` Geert Uytterhoeven
  2025-07-30 12:18 ` Raag Jadav
  1 sibling, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2025-07-30 10:32 UTC (permalink / raw)
  To: Geert Uytterhoeven, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Rodrigo Vivi, Tomas Winkler,
	Alexander Usyskin, Raag Jadav
  Cc: linux-mtd, intel-gfx, intel-xe, linux-kernel, Geert Uytterhoeven

On Wed, 30 Jul 2025, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> Intel Discrete Graphics non-volatile memory is onlt present on intel
> discrete graphics devices, and its auxiliary device is instantiated by
> the Intel i915 and Xe2 DRM drivers.  Hence add dependencies on DRM_I915
> and DRM_XE, to prevent asking the user about this driver when
> configuring a kernel without Intel graphics support.
>
> Fixes: ceb5ab3cb6463795 ("mtd: add driver for intel graphics non-volatile memory device")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mtd/devices/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
> index 46cebde79f34b0b7..f0ab74d695347117 100644
> --- a/drivers/mtd/devices/Kconfig
> +++ b/drivers/mtd/devices/Kconfig
> @@ -185,8 +185,8 @@ config MTD_POWERNV_FLASH
>  
>  config MTD_INTEL_DG
>  	tristate "Intel Discrete Graphics non-volatile memory driver"
> -	depends on AUXILIARY_BUS
> -	depends on MTD
> +	depends on AUXILIARY_BUS && MTD
> +	depends on DRM_I915 || DRM_XE || COMPILE_TEST

I understand the intent, but IIUC auxiliary bus usage should not require
a "depends on" relationship. Couldn't you have MTD_INTEL_DG=y and
DRM_I915=m just fine?

BR,
Jani.


>  	help
>  	  This provides an MTD device to access Intel Discrete Graphics
>  	  non-volatile memory.

-- 
Jani Nikula, Intel

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

* Re: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
  2025-07-30 10:32 ` Jani Nikula
@ 2025-07-30 11:08   ` Geert Uytterhoeven
  2025-07-31  8:23     ` Jani Nikula
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2025-07-30 11:08 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rodrigo Vivi, Tomas Winkler, Alexander Usyskin, Raag Jadav,
	linux-mtd, intel-gfx, intel-xe, linux-kernel

Hi Jani,

On Wed, 30 Jul 2025 at 12:32, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 30 Jul 2025, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> > Intel Discrete Graphics non-volatile memory is onlt present on intel
> > discrete graphics devices, and its auxiliary device is instantiated by
> > the Intel i915 and Xe2 DRM drivers.  Hence add dependencies on DRM_I915
> > and DRM_XE, to prevent asking the user about this driver when
> > configuring a kernel without Intel graphics support.
> >
> > Fixes: ceb5ab3cb6463795 ("mtd: add driver for intel graphics non-volatile memory device")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  drivers/mtd/devices/Kconfig | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
> > index 46cebde79f34b0b7..f0ab74d695347117 100644
> > --- a/drivers/mtd/devices/Kconfig
> > +++ b/drivers/mtd/devices/Kconfig
> > @@ -185,8 +185,8 @@ config MTD_POWERNV_FLASH
> >
> >  config MTD_INTEL_DG
> >       tristate "Intel Discrete Graphics non-volatile memory driver"
> > -     depends on AUXILIARY_BUS
> > -     depends on MTD
> > +     depends on AUXILIARY_BUS && MTD
> > +     depends on DRM_I915 || DRM_XE || COMPILE_TEST
>
> I understand the intent, but IIUC auxiliary bus usage should not require
> a "depends on" relationship. Couldn't you have MTD_INTEL_DG=y and
> DRM_I915=m just fine?

That is indeed a good point!

What about

    depends on DRM_I915!=n || DRM_XE!=n || COMPILE_TEST

instead?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
  2025-07-30 10:21 [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE Geert Uytterhoeven
  2025-07-30 10:32 ` Jani Nikula
@ 2025-07-30 12:18 ` Raag Jadav
  1 sibling, 0 replies; 6+ messages in thread
From: Raag Jadav @ 2025-07-30 12:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rodrigo Vivi, Tomas Winkler, Alexander Usyskin, Jani Nikula,
	linux-mtd, intel-gfx, intel-xe, linux-kernel

On Wed, Jul 30, 2025 at 12:21:49PM +0200, Geert Uytterhoeven wrote:
> Intel Discrete Graphics non-volatile memory is onlt present on intel

only

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

* Re: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
  2025-07-30 11:08   ` Geert Uytterhoeven
@ 2025-07-31  8:23     ` Jani Nikula
  2025-07-31  8:31       ` Usyskin, Alexander
  0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2025-07-31  8:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rodrigo Vivi, Tomas Winkler, Alexander Usyskin, Raag Jadav,
	linux-mtd, intel-gfx, intel-xe, linux-kernel

On Wed, 30 Jul 2025, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Jani,
>
> On Wed, 30 Jul 2025 at 12:32, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Wed, 30 Jul 2025, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>> > Intel Discrete Graphics non-volatile memory is onlt present on intel
>> > discrete graphics devices, and its auxiliary device is instantiated by
>> > the Intel i915 and Xe2 DRM drivers.  Hence add dependencies on DRM_I915
>> > and DRM_XE, to prevent asking the user about this driver when
>> > configuring a kernel without Intel graphics support.
>> >
>> > Fixes: ceb5ab3cb6463795 ("mtd: add driver for intel graphics non-volatile memory device")
>> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> > ---
>> >  drivers/mtd/devices/Kconfig | 4 ++--
>> >  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
>> > index 46cebde79f34b0b7..f0ab74d695347117 100644
>> > --- a/drivers/mtd/devices/Kconfig
>> > +++ b/drivers/mtd/devices/Kconfig
>> > @@ -185,8 +185,8 @@ config MTD_POWERNV_FLASH
>> >
>> >  config MTD_INTEL_DG
>> >       tristate "Intel Discrete Graphics non-volatile memory driver"
>> > -     depends on AUXILIARY_BUS
>> > -     depends on MTD
>> > +     depends on AUXILIARY_BUS && MTD
>> > +     depends on DRM_I915 || DRM_XE || COMPILE_TEST
>>
>> I understand the intent, but IIUC auxiliary bus usage should not require
>> a "depends on" relationship. Couldn't you have MTD_INTEL_DG=y and
>> DRM_I915=m just fine?
>
> That is indeed a good point!
>
> What about
>
>     depends on DRM_I915!=n || DRM_XE!=n || COMPILE_TEST
>
> instead?

Fine by me, up to Alexander.

BR,
Jani.



-- 
Jani Nikula, Intel

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

* RE: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE
  2025-07-31  8:23     ` Jani Nikula
@ 2025-07-31  8:31       ` Usyskin, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Usyskin, Alexander @ 2025-07-31  8:31 UTC (permalink / raw)
  To: Jani Nikula, Geert Uytterhoeven
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Vivi,
	Rodrigo, Tomas Winkler, Jadav, Raag, linux-mtd, intel-gfx,
	intel-xe, linux-kernel

> Subject: Re: [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or
> DRM_XE
> 
> On Wed, 30 Jul 2025, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Hi Jani,
> >
> > On Wed, 30 Jul 2025 at 12:32, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >> On Wed, 30 Jul 2025, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> >> > Intel Discrete Graphics non-volatile memory is onlt present on intel
> >> > discrete graphics devices, and its auxiliary device is instantiated by
> >> > the Intel i915 and Xe2 DRM drivers.  Hence add dependencies on DRM_I915
> >> > and DRM_XE, to prevent asking the user about this driver when
> >> > configuring a kernel without Intel graphics support.
> >> >
> >> > Fixes: ceb5ab3cb6463795 ("mtd: add driver for intel graphics non-volatile
> memory device")
> >> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >> > ---
> >> >  drivers/mtd/devices/Kconfig | 4 ++--
> >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
> >> > index 46cebde79f34b0b7..f0ab74d695347117 100644
> >> > --- a/drivers/mtd/devices/Kconfig
> >> > +++ b/drivers/mtd/devices/Kconfig
> >> > @@ -185,8 +185,8 @@ config MTD_POWERNV_FLASH
> >> >
> >> >  config MTD_INTEL_DG
> >> >       tristate "Intel Discrete Graphics non-volatile memory driver"
> >> > -     depends on AUXILIARY_BUS
> >> > -     depends on MTD
> >> > +     depends on AUXILIARY_BUS && MTD
> >> > +     depends on DRM_I915 || DRM_XE || COMPILE_TEST
> >>
> >> I understand the intent, but IIUC auxiliary bus usage should not require
> >> a "depends on" relationship. Couldn't you have MTD_INTEL_DG=y and
> >> DRM_I915=m just fine?
> >
> > That is indeed a good point!
> >
> > What about
> >
> >     depends on DRM_I915!=n || DRM_XE!=n || COMPILE_TEST
> >
> > instead?
> 
> Fine by me, up to Alexander.

This variant is good from my side.

- - 
Thanks,
Sasha


> 
> BR,
> Jani.
> 
> 
> 
> --
> Jani Nikula, Intel

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

end of thread, other threads:[~2025-07-31  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30 10:21 [PATCH] mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE Geert Uytterhoeven
2025-07-30 10:32 ` Jani Nikula
2025-07-30 11:08   ` Geert Uytterhoeven
2025-07-31  8:23     ` Jani Nikula
2025-07-31  8:31       ` Usyskin, Alexander
2025-07-30 12:18 ` Raag Jadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®