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 02D2BC433EF for ; Mon, 13 Dec 2021 16:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238831AbhLMQ0m (ORCPT ); Mon, 13 Dec 2021 11:26:42 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:58083 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240708AbhLMQ0m (ORCPT ); Mon, 13 Dec 2021 11:26:42 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 77CDC5801BD; Mon, 13 Dec 2021 11:26:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 13 Dec 2021 11:26:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=NYzTodFUSDTQ1 k8uArv9hmdu5xxvwWvdj/NMSohJE10=; b=hdQMscQAE9/i1zRx1WJA9ZO44OXr9 r04PGf1xlnG3tky5p8+ITEBkUrRS+esDZUCWIylWLlRaRp/ocUW7UrBD+xzra8xh sLzYGzxXysPfeJssXkmKXvWtdLKTUBmalZcOiuMaJ/pz5XjbJLWqRDFmSj1jnzeW v+LZH19KUS8e9wQs9VOaV6NgnKnybXLS+w9biUdDpSSgarrHT2C2ErpVvBBJfXxV JAmh4mj8Ez9iSUpM3Cr3iidFG0QDjhUa4dtl0u3NN5M/4s7/TJwxfH63i7OWWszd Z7YwdS0KlU9PNvNeQRdqhuFT65chXx87zDiwOMXrfF5GMtB7onEeRQAlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=NYzTodFUSDTQ1k8uArv9hmdu5xxvwWvdj/NMSohJE10=; b=aKJTiMR1 YfhzpE4JjhbmGoGaZc1Xh9AUviTeEpQNaiVCZI1idKl/PmepANLNRlUaq6Qfiqb0 ZX3DPeT322BeGl4zG34IyzDBgYdMRSxQEBd+3VOKvKHrx5lcCAklnv4iflJnTSrz 80kYHRGkyWQY2Una+ZwTkZ8hvbkJpuCyRozYl+CBiZHw8xRApum9VdmPkcGfQ5iC iMU/kdpTqVlDq1njysLIEJnct6nBiM2xMqZzZQidhMCjfIiDIhpCLsTrI16goNVi laxs+wAKtHEi8FhOeerKtpNL/1LvtOq94JHwOwoYpUgsYZOXiiDQASbO+In9SujL 6coOZ+/9XZkNww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrkeekgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Dec 2021 11:26:40 -0500 (EST) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie , Florian Fainelli , Scott Branden , Nicolas Saenz Julienne , Rob Herring , Frank Rowand , Ray Jui Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH RESEND v4 v4 2/4] drm/vc4: Support nomodeset Date: Mon, 13 Dec 2021 17:26:33 +0100 Message-Id: <20211213162635.252582-3-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211213162635.252582-1-maxime@cerno.tech> References: <20211213162635.252582-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org If we have nomodeset on the kernel command line we should have the firmware framebuffer driver kept as is and not try to load the full-blown KMS driver. In this case, let's just register the v3d driver. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 16abc3a3d601..12694e2201e7 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -357,12 +357,22 @@ static int __init vc4_drm_register(void) { int ret; - ret = platform_register_drivers(component_drivers, - ARRAY_SIZE(component_drivers)); - if (ret) - return ret; + if (!drm_firmware_drivers_only()) { + ret = platform_register_drivers(component_drivers, + ARRAY_SIZE(component_drivers)); + if (ret) + return ret; - return platform_driver_register(&vc4_platform_driver); + ret = platform_driver_register(&vc4_platform_driver); + if (ret) + return ret; + } else { + ret = platform_driver_register(&vc4_v3d_driver); + if (ret) + return ret; + } + + return 0; } static void __exit vc4_drm_unregister(void) -- 2.33.1