All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-10  7:31 Sun, Jing A
  2016-10-10  8:28   ` Jani Nikula
  0 siblings, 1 reply; 25+ messages in thread
From: Sun, Jing A @ 2016-10-10  7:31 UTC (permalink / raw)
  To: airlied, Vetter, Daniel, jani.nikula; +Cc: linux-kernel

Dear Maintainers,

Please kindly review my patch as below. It's based on the mainline branch.

>From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 2001
From: Jing SUN <jing.a.sun@intel.com>
Date: Mon, 10 Oct 2016 14:06:54 +0800
Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from "bool" to
 "tristate".

A lot of drm driver modules, which are designed
to be loadable, select DRM_MIPI_DSI, while that
being "bool" prevents those from getting reloaded.

Signed-off-by: Jing SUN <jing.a.sun@intel.com>
---
 drivers/gpu/drm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index fc35731..67668a0 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -22,7 +22,7 @@ menuconfig DRM
 	  (/dev/agpgart) support if it is available for your platform.
 
 config DRM_MIPI_DSI
-	bool
+	tristate
 	depends on DRM
 
 config DRM_DP_AUX_CHARDEV
-- 
2.7.4

Regards,
Sun, Jing

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-10  7:31 [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate" Sun, Jing A
@ 2016-10-10  8:28   ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-10  8:28 UTC (permalink / raw)
  To: Sun, Jing A, airlied, Vetter, Daniel
  Cc: linux-kernel, dri-devel, Takashi Iwai, a.hajda, Thierry Reding

On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> Dear Maintainers,
>
> Please kindly review my patch as below. It's based on the mainline branch.
>
> From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 2001
> From: Jing SUN <jing.a.sun@intel.com>
> Date: Mon, 10 Oct 2016 14:06:54 +0800
> Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from "bool" to
>  "tristate".
>
> A lot of drm driver modules, which are designed
> to be loadable, select DRM_MIPI_DSI, while that
> being "bool" prevents those from getting reloaded.

You're missing some lists and people from distribution, added now.

See the discussion starting at [1]. I don't know if anything has
happened since then. Takashi?

BR,
Jani.


[1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de


>
> Signed-off-by: Jing SUN <jing.a.sun@intel.com>
> ---
>  drivers/gpu/drm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index fc35731..67668a0 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -22,7 +22,7 @@ menuconfig DRM
>  	  (/dev/agpgart) support if it is available for your platform.
>  
>  config DRM_MIPI_DSI
> -	bool
> +	tristate
>  	depends on DRM
>  
>  config DRM_DP_AUX_CHARDEV

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-10  8:28   ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-10  8:28 UTC (permalink / raw)
  To: Sun, Jing A, airlied, Vetter, Daniel
  Cc: linux-kernel, dri-devel, Takashi Iwai, a.hajda, Thierry Reding

On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> Dear Maintainers,
>
> Please kindly review my patch as below. It's based on the mainline branch.
>
> From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 2001
> From: Jing SUN <jing.a.sun@intel.com>
> Date: Mon, 10 Oct 2016 14:06:54 +0800
> Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from "bool" to
>  "tristate".
>
> A lot of drm driver modules, which are designed
> to be loadable, select DRM_MIPI_DSI, while that
> being "bool" prevents those from getting reloaded.

You're missing some lists and people from distribution, added now.

See the discussion starting at [1]. I don't know if anything has
happened since then. Takashi?

BR,
Jani.


[1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de


>
> Signed-off-by: Jing SUN <jing.a.sun@intel.com>
> ---
>  drivers/gpu/drm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index fc35731..67668a0 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -22,7 +22,7 @@ menuconfig DRM
>  	  (/dev/agpgart) support if it is available for your platform.
>  
>  config DRM_MIPI_DSI
> -	bool
> +	tristate
>  	depends on DRM
>  
>  config DRM_DP_AUX_CHARDEV

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-10  8:28   ` Jani Nikula
  (?)
@ 2016-10-10  9:57   ` Takashi Iwai
  2016-10-11  8:40     ` Sun, Jing A
  -1 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2016-10-10  9:57 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Sun, Jing A, airlied, Vetter, Daniel, linux-kernel, dri-devel,
	Takashi Iwai, a.hajda, Thierry Reding

On Mon, 10 Oct 2016 10:28:31 +0200,
Jani Nikula wrote:
> 
> On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> > Dear Maintainers,
> >
> > Please kindly review my patch as below. It's based on the mainline branch.
> >
> > From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 2001
> > From: Jing SUN <jing.a.sun@intel.com>
> > Date: Mon, 10 Oct 2016 14:06:54 +0800
> > Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from "bool" to
> >  "tristate".
> >
> > A lot of drm driver modules, which are designed
> > to be loadable, select DRM_MIPI_DSI, while that
> > being "bool" prevents those from getting reloaded.
> 
> You're missing some lists and people from distribution, added now.
> 
> See the discussion starting at [1]. I don't know if anything has
> happened since then. Takashi?

Unfortunately, nothing seems to have happened since my last patch due
to little interest.  I'd be glad if the patch is revived.

(BTW, I'm traveling in these two weeks, so the further reply will be
 delayed.)


thanks,

Takashi


> 
> BR,
> Jani.
> 
> 
> [1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de
> 
> 
> >
> > Signed-off-by: Jing SUN <jing.a.sun@intel.com>
> > ---
> >  drivers/gpu/drm/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> > index fc35731..67668a0 100644
> > --- a/drivers/gpu/drm/Kconfig
> > +++ b/drivers/gpu/drm/Kconfig
> > @@ -22,7 +22,7 @@ menuconfig DRM
> >  	  (/dev/agpgart) support if it is available for your platform.
> >  
> >  config DRM_MIPI_DSI
> > -	bool
> > +	tristate
> >  	depends on DRM
> >  
> >  config DRM_DP_AUX_CHARDEV
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> 

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-10  9:57   ` Takashi Iwai
@ 2016-10-11  8:40     ` Sun, Jing A
  2016-10-11  9:17         ` Andrzej Hajda
  2016-10-11  9:33         ` Jani Nikula
  0 siblings, 2 replies; 25+ messages in thread
From: Sun, Jing A @ 2016-10-11  8:40 UTC (permalink / raw)
  To: Takashi Iwai, Jani Nikula
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, a.hajda,
	Thierry Reding

Dear Maintainers,

It's needed that DRM Driver module could be removed and reloaded after kernel booting on the projects that I have been working on, and I hope such module type change could be accepted. Looks like Iwai has similar change request as well. Would you please review it and let us know if any concerns?

Regards,
Sun, Jing


-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de] 
Sent: Monday, October 10, 2016 5:57 PM
To: Jani Nikula
Cc: Sun, Jing A; airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Takashi Iwai; a.hajda@samsung.com; Thierry Reding
Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".

