Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753809AbcJLGvs (ORCPT ); Wed, 12 Oct 2016 02:51:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33591 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbcJLGvl (ORCPT ); Wed, 12 Oct 2016 02:51:41 -0400 Date: Wed, 12 Oct 2016 08:51:36 +0200 From: Daniel Vetter 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". Message-ID: <20161012065136.GH20761@phenom.ffwll.local> Mail-Followup-To: "Sun, Jing A" , Andrzej Hajda , Jani Nikula , Takashi Iwai , Emil Velikov , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Vetter, Daniel" , Thierry Reding References: <87h98ktxow.fsf@intel.com> <87lgxvqlg3.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3042 Lines: 72 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" 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