[PATCH]"drm: change DRM_MIPI_DSI module type from "bool" to "tristate".

Jani Nikula jani.nikula at linux.intel.com
Tue Oct 11 09:33:32 UTC 2016


On Tue, 11 Oct 2016, "Sun, Jing A" <jing.a.sun at 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


More information about the dri-devel mailing list