On Mon, 10 Oct 2016 10:28:31 +0200,
Jani Nikula wrote:
> 
> On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> > Dear Maintainers,
> >
> > Please kindly review my patch as below. It's based on the mainline branch.
> >
> > From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 
> > 2001
> > From: Jing SUN <jing.a.sun@intel.com>
> > Date: Mon, 10 Oct 2016 14:06:54 +0800
> > Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from 
> > "bool" to  "tristate".
> >
> > A lot of drm driver modules, which are designed to be loadable, 
> > select DRM_MIPI_DSI, while that being "bool" prevents those from 
> > getting reloaded.
> 
> You're missing some lists and people from distribution, added now.
> 
> See the discussion starting at [1]. I don't know if anything has 
> happened since then. Takashi?

Unfortunately, nothing seems to have happened since my last patch due to little interest.  I'd be glad if the patch is revived.

(BTW, I'm traveling in these two weeks, so the further reply will be
 delayed.)


thanks,

Takashi


> 
> BR,
> Jani.
> 
> 
> [1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de
> 
> 
> >
> > Signed-off-by: Jing SUN <jing.a.sun@intel.com>
> > ---
> >  drivers/gpu/drm/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 
> > fc35731..67668a0 100644
> > --- a/drivers/gpu/drm/Kconfig
> > +++ b/drivers/gpu/drm/Kconfig
> > @@ -22,7 +22,7 @@ menuconfig DRM
> >  	  (/dev/agpgart) support if it is available for your platform.
> >  
> >  config DRM_MIPI_DSI
> > -	bool
> > +	tristate
> >  	depends on DRM
> >  
> >  config DRM_DP_AUX_CHARDEV
> 
> --
> Jani Nikula, Intel Open Source Technology Center
> 

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-11  8:40     ` Sun, Jing A
@ 2016-10-11  9:17         ` Andrzej Hajda
  2016-10-11  9:33         ` Jani Nikula
  1 sibling, 0 replies; 25+ messages in thread
From: Andrzej Hajda @ 2016-10-11  9:17 UTC (permalink / raw)
  To: Sun, Jing A, Takashi Iwai, Jani Nikula
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, Thierry Reding

Hi,

This patch misses dsi bus un-registration.
However I have reviewed two patches of Takashi which solves
the same issue more completely [1]. These patches were not
accepted neither.

[1]:
https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html

Regards
Andrzej

On 11.10.2016 10:40, Sun, Jing A wrote:
> Dear Maintainers,
>
> It's needed that DRM Driver module could be removed and reloaded after kernel booting on the projects that I have been working on, and I hope such module type change could be accepted. Looks like Iwai has similar change request as well. Would you please review it and let us know if any concerns?
>
> Regards,
> Sun, Jing
>
>
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de] 
> Sent: Monday, October 10, 2016 5:57 PM
> To: Jani Nikula
> Cc: Sun, Jing A; airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Takashi Iwai; a.hajda@samsung.com; Thierry Reding
> Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
>
> On Mon, 10 Oct 2016 10:28:31 +0200,
> Jani Nikula wrote:
>> On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>> Dear Maintainers,
>>>
>>> Please kindly review my patch as below. It's based on the mainline branch.
>>>
>>> From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 
>>> 2001
>>> From: Jing SUN <jing.a.sun@intel.com>
>>> Date: Mon, 10 Oct 2016 14:06:54 +0800
>>> Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from 
>>> "bool" to  "tristate".
>>>
>>> A lot of drm driver modules, which are designed to be loadable, 
>>> select DRM_MIPI_DSI, while that being "bool" prevents those from 
>>> getting reloaded.
>> You're missing some lists and people from distribution, added now.
>>
>> See the discussion starting at [1]. I don't know if anything has 
>> happened since then. Takashi?
> Unfortunately, nothing seems to have happened since my last patch due to little interest.  I'd be glad if the patch is revived.
>
> (BTW, I'm traveling in these two weeks, so the further reply will be
>  delayed.)
>
>
> thanks,
>
> Takashi
>
>
>> BR,
>> Jani.
>>
>>
>> [1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de
>>
>>
>>> Signed-off-by: Jing SUN <jing.a.sun@intel.com>
>>> ---
>>>  drivers/gpu/drm/Kconfig | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 
>>> fc35731..67668a0 100644
>>> --- a/drivers/gpu/drm/Kconfig
>>> +++ b/drivers/gpu/drm/Kconfig
>>> @@ -22,7 +22,7 @@ menuconfig DRM
>>>  	  (/dev/agpgart) support if it is available for your platform.
>>>  
>>>  config DRM_MIPI_DSI
>>> -	bool
>>> +	tristate
>>>  	depends on DRM
>>>  
>>>  config DRM_DP_AUX_CHARDEV
>> --
>> Jani Nikula, Intel Open Source Technology Center
>>
>
>

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-11  9:17         ` Andrzej Hajda
  0 siblings, 0 replies; 25+ messages in thread
From: Andrzej Hajda @ 2016-10-11  9:17 UTC (permalink / raw)
  To: Sun, Jing A, Takashi Iwai, Jani Nikula
  Cc: Vetter, Daniel, Thierry Reding, linux-kernel, dri-devel

Hi,

This patch misses dsi bus un-registration.
However I have reviewed two patches of Takashi which solves
the same issue more completely [1]. These patches were not
accepted neither.

[1]:
https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html

Regards
Andrzej

On 11.10.2016 10:40, Sun, Jing A wrote:
> Dear Maintainers,
>
> It's needed that DRM Driver module could be removed and reloaded after kernel booting on the projects that I have been working on, and I hope such module type change could be accepted. Looks like Iwai has similar change request as well. Would you please review it and let us know if any concerns?
>
> Regards,
> Sun, Jing
>
>
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de] 
> Sent: Monday, October 10, 2016 5:57 PM
> To: Jani Nikula
> Cc: Sun, Jing A; airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Takashi Iwai; a.hajda@samsung.com; Thierry Reding
> Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
>
> On Mon, 10 Oct 2016 10:28:31 +0200,
> Jani Nikula wrote:
>> On Mon, 10 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>> Dear Maintainers,
>>>
>>> Please kindly review my patch as below. It's based on the mainline branch.
>>>
>>> From b401009f79883ac5e9d41525c9d54b800ece2e22 Mon Sep 17 00:00:00 
>>> 2001
>>> From: Jing SUN <jing.a.sun@intel.com>
>>> Date: Mon, 10 Oct 2016 14:06:54 +0800
>>> Subject: [PATCH 1/1] drm: change DRM_MIPI_DSI module type from 
>>> "bool" to  "tristate".
>>>
>>> A lot of drm driver modules, which are designed to be loadable, 
>>> select DRM_MIPI_DSI, while that being "bool" prevents those from 
>>> getting reloaded.
>> You're missing some lists and people from distribution, added now.
>>
>> See the discussion starting at [1]. I don't know if anything has 
>> happened since then. Takashi?
> Unfortunately, nothing seems to have happened since my last patch due to little interest.  I'd be glad if the patch is revived.
>
> (BTW, I'm traveling in these two weeks, so the further reply will be
>  delayed.)
>
>
> thanks,
>
> Takashi
>
>
>> BR,
>> Jani.
>>
>>
>> [1] http://lkml.kernel.org/r/s5hh9bhvj7j.wl-tiwai@suse.de
>>
>>
>>> Signed-off-by: Jing SUN <jing.a.sun@intel.com>
>>> ---
>>>  drivers/gpu/drm/Kconfig | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 
>>> fc35731..67668a0 100644
>>> --- a/drivers/gpu/drm/Kconfig
>>> +++ b/drivers/gpu/drm/Kconfig
>>> @@ -22,7 +22,7 @@ menuconfig DRM
>>>  	  (/dev/agpgart) support if it is available for your platform.
>>>  
>>>  config DRM_MIPI_DSI
>>> -	bool
>>> +	tristate
>>>  	depends on DRM
>>>  
>>>  config DRM_DP_AUX_CHARDEV
>> --
>> Jani Nikula, Intel Open Source Technology Center
>>
>
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-11  8:40     ` Sun, Jing A
@ 2016-10-11  9:33         ` Jani Nikula
  2016-10-11  9:33         ` Jani Nikula
  1 sibling, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-11  9:33 UTC (permalink / raw)
  To: Sun, Jing A, Takashi Iwai
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, a.hajda,
	Thierry Reding, Emil Velikov

On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> It's needed that DRM Driver module could be removed and reloaded after
> kernel booting on the projects that I have been working on, and I hope
> such module type change could be accepted. Looks like Iwai has similar
> change request as well. Would you please review it and let us know if
> any concerns?

Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
recommendations of Documentation/kbuild/kconfig-language.txt:

	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.

Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
should be fixed. The suggested patch does *not* fix this issue.

Interestingly, I am able to reload i915 and drm. Our CI has tests for
i915 unload/reload, but does not check drm. In any case the config
problem should not impact the reloadability of i915.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-11  9:33         ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-11  9:33 UTC (permalink / raw)
  To: Sun, Jing A, Takashi Iwai
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, a.hajda,
	Thierry Reding, Emil Velikov

On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> It's needed that DRM Driver module could be removed and reloaded after
> kernel booting on the projects that I have been working on, and I hope
> such module type change could be accepted. Looks like Iwai has similar
> change request as well. Would you please review it and let us know if
> any concerns?

Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
recommendations of Documentation/kbuild/kconfig-language.txt:

	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.

Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
should be fixed. The suggested patch does *not* fix this issue.

Interestingly, I am able to reload i915 and drm. Our CI has tests for
i915 unload/reload, but does not check drm. In any case the config
problem should not impact the reloadability of i915.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-11  9:33         ` Jani Nikula
@ 2016-10-11  9:53           ` Andrzej Hajda
  -1 siblings, 0 replies; 25+ messages in thread
From: Andrzej Hajda @ 2016-10-11  9:53 UTC (permalink / raw)
  To: Jani Nikula, Sun, Jing A, Takashi Iwai
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, Thierry Reding,
	Emil Velikov

On 11.10.2016 11:33, Jani Nikula wrote:
> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>> It's needed that DRM Driver module could be removed and reloaded after
>> kernel booting on the projects that I have been working on, and I hope
>> such module type change could be accepted. Looks like Iwai has similar
>> change request as well. Would you please review it and let us know if
>> any concerns?
> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
> recommendations of Documentation/kbuild/kconfig-language.txt:
>
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.

All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
So the dependency is always true. I am not sure if it could not change in
the future, but in such case mipi_dsi bus should be completely detached from
DRM framework, I hope we have not such case yet :)

>
> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
> should be fixed. The suggested patch does *not* fix this issue.

At the moment it should not be possible.

Regards
Andrzej

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-11  9:53           ` Andrzej Hajda
  0 siblings, 0 replies; 25+ messages in thread
From: Andrzej Hajda @ 2016-10-11  9:53 UTC (permalink / raw)
  To: Jani Nikula, Sun, Jing A, Takashi Iwai
  Cc: Emil Velikov, linux-kernel, dri-devel, Vetter, Daniel, Thierry Reding

On 11.10.2016 11:33, Jani Nikula wrote:
> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>> It's needed that DRM Driver module could be removed and reloaded after
>> kernel booting on the projects that I have been working on, and I hope
>> such module type change could be accepted. Looks like Iwai has similar
>> change request as well. Would you please review it and let us know if
>> any concerns?
> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
> recommendations of Documentation/kbuild/kconfig-language.txt:
>
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.

All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
So the dependency is always true. I am not sure if it could not change in
the future, but in such case mipi_dsi bus should be completely detached from
DRM framework, I hope we have not such case yet :)

>
> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
> should be fixed. The suggested patch does *not* fix this issue.

At the moment it should not be possible.

Regards
Andrzej

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-11  9:53           ` Andrzej Hajda
  (?)
@ 2016-10-12  3:08           ` Sun, Jing A
  2016-10-12  6:51               ` Daniel Vetter
  -1 siblings, 1 reply; 25+ messages in thread
From: Sun, Jing A @ 2016-10-12  3:08 UTC (permalink / raw)
  To: Andrzej Hajda, Jani Nikula, Takashi Iwai
  Cc: airlied, Vetter, Daniel, linux-kernel, dri-devel, Thierry Reding,
	Emil Velikov

Interestingly, I am able to reload i915 and drm. Our CI has tests for
i915 unload/reload, but does not check drm. In any case the config problem should not impact the reloadability of i915.
======
Sorry that I didn't make myself clear. In order to replace the default i915 module with an updated one, the related DRM modules also need to be updated to match the updated i915, hence the restriction.

Regards,
Sun, Jing


-----Original Message-----
From: Andrzej Hajda [mailto:a.hajda@samsung.com] 
Sent: Tuesday, October 11, 2016 5:53 PM
To: Jani Nikula; Sun, Jing A; Takashi Iwai
Cc: airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Thierry Reding; Emil Velikov
Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".

On 11.10.2016 11:33, Jani Nikula wrote:
> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>> It's needed that DRM Driver module could be removed and reloaded 
>> after kernel booting on the projects that I have been working on, and 
>> I hope such module type change could be accepted. Looks like Iwai has 
>> similar change request as well. Would you please review it and let us 
>> know if any concerns?
> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the 
> recommendations of Documentation/kbuild/kconfig-language.txt:
>
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.

All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
So the dependency is always true. I am not sure if it could not change in the future, but in such case mipi_dsi bus should be completely detached from DRM framework, I hope we have not such case yet :)

>
> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m, 
> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken 
> and should be fixed. The suggested patch does *not* fix this issue.

At the moment it should not be possible.

Regards
Andrzej

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-12  3:08           ` Sun, Jing A
@ 2016-10-12  6:51               ` Daniel Vetter
  0 siblings, 0 replies; 25+ messages in thread
From: Daniel Vetter @ 2016-10-12  6:51 UTC (permalink / raw)
  To: Sun, Jing A
  Cc: Andrzej Hajda, Jani Nikula, Takashi Iwai, Emil Velikov,
	linux-kernel, dri-devel, Vetter, Daniel, Thierry Reding

On Wed, Oct 12, 2016 at 03:08:24AM +0000, Sun, Jing A wrote:
> Interestingly, I am able to reload i915 and drm. Our CI has tests for
> i915 unload/reload, but does not check drm. In any case the config
> problem should not impact the reloadability of i915.
> ======
> Sorry that I didn't make myself clear. In order to replace the default
> i915 module with an updated one, the related DRM modules also need to be
> updated to match the updated i915, hence the restriction.

Just to avoid tears in the future: If you plan to ship this in product,
you won't ship.

And for debugging, just install a kernel with your changes for both drm
and i915.

In short, your use-case isn't really valid (but we could still make the
dsi code modular if people feel like).
-Daniel

> 
> Regards,
> Sun, Jing
> 
> 
> -----Original Message-----
> From: Andrzej Hajda [mailto:a.hajda@samsung.com] 
> Sent: Tuesday, October 11, 2016 5:53 PM
> To: Jani Nikula; Sun, Jing A; Takashi Iwai
> Cc: airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Thierry Reding; Emil Velikov
> Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
> 
> On 11.10.2016 11:33, Jani Nikula wrote:
> > On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> >> It's needed that DRM Driver module could be removed and reloaded 
> >> after kernel booting on the projects that I have been working on, and 
> >> I hope such module type change could be accepted. Looks like Iwai has 
> >> similar change request as well. Would you please review it and let us 
> >> know if any concerns?
> > Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the 
> > recommendations of Documentation/kbuild/kconfig-language.txt:
> >
> > 	select should be used with care. select will force
> > 	a symbol to a value without visiting the dependencies.
> > 	By abusing select you are able to select a symbol FOO even
> > 	if FOO depends on BAR that is not set.
> > 	In general use select only for non-visible symbols
> > 	(no prompts anywhere) and for symbols with no dependencies.
> > 	That will limit the usefulness but on the other hand avoid
> > 	the illegal configurations all over.
> 
> All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
> So the dependency is always true. I am not sure if it could not change in the future, but in such case mipi_dsi bus should be completely detached from DRM framework, I hope we have not such case yet :)
> 
> >
> > Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m, 
> > which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken 
> > and should be fixed. The suggested patch does *not* fix this issue.
> 
> At the moment it should not be possible.
> 
> Regards
> Andrzej
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-12  6:51               ` Daniel Vetter
  0 siblings, 0 replies; 25+ messages in thread
From: Daniel Vetter @ 2016-10-12  6:51 UTC (permalink / raw)
  To: Sun, Jing A
  Cc: Emil Velikov, linux-kernel, dri-devel, Vetter, Daniel, Thierry Reding

On Wed, Oct 12, 2016 at 03:08:24AM +0000, Sun, Jing A wrote:
> Interestingly, I am able to reload i915 and drm. Our CI has tests for
> i915 unload/reload, but does not check drm. In any case the config
> problem should not impact the reloadability of i915.
> ======
> Sorry that I didn't make myself clear. In order to replace the default
> i915 module with an updated one, the related DRM modules also need to be
> updated to match the updated i915, hence the restriction.

Just to avoid tears in the future: If you plan to ship this in product,
you won't ship.

And for debugging, just install a kernel with your changes for both drm
and i915.

In short, your use-case isn't really valid (but we could still make the
dsi code modular if people feel like).
-Daniel

> 
> Regards,
> Sun, Jing
> 
> 
> -----Original Message-----
> From: Andrzej Hajda [mailto:a.hajda@samsung.com] 
> Sent: Tuesday, October 11, 2016 5:53 PM
> To: Jani Nikula; Sun, Jing A; Takashi Iwai
> Cc: airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Thierry Reding; Emil Velikov
> Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
> 
> On 11.10.2016 11:33, Jani Nikula wrote:
> > On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> >> It's needed that DRM Driver module could be removed and reloaded 
> >> after kernel booting on the projects that I have been working on, and 
> >> I hope such module type change could be accepted. Looks like Iwai has 
> >> similar change request as well. Would you please review it and let us 
> >> know if any concerns?
> > Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the 
> > recommendations of Documentation/kbuild/kconfig-language.txt:
> >
> > 	select should be used with care. select will force
> > 	a symbol to a value without visiting the dependencies.
> > 	By abusing select you are able to select a symbol FOO even
> > 	if FOO depends on BAR that is not set.
> > 	In general use select only for non-visible symbols
> > 	(no prompts anywhere) and for symbols with no dependencies.
> > 	That will limit the usefulness but on the other hand avoid
> > 	the illegal configurations all over.
> 
> All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
> So the dependency is always true. I am not sure if it could not change in the future, but in such case mipi_dsi bus should be completely detached from DRM framework, I hope we have not such case yet :)
> 
> >
> > Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m, 
> > which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken 
> > and should be fixed. The suggested patch does *not* fix this issue.
> 
> At the moment it should not be possible.
> 
> Regards
> Andrzej
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-12  6:51               ` Daniel Vetter
  (?)
@ 2016-10-12  9:04               ` Sun, Jing A
  2016-10-12 10:52                   ` Jani Nikula
  -1 siblings, 1 reply; 25+ messages in thread
From: Sun, Jing A @ 2016-10-12  9:04 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Andrzej Hajda, Jani Nikula, Takashi Iwai, Emil Velikov,
	linux-kernel, dri-devel, Vetter, Daniel, Thierry Reding

I think "installing a kernel with my changes for both drm and i915" takes more time and effort to complete than "only updating DRM/i915 modules without rebuilding the whole kernel". In some cases, that's beneficial.

Also reloadablility is always a good thing to have and I truly hope Hajda/Iwai's patches would be accepted and merged.
No downside of it after all.

Regards,
Sun, Jing

-----Original Message-----
From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
Sent: Wednesday, October 12, 2016 2:52 PM
To: Sun, Jing A
Cc: Andrzej Hajda; Jani Nikula; Takashi Iwai; Emil Velikov; linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; Vetter, Daniel; Thierry Reding
Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".

On Wed, Oct 12, 2016 at 03:08:24AM +0000, Sun, Jing A wrote:
> Interestingly, I am able to reload i915 and drm. Our CI has tests for
> i915 unload/reload, but does not check drm. In any case the config 
> problem should not impact the reloadability of i915.
> ======
> Sorry that I didn't make myself clear. In order to replace the default
> i915 module with an updated one, the related DRM modules also need to 
> be updated to match the updated i915, hence the restriction.

Just to avoid tears in the future: If you plan to ship this in product, you won't ship.

And for debugging, just install a kernel with your changes for both drm and i915.

In short, your use-case isn't really valid (but we could still make the dsi code modular if people feel like).
-Daniel

> 
> Regards,
> Sun, Jing
> 
> 
> -----Original Message-----
> From: Andrzej Hajda [mailto:a.hajda@samsung.com]
> Sent: Tuesday, October 11, 2016 5:53 PM
> To: Jani Nikula; Sun, Jing A; Takashi Iwai
> Cc: airlied@linux.ie; Vetter, Daniel; linux-kernel@vger.kernel.org; 
> dri-devel@lists.freedesktop.org; Thierry Reding; Emil Velikov
> Subject: Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
> 
> On 11.10.2016 11:33, Jani Nikula wrote:
> > On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> >> It's needed that DRM Driver module could be removed and reloaded 
> >> after kernel booting on the projects that I have been working on, 
> >> and I hope such module type change could be accepted. Looks like 
> >> Iwai has similar change request as well. Would you please review it 
> >> and let us know if any concerns?
> > Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the 
> > recommendations of Documentation/kbuild/kconfig-language.txt:
> >
> > 	select should be used with care. select will force
> > 	a symbol to a value without visiting the dependencies.
> > 	By abusing select you are able to select a symbol FOO even
> > 	if FOO depends on BAR that is not set.
> > 	In general use select only for non-visible symbols
> > 	(no prompts anywhere) and for symbols with no dependencies.
> > 	That will limit the usefulness but on the other hand avoid
> > 	the illegal configurations all over.
> 
> All existing drivers which selects DRM_MIPI_DSI also depends on DRM.
> So the dependency is always true. I am not sure if it could not change 
> in the future, but in such case mipi_dsi bus should be completely 
> detached from DRM framework, I hope we have not such case yet :)
> 
> >
> > Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m, 
> > which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken 
> > and should be fixed. The suggested patch does *not* fix this issue.
> 
> At the moment it should not be possible.
> 
> Regards
> Andrzej
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-12  9:04               ` Sun, Jing A
@ 2016-10-12 10:52                   ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-12 10:52 UTC (permalink / raw)
  To: Sun, Jing A, Daniel Vetter
  Cc: Andrzej Hajda, Takashi Iwai, Emil Velikov, linux-kernel,
	dri-devel, Vetter, Daniel, Thierry Reding

On Wed, 12 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> I think "installing a kernel with my changes for both drm and i915"
> takes more time and effort to complete than "only updating DRM/i915
> modules without rebuilding the whole kernel". In some cases, that's
> beneficial.

It's possible to change and rebuild and update just the drm and i915,
but you need to be careful to build against the same tree as the ones
you are replacing. This is like using out-of-tree modules (which is
something I can't recommend no matter what, but that's another
discussion).

However, this is completely different from planning to update drm and
i915 modules on a running production system by unloading the old ones
and probing the new ones. Don't do that. It will be a disaster.

> Also reloadablility is always a good thing to have and I truly hope
> Hajda/Iwai's patches would be accepted and merged.  No downside of it
> after all.

I think it's good to be able to unload and reload modules for debugging
and development, but not for normal use.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

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

* RE: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-12 10:52                   ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-12 10:52 UTC (permalink / raw)
  To: Sun, Jing A, Daniel Vetter
  Cc: Emil Velikov, linux-kernel, dri-devel, Vetter, Daniel, Thierry Reding

On Wed, 12 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> I think "installing a kernel with my changes for both drm and i915"
> takes more time and effort to complete than "only updating DRM/i915
> modules without rebuilding the whole kernel". In some cases, that's
> beneficial.

It's possible to change and rebuild and update just the drm and i915,
but you need to be careful to build against the same tree as the ones
you are replacing. This is like using out-of-tree modules (which is
something I can't recommend no matter what, but that's another
discussion).

However, this is completely different from planning to update drm and
i915 modules on a running production system by unloading the old ones
and probing the new ones. Don't do that. It will be a disaster.

> Also reloadablility is always a good thing to have and I truly hope
> Hajda/Iwai's patches would be accepted and merged.  No downside of it
> after all.

I think it's good to be able to unload and reload modules for debugging
and development, but not for normal use.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-11  9:33         ` Jani Nikula
@ 2016-10-12 11:28           ` Emil Velikov
  -1 siblings, 0 replies; 25+ messages in thread
From: Emil Velikov @ 2016-10-12 11:28 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Sun, Jing A, Takashi Iwai, airlied, Vetter, Daniel, linux-kernel,
	dri-devel, a.hajda, Thierry Reding

On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>> It's needed that DRM Driver module could be removed and reloaded after
>> kernel booting on the projects that I have been working on, and I hope
>> such module type change could be accepted. Looks like Iwai has similar
>> change request as well. Would you please review it and let us know if
>> any concerns?
>
> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
> recommendations of Documentation/kbuild/kconfig-language.txt:
>
>         select should be used with care. select will force
>         a symbol to a value without visiting the dependencies.
>         By abusing select you are able to select a symbol FOO even
>         if FOO depends on BAR that is not set.
>         In general use select only for non-visible symbols
>         (no prompts anywhere) and for symbols with no dependencies.
>         That will limit the usefulness but on the other hand avoid
>         the illegal configurations all over.
>
> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
> should be fixed. The suggested patch does *not* fix this issue.
>
Jani, git log suggests you as the unfortunate author of the select
DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)

>From a cutesy skim through panel/ there are a handful of things to
squash - unused select/depend on, s/select/depend on/ etc. Sadly I
don't have the time to address these :-\

Regards,
Emil

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-12 11:28           ` Emil Velikov
  0 siblings, 0 replies; 25+ messages in thread
From: Emil Velikov @ 2016-10-12 11:28 UTC (permalink / raw)
  To: Jani Nikula
  Cc: linux-kernel, dri-devel, Sun, Jing A, Vetter, Daniel, Thierry Reding

On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>> It's needed that DRM Driver module could be removed and reloaded after
>> kernel booting on the projects that I have been working on, and I hope
>> such module type change could be accepted. Looks like Iwai has similar
>> change request as well. Would you please review it and let us know if
>> any concerns?
>
> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
> recommendations of Documentation/kbuild/kconfig-language.txt:
>
>         select should be used with care. select will force
>         a symbol to a value without visiting the dependencies.
>         By abusing select you are able to select a symbol FOO even
>         if FOO depends on BAR that is not set.
>         In general use select only for non-visible symbols
>         (no prompts anywhere) and for symbols with no dependencies.
>         That will limit the usefulness but on the other hand avoid
>         the illegal configurations all over.
>
> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
> should be fixed. The suggested patch does *not* fix this issue.
>
Jani, git log suggests you as the unfortunate author of the select
DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)

From a cutesy skim through panel/ there are a handful of things to
squash - unused select/depend on, s/select/depend on/ etc. Sadly I
don't have the time to address these :-\

Regards,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-12 11:28           ` Emil Velikov
@ 2016-10-12 14:28             ` Jani Nikula
  -1 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-12 14:28 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Sun, Jing A, Takashi Iwai, airlied, Vetter, Daniel, linux-kernel,
	dri-devel, a.hajda, Thierry Reding

On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>> It's needed that DRM Driver module could be removed and reloaded after
>>> kernel booting on the projects that I have been working on, and I hope
>>> such module type change could be accepted. Looks like Iwai has similar
>>> change request as well. Would you please review it and let us know if
>>> any concerns?
>>
>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
>> recommendations of Documentation/kbuild/kconfig-language.txt:
>>
>>         select should be used with care. select will force
>>         a symbol to a value without visiting the dependencies.
>>         By abusing select you are able to select a symbol FOO even
>>         if FOO depends on BAR that is not set.
>>         In general use select only for non-visible symbols
>>         (no prompts anywhere) and for symbols with no dependencies.
>>         That will limit the usefulness but on the other hand avoid
>>         the illegal configurations all over.
>>
>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
>> should be fixed. The suggested patch does *not* fix this issue.
>>
> Jani, git log suggests you as the unfortunate author of the select
> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)

/o\

As much as my present self would like to scold my past self for all his
mistakes, I have to remind myself that it is the mistakes that have
given me invaluable experience that my past self didn't have. I can only
hope my future self will have time to fix even a fraction of the
mistakes.

Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
also depend on DRM, so this problem can't currently occur. Once dsi bus
un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
config (i.e. a loadable module).

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-12 14:28             ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-12 14:28 UTC (permalink / raw)
  To: Emil Velikov
  Cc: linux-kernel, dri-devel, Sun, Jing A, Vetter, Daniel, Thierry Reding

On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>> It's needed that DRM Driver module could be removed and reloaded after
>>> kernel booting on the projects that I have been working on, and I hope
>>> such module type change could be accepted. Looks like Iwai has similar
>>> change request as well. Would you please review it and let us know if
>>> any concerns?
>>
>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
>> recommendations of Documentation/kbuild/kconfig-language.txt:
>>
>>         select should be used with care. select will force
>>         a symbol to a value without visiting the dependencies.
>>         By abusing select you are able to select a symbol FOO even
>>         if FOO depends on BAR that is not set.
>>         In general use select only for non-visible symbols
>>         (no prompts anywhere) and for symbols with no dependencies.
>>         That will limit the usefulness but on the other hand avoid
>>         the illegal configurations all over.
>>
>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
>> should be fixed. The suggested patch does *not* fix this issue.
>>
> Jani, git log suggests you as the unfortunate author of the select
> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)

/o\

As much as my present self would like to scold my past self for all his
mistakes, I have to remind myself that it is the mistakes that have
given me invaluable experience that my past self didn't have. I can only
hope my future self will have time to fix even a fraction of the
mistakes.

Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
also depend on DRM, so this problem can't currently occur. Once dsi bus
un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
config (i.e. a loadable module).

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-12 14:28             ` Jani Nikula
  (?)
@ 2016-10-20 13:20             ` Andrzej Hajda
  2016-10-20 13:44                 ` Jani Nikula
  -1 siblings, 1 reply; 25+ messages in thread
From: Andrzej Hajda @ 2016-10-20 13:20 UTC (permalink / raw)
  To: Jani Nikula, Emil Velikov
  Cc: Sun, Jing A, Takashi Iwai, airlied, Vetter, Daniel, linux-kernel,
	dri-devel, Thierry Reding

Hi Jani,

Forgive me late response.

On 12.10.2016 16:28, Jani Nikula wrote:
> On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>>> It's needed that DRM Driver module could be removed and reloaded after
>>>> kernel booting on the projects that I have been working on, and I hope
>>>> such module type change could be accepted. Looks like Iwai has similar
>>>> change request as well. Would you please review it and let us know if
>>>> any concerns?
>>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
>>> recommendations of Documentation/kbuild/kconfig-language.txt:
>>>
>>>         select should be used with care. select will force
>>>         a symbol to a value without visiting the dependencies.
>>>         By abusing select you are able to select a symbol FOO even
>>>         if FOO depends on BAR that is not set.
>>>         In general use select only for non-visible symbols
>>>         (no prompts anywhere) and for symbols with no dependencies.
>>>         That will limit the usefulness but on the other hand avoid
>>>         the illegal configurations all over.
>>>
>>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
>>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
>>> should be fixed. The suggested patch does *not* fix this issue.
>>>
>> Jani, git log suggests you as the unfortunate author of the select
>> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)
> /o\
>
> As much as my present self would like to scold my past self for all his
> mistakes, I have to remind myself that it is the mistakes that have
> given me invaluable experience that my past self didn't have. I can only
> hope my future self will have time to fix even a fraction of the
> mistakes.
>
> Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
> also depend on DRM, so this problem can't currently occur. Once dsi bus
> un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
> config (i.e. a loadable module).

There is already patch adding bus unregistration [1]. It was published
together
with 'tristate' patch [2], both were created by Takashi few months ago.

[1]:
https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html
[2]:
https://lists.freedesktop.org/archives/dri-devel/2016-August/114497.html

Regards
Andrzej

>
> BR,
> Jani.
>

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-20 13:20             ` Andrzej Hajda
@ 2016-10-20 13:44                 ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-20 13:44 UTC (permalink / raw)
  To: Andrzej Hajda, Emil Velikov
  Cc: Sun, Jing A, Takashi Iwai, airlied, Vetter, Daniel, linux-kernel,
	dri-devel, Thierry Reding

On Thu, 20 Oct 2016, Andrzej Hajda <a.hajda@samsung.com> wrote:
> Hi Jani,
>
> Forgive me late response.
>
> On 12.10.2016 16:28, Jani Nikula wrote:
>> On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>>> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>>>> It's needed that DRM Driver module could be removed and reloaded after
>>>>> kernel booting on the projects that I have been working on, and I hope
>>>>> such module type change could be accepted. Looks like Iwai has similar
>>>>> change request as well. Would you please review it and let us know if
>>>>> any concerns?
>>>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
>>>> recommendations of Documentation/kbuild/kconfig-language.txt:
>>>>
>>>>         select should be used with care. select will force
>>>>         a symbol to a value without visiting the dependencies.
>>>>         By abusing select you are able to select a symbol FOO even
>>>>         if FOO depends on BAR that is not set.
>>>>         In general use select only for non-visible symbols
>>>>         (no prompts anywhere) and for symbols with no dependencies.
>>>>         That will limit the usefulness but on the other hand avoid
>>>>         the illegal configurations all over.
>>>>
>>>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
>>>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
>>>> should be fixed. The suggested patch does *not* fix this issue.
>>>>
>>> Jani, git log suggests you as the unfortunate author of the select
>>> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)
>> /o\
>>
>> As much as my present self would like to scold my past self for all his
>> mistakes, I have to remind myself that it is the mistakes that have
>> given me invaluable experience that my past self didn't have. I can only
>> hope my future self will have time to fix even a fraction of the
>> mistakes.
>>
>> Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
>> also depend on DRM, so this problem can't currently occur. Once dsi bus
>> un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
>> config (i.e. a loadable module).
>
> There is already patch adding bus unregistration [1]. It was published
> together
> with 'tristate' patch [2], both were created by Takashi few months ago.

Right. So make that "Once dis bus un-registration gets merged
upstream". ;)

BR,
Jani.


>
> [1]:
> https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html
> [2]:
> https://lists.freedesktop.org/archives/dri-devel/2016-August/114497.html
>
> Regards
> Andrzej
>
>>
>> BR,
>> Jani.
>>
>

-- 
Jani Nikula, Intel Open Source Technology Center

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
@ 2016-10-20 13:44                 ` Jani Nikula
  0 siblings, 0 replies; 25+ messages in thread
From: Jani Nikula @ 2016-10-20 13:44 UTC (permalink / raw)
  To: Andrzej Hajda, Emil Velikov
  Cc: linux-kernel, dri-devel, Sun, Jing A, Vetter, Daniel, Thierry Reding

On Thu, 20 Oct 2016, Andrzej Hajda <a.hajda@samsung.com> wrote:
> Hi Jani,
>
> Forgive me late response.
>
> On 12.10.2016 16:28, Jani Nikula wrote:
>> On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>>> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
>>>>> It's needed that DRM Driver module could be removed and reloaded after
>>>>> kernel booting on the projects that I have been working on, and I hope
>>>>> such module type change could be accepted. Looks like Iwai has similar
>>>>> change request as well. Would you please review it and let us know if
>>>>> any concerns?
>>>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
>>>> recommendations of Documentation/kbuild/kconfig-language.txt:
>>>>
>>>>         select should be used with care. select will force
>>>>         a symbol to a value without visiting the dependencies.
>>>>         By abusing select you are able to select a symbol FOO even
>>>>         if FOO depends on BAR that is not set.
>>>>         In general use select only for non-visible symbols
>>>>         (no prompts anywhere) and for symbols with no dependencies.
>>>>         That will limit the usefulness but on the other hand avoid
>>>>         the illegal configurations all over.
>>>>
>>>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
>>>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
>>>> should be fixed. The suggested patch does *not* fix this issue.
>>>>
>>> Jani, git log suggests you as the unfortunate author of the select
>>> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)
>> /o\
>>
>> As much as my present self would like to scold my past self for all his
>> mistakes, I have to remind myself that it is the mistakes that have
>> given me invaluable experience that my past self didn't have. I can only
>> hope my future self will have time to fix even a fraction of the
>> mistakes.
>>
>> Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
>> also depend on DRM, so this problem can't currently occur. Once dsi bus
>> un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
>> config (i.e. a loadable module).
>
> There is already patch adding bus unregistration [1]. It was published
> together
> with 'tristate' patch [2], both were created by Takashi few months ago.

Right. So make that "Once dis bus un-registration gets merged
upstream". ;)

BR,
Jani.


>
> [1]:
> https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html
> [2]:
> https://lists.freedesktop.org/archives/dri-devel/2016-August/114497.html
>
> Regards
> Andrzej
>
>>
>> BR,
>> Jani.
>>
>

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".
  2016-10-20 13:44                 ` Jani Nikula
  (?)
@ 2016-10-21 12:19                 ` Daniel Vetter
  -1 siblings, 0 replies; 25+ messages in thread
From: Daniel Vetter @ 2016-10-21 12:19 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Andrzej Hajda, Emil Velikov, linux-kernel, dri-devel, Sun,
	Jing A, Vetter, Daniel, Thierry Reding

On Thu, Oct 20, 2016 at 04:44:49PM +0300, Jani Nikula wrote:
> On Thu, 20 Oct 2016, Andrzej Hajda <a.hajda@samsung.com> wrote:
> > Hi Jani,
> >
> > Forgive me late response.
> >
> > On 12.10.2016 16:28, Jani Nikula wrote:
> >> On Wed, 12 Oct 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> >>> On 11 October 2016 at 10:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >>>> On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun@intel.com> wrote:
> >>>>> It's needed that DRM Driver module could be removed and reloaded after
> >>>>> kernel booting on the projects that I have been working on, and I hope
> >>>>> such module type change could be accepted. Looks like Iwai has similar
> >>>>> change request as well. Would you please review it and let us know if
> >>>>> any concerns?
> >>>> Looking at the Kconfig, selecting CONFIG_DRM_MIPI_DSI is against the
> >>>> recommendations of Documentation/kbuild/kconfig-language.txt:
> >>>>
> >>>>         select should be used with care. select will force
> >>>>         a symbol to a value without visiting the dependencies.
> >>>>         By abusing select you are able to select a symbol FOO even
> >>>>         if FOO depends on BAR that is not set.
> >>>>         In general use select only for non-visible symbols
> >>>>         (no prompts anywhere) and for symbols with no dependencies.
> >>>>         That will limit the usefulness but on the other hand avoid
> >>>>         the illegal configurations all over.
> >>>>
> >>>> Indeed, you may end up with CONFIG_DRM_MIPI_DSI=y and CONFIG_DRM=m,
> >>>> which violates DRM_MIPI_DSI dependency on CONFIG_DRM. This is broken and
> >>>> should be fixed. The suggested patch does *not* fix this issue.
> >>>>
> >>> Jani, git log suggests you as the unfortunate author of the select
> >>> DRM_MIPI_DSI/select DRM_PANEL hunks in i915 ;-)
> >> /o\
> >>
> >> As much as my present self would like to scold my past self for all his
> >> mistakes, I have to remind myself that it is the mistakes that have
> >> given me invaluable experience that my past self didn't have. I can only
> >> hope my future self will have time to fix even a fraction of the
> >> mistakes.
> >>
> >> Anyway, as Andrzej pointed out, all configs that select DRM_MIPI_DSI
> >> also depend on DRM, so this problem can't currently occur. Once dsi bus
> >> un-registration gets addressed, we can turn DRM_MIPI_DSI into a tristate
> >> config (i.e. a loadable module).
> >
> > There is already patch adding bus unregistration [1]. It was published
> > together
> > with 'tristate' patch [2], both were created by Takashi few months ago.
> 
> Right. So make that "Once dis bus un-registration gets merged
> upstream". ;)

Someone volunteering for some review pls?
-Daniel

> 
> BR,
> Jani.
> 
> 
> >
> > [1]:
> > https://lists.freedesktop.org/archives/dri-devel/2016-August/114870.html
> > [2]:
> > https://lists.freedesktop.org/archives/dri-devel/2016-August/114497.html
> >
> > Regards
> > Andrzej
> >
> >>
> >> BR,
> >> Jani.
> >>
> >
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

end of thread, other threads:[~2016-10-21 12:19 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10  7:31 [PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate" Sun, Jing A
2016-10-10  8:28 ` Jani Nikula
2016-10-10  8:28   ` Jani Nikula
2016-10-10  9:57   ` Takashi Iwai
2016-10-11  8:40     ` Sun, Jing A
2016-10-11  9:17       ` Andrzej Hajda
2016-10-11  9:17         ` Andrzej Hajda
2016-10-11  9:33       ` Jani Nikula
2016-10-11  9:33         ` Jani Nikula
2016-10-11  9:53         ` Andrzej Hajda
2016-10-11  9:53           ` Andrzej Hajda
2016-10-12  3:08           ` Sun, Jing A
2016-10-12  6:51             ` Daniel Vetter
2016-10-12  6:51               ` Daniel Vetter
2016-10-12  9:04               ` Sun, Jing A
2016-10-12 10:52                 ` Jani Nikula
2016-10-12 10:52                   ` Jani Nikula
2016-10-12 11:28         ` Emil Velikov
2016-10-12 11:28           ` Emil Velikov
2016-10-12 14:28           ` Jani Nikula
2016-10-12 14:28             ` Jani Nikula
2016-10-20 13:20             ` Andrzej Hajda
2016-10-20 13:44               ` Jani Nikula
2016-10-20 13:44                 ` Jani Nikula
2016-10-21 12:19                 ` Daniel Vetter

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.