From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D13CC433F5 for ; Thu, 16 Dec 2021 00:24:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232335AbhLPAYk (ORCPT ); Wed, 15 Dec 2021 19:24:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbhLPAYj (ORCPT ); Wed, 15 Dec 2021 19:24:39 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66B03C061574 for ; Wed, 15 Dec 2021 16:24:39 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3A6173F6; Thu, 16 Dec 2021 01:24:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639614275; bh=jluRvkznhFHQAEudwl6chNVc4AtO829dsSTMAFxI34o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cviJ20aoht5w/BMK49EwlMpGgioG0ErkirGWvjTxg0fDBDNJcRre7ulVmKEVzBYii wQlZIlVvsOhBvhNCQoah91L4MF+KINUFx129SgaGMssdrgDAqk2iZyE6qAxlMMDjSm gmjQZN3KylbyHCYzrmYFjaAi4Ut+Ggv6xhcWlqGU= Date: Thu, 16 Dec 2021 02:24:32 +0200 From: Laurent Pinchart To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Heiko =?utf-8?Q?St=C3=BCbner?= , "James (Qian) Wang" , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Alexey Brodkin , Alison Wang , Anitha Chrisanthus , Boris Brezillon , Brian Starkey , Chen-Yu Tsai , Chun-Kuang Hu , David Lechner , Deepak Rawat , Edmund Dea , Emma Anholt , Erico Nunes , Hans de Goede , Hyun Kwon , Inki Dae , Joel Stanley , Joonyoung Shim , Jyri Sarha , Kamlesh Gurudasani , Kieran Bingham , Laurentiu Palcu , Linus Walleij , Liviu Dudau , Lucas Stach , Marek Vasut , Maxime Ripard , Neil Armstrong , Oleksandr Andrushchenko , Patrik Jakobsson , Paul Cercueil , Philipp Zabel , Philippe Cornu , Qiang Yu , Rob Clark , Rob Herring , Russell King , Russell King , Sam Ravnborg , Sandy Huang , Sean Paul , Stefan Agner , Thierry Reding , Thomas Zimmermann , Tian Tao , Tomeu Vizoso , Tomi Valkeinen , Xinliang Liu , Yannick Fertre Subject: Re: [PATCH 00/60] drm: Make all drivers to honour the nomodeset parameter Message-ID: References: <20211215010008.2545520-1-javierm@redhat.com> <91c6b455-62cd-cec7-8445-e93c99230a03@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <91c6b455-62cd-cec7-8445-e93c99230a03@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Javier, On Thu, Dec 16, 2021 at 01:13:56AM +0100, Javier Martinez Canillas wrote: > Hello Laurent, > > On 12/16/21 00:35, Laurent Pinchart wrote: > > [snip] > > >> > >> I've built tested with 'make allmodconfig && make M=drivers/gpu/drm/', but > >> only booted in a few devices with and without nomodeset in the cmdline. So > >> testing and reviewing for all the drivers would be highly appreciated. > > > > The fact that the series is so big makes me think it would be better to > > handle this in the DRM core. Is there any way we could do so ? Otherwise > > we'll chase this issue forever in new drivers, and will be plagued with > > cargo cult problems. > > > > Yes, what Thomas suggested is to add a set of drm_module_{pci,platform}_driver() > macros in include/drm/drm_drv.h, that will just check whether the driver should > be registered or not and call the {pci,platform}_register_driver() functions. > > That way the change in the drivers would just be something like the following: > > -module_platform_driver(malidp_platform_driver); > +drm_module_platform_driver(malidp_platform_driver); > > There are some drivers that still need a custom module init functions for various > reasons (e.g: register a set of devices/drivers, need to be a late init call, etc) > but at least for most drivers this should be handled transparently as long as they > use these drm_*_register_driver() macros. Another option could be to return an error from drm_dev_alloc(). That may avoid changes in the drivers. > So just ignore this series and I'll post a v2 soon. -- Regards, Laurent Pinchart