From patchwork Fri Nov 12 13:32:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616785 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EFF3C433EF for ; Fri, 12 Nov 2021 13:33:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5B376103A for ; Fri, 12 Nov 2021 13:32:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E5B376103A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 982A488EF2; Fri, 12 Nov 2021 13:32:54 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id C16AD6E3D2 for ; Fri, 12 Nov 2021 13:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VLaL9JZ/L/NQxIKHNVpbSM1dEcBi90FRvIYDc1fdXrY=; b=HJdXKNRr5Po2APyCkfj+TG9Qr2Fc2UzO+uDWr5DU2CooMHceg1MqoF69NZYYhis+4UgSIZ Ui29wdibioIi5AFHsPCf96kjpF1M7h1oNXfzghy58jg8fZau3D1D0mOe93DrK08+uEzBk+ QsQVj3QySmMixE6DJhpy3HIMBsuE48U= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-tT17PCDPOy-NEKloPm6n5w-1; Fri, 12 Nov 2021 08:32:49 -0500 X-MC-Unique: tT17PCDPOy-NEKloPm6n5w-1 Received: by mail-wm1-f72.google.com with SMTP id g80-20020a1c2053000000b003331a764709so6305245wmg.2 for ; Fri, 12 Nov 2021 05:32:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VLaL9JZ/L/NQxIKHNVpbSM1dEcBi90FRvIYDc1fdXrY=; b=hI7ReFNNQxkgAep8zmqEnayTfTdiY/jkyl3hNE9bmTig+km8OVYo73uzyZcSgQRXQC 7dkbA+8XRi3LiZQFmWV+XNTX+7gftEQGTgmKjBFJegkOcsQsESEsEPZ9tn0TSSkElMDM WR4KgPoECdorlyl30In3ZynG5vfPt6L1hVHeVFjDunYXklT0KnJEpuorj4BiDRL+VZzR IcPWbJwmuIvvUTYC6Sqz7fBUUgiwJ9NoPXkeFKUjLYKv9XSPiQXmwn7iHANPR2hMNrSM D1xEYqRDNs+hOJVu2zAi9+TXa/CW9rfvnK93HrXmncPZKL4LGIJB9GXB4uQYJgcv07cD em7Q== X-Gm-Message-State: AOAM530kKqcSxPltykd2a6ao5uau+55SjbNw42jkkzR/6I8cDrhWYL/a umKXrTc+bgrpdKodbCorhPO9wFlvixl7TXE0tb1f3a2G9RRJMaPkWS38FUfDlXQ2uDZeFRKO3cx fCYLweQVCvhAjh7Cp7xGIYdH4aDGD X-Received: by 2002:a5d:4989:: with SMTP id r9mr19032571wrq.14.1636723968589; Fri, 12 Nov 2021 05:32:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyf3Es8c/GzYUbtaVdHj/i+lj1ZAXpyeetue9BBTgBWOxPQKZ1EhV8CzIyD0A5jk57GUqcR0A== X-Received: by 2002:a5d:4989:: with SMTP id r9mr19032550wrq.14.1636723968436; Fri, 12 Nov 2021 05:32:48 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:48 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 1/6] drm: Don't print messages if drivers are disabled due nomodeset Date: Fri, 12 Nov 2021 14:32:25 +0100 Message-Id: <20211112133230.1595307-2-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The nomodeset kernel parameter handler already prints a message that the DRM drivers will be disabled, so there's no need for drivers to do that. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen --- (no changes since v1) drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +--- drivers/gpu/drm/radeon/radeon_drv.c | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index c718fb5f3f8a..289d04999ced 100644 --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2514,10 +2514,8 @@ static int __init amdgpu_init(void) { int r; - if (vgacon_text_force()) { - DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n"); + if (vgacon_text_force()) return -EINVAL; - } r = amdgpu_sync_init(); if (r) diff --git drivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/radeon/radeon_drv.c index b74cebca1f89..380adc61e71c 100644 --- drivers/gpu/drm/radeon/radeon_drv.c +++ drivers/gpu/drm/radeon/radeon_drv.c @@ -637,15 +637,11 @@ static struct pci_driver radeon_kms_pci_driver = { static int __init radeon_module_init(void) { - if (vgacon_text_force() && radeon_modeset == -1) { - DRM_INFO("VGACON disable radeon kernel modesetting.\n"); + if (vgacon_text_force() && radeon_modeset == -1) radeon_modeset = 0; - } - if (radeon_modeset == 0) { - DRM_ERROR("No UMS support in radeon module!\n"); + if (radeon_modeset == 0) return -EINVAL; - } DRM_INFO("radeon kernel modesetting enabled.\n"); radeon_register_atpx_handler(); From patchwork Fri Nov 12 13:32:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616789 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E889FC433EF for ; Fri, 12 Nov 2021 13:33:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2E2B60E98 for ; Fri, 12 Nov 2021 13:33:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B2E2B60E98 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28CF989000; Fri, 12 Nov 2021 13:32:56 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 581126E3D2 for ; Fri, 12 Nov 2021 13:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cq+5GX1LGAlrdEVaEfUGXIHfDu19zJU/Yjhmzl1bGJc=; b=ftPkMDPkFH2LtH4erVna264utLFW1xFDKfCiml9FTYD1XpTNwK+BumOQpSAUozvoPMk+fP n2WXm5OvFpsm2c9RY5q7u/9B8X8sdSEr7k/98dwurp/v+sqj297Uz3k8s5ex2g+C9BHhPC pCv72i3blL8L58QZJl/IUx0VcKkGM9A= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-UjAFDLDaMCK0q6g7v_5Lfw-1; Fri, 12 Nov 2021 08:32:51 -0500 X-MC-Unique: UjAFDLDaMCK0q6g7v_5Lfw-1 Received: by mail-wr1-f70.google.com with SMTP id y10-20020adffa4a000000b0017eea6cb05dso1590047wrr.6 for ; Fri, 12 Nov 2021 05:32:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cq+5GX1LGAlrdEVaEfUGXIHfDu19zJU/Yjhmzl1bGJc=; b=JJDm1gaTnB1j8Po69LCOZlssthe/PA+Z33Czoyoc7cKwj4gXNO3MCE4Ko8sFrcKexq 1mFtJVlZ4Pi1tpY8no9BdOt24o24Zt+XMbpeofKq8DsFchSc5vdNzjR809We+7N6SIrW o1zI78tIeUgC3dRugDa2YJh0R+iEISL2fuw78aCZkhl7ykBOhU0dOa/N7kCj89jB1iBx Tk+F0oQrL0dpxjAagah9nXOxn11Y/SrEZznbhnOo5iXIR1wNFgpesnaWKBY9qJthrc+v hX2n737CKHRkwcE2UTj4AsK4C2l/pukco9saOQdCjOPQc2eCvQaOiSjgLkZSm4EqcoU1 8NKg== X-Gm-Message-State: AOAM530DNy7loyxzBG1O/1rfc5PqMruYfExI86tBrumbOS6to6wuRw63 xAL7OL58o73wgJOO3l2AWb/ANXhh6eBhIJKUO36W+09Ciow1EvEzu4YyhVqK1OJTfkpyOtFjljU awGFTs3bdZ6jYM6Gk5NDAcpCwDykC X-Received: by 2002:a05:600c:5101:: with SMTP id o1mr34460065wms.81.1636723969979; Fri, 12 Nov 2021 05:32:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoWQcfWmWVvV0JYnbwieSBAuTFS5D1rKq/HCQc0RO5OF48GRcTM2rvN71XU0UWSo8x16SIlA== X-Received: by 2002:a05:600c:5101:: with SMTP id o1mr34460043wms.81.1636723969780; Fri, 12 Nov 2021 05:32:49 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:49 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 2/6] drm/vboxvideo: Drop CONFIG_VGA_CONSOLE guard to call vgacon_text_force() Date: Fri, 12 Nov 2021 14:32:26 +0100 Message-Id: <20211112133230.1595307-3-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It is already handled by the console.h macro since a stub inline function is defined for vgacon_text_force() if CONFIG_VGA_CONSOLE is not set. There's no need to have ifdefery in the driver when calling the function. Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen --- (no changes since v1) drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git drivers/gpu/drm/vboxvideo/vbox_drv.c drivers/gpu/drm/vboxvideo/vbox_drv.c index a6c81af37345..fd7abb029c65 100644 --- drivers/gpu/drm/vboxvideo/vbox_drv.c +++ drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -193,10 +193,8 @@ static const struct drm_driver driver = { static int __init vbox_init(void) { -#ifdef CONFIG_VGA_CONSOLE if (vgacon_text_force() && vbox_modeset == -1) return -EINVAL; -#endif if (vbox_modeset == 0) return -EINVAL; From patchwork Fri Nov 12 13:32:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616787 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 473B0C433EF for ; Fri, 12 Nov 2021 13:33:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1155F60F5B for ; Fri, 12 Nov 2021 13:33:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1155F60F5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2639888FFB; Fri, 12 Nov 2021 13:32:56 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5EF8588E45 for ; Fri, 12 Nov 2021 13:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gMXWwiBK3RBqBYcPe7dwG1xZroSv2Emx7glA+9PY+OU=; b=WFOfEwybFJ2/TlUXS6kC/GMzg8kKdvUpO4qHKwAbOZDA/16M5IE2JSiud/ymWkPWZhfnIO r5fwx/Lv0aBUv7FJbIWxhPS9gADLq91NIPqf5dmoXlA1Gr7Et1rrN7oIEAQ/TMBb4PFi8F 3xJ4OTA/NPHIJ+4Wmeagddbknq194c4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-I8ySnOwaOZ2tSrzcKkWzpQ-1; Fri, 12 Nov 2021 08:32:52 -0500 X-MC-Unique: I8ySnOwaOZ2tSrzcKkWzpQ-1 Received: by mail-wm1-f71.google.com with SMTP id o10-20020a05600c4fca00b0033312e1ed8bso4289663wmq.2 for ; Fri, 12 Nov 2021 05:32:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gMXWwiBK3RBqBYcPe7dwG1xZroSv2Emx7glA+9PY+OU=; b=tqvoauR6eMBIgNu8Nn0oZupN2+pet6/kjd44QzBRcFniDxJCFrSfZknU2GbKapFR4U CAjDRFxUgC87+SLcwiW0+NfWhypmh/w8FX/RQswpcHKqtsRUP+MwXe4HVYcwd3AJtR5r apfkH6tPP3cMRvJBe7pXIjOCp8O1P18lVGFjQarpEIx809AxVqQ6l0uIXib2yLShs67D e0nBakxRK+1R9KIKK6A6rAbo2SDdQdvw8VjrsJhUW3vgwcE3bTCf7Dhyl1WbJNOkMEQe 8QfYvrMJ3ygeuQy1NAFTUSvTNPWYEl+EfoIEpwmAVM+V76+MDjlrPILFVWXHisE4eZVo L4MQ== X-Gm-Message-State: AOAM532MO+txnSw+f2pawNUrUC5BJpyxqrDxiZu6ObHLsusNw2vcKmHa r1nQHKhBbGtmkvq/6Htaml7ZsNwS1/0L8a0dzJNvE05cR+Ev4sXcVVER3iEPB3QwSbCgxTgo5SE DyQ2v3S8b9jeXSlQB/h6CkNJd9rpO X-Received: by 2002:a5d:4107:: with SMTP id l7mr18181415wrp.209.1636723971011; Fri, 12 Nov 2021 05:32:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN5jWm/y+clKDEz5Sg9mI0dcBKVnDcHzYrJ1KIuRHz/enh+HBIh96KNiC2v+8bLM5ypHHl3Q== X-Received: by 2002:a5d:4107:: with SMTP id l7mr18181370wrp.209.1636723970768; Fri, 12 Nov 2021 05:32:50 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:50 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 3/6] drm: Move nomodeset kernel parameter to the DRM subsystem Date: Fri, 12 Nov 2021 14:32:27 +0100 Message-Id: <20211112133230.1595307-4-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "nomodeset" kernel cmdline parameter is handled by the vgacon driver but the exported vgacon_text_force() symbol is only used by DRM drivers. It makes much more sense for the parameter logic to be in the subsystem of the drivers that are making use of it. Let's move the vgacon_text_force() function and related logic to the DRM subsystem. While doing that, rename it to drm_firmware_drivers_only() and make it return true if "nomodeset" was used and false otherwise. This is a better description of the condition that the drivers are testing for. Suggested-by: Daniel Vetter Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen Acked-by: Greg Kroah-Hartman --- Changes in v5: - Rename drm_get_modeset() to drm_firmware_drivers_only(). Changes in v3: - Drop the drm_drv_enabled() function and just call to drm_get_modeset(). - Make drm_get_modeset() just a getter function and don't return an error. - Move independent cleanups in drivers as separate preparatory patches. Changes in v2: - Conditionally build drm_nomodeset.o if CONFIG_VGA_CONSOLE is set. - Squash patches to move nomodeset logic to DRM and do the renaming. - Name the function drm_check_modeset() and make it return -ENODEV. - Squash patch to add drm_drv_enabled() and make drivers use it. - Make the drivers changes before moving nomodeset logic to DRM. - Make drm_drv_enabled() return an errno and -ENODEV if nomodeset. - Remove debug and error messages in drivers. drivers/gpu/drm/Makefile | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-- drivers/gpu/drm/ast/ast_drv.c | 3 +-- drivers/gpu/drm/drm_nomodeset.c | 26 +++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_module.c | 4 ++-- drivers/gpu/drm/mgag200/mgag200_drv.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_drm.c | 4 ++-- drivers/gpu/drm/qxl/qxl_drv.c | 3 +-- drivers/gpu/drm/radeon/radeon_drv.c | 3 +-- drivers/gpu/drm/tiny/bochs.c | 3 +-- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- drivers/gpu/drm/vboxvideo/vbox_drv.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_drv.c | 3 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 +-- drivers/video/console/vgacon.c | 21 -------------------- include/drm/drm_drv.h | 5 +++++ include/linux/console.h | 6 ------ 17 files changed, 48 insertions(+), 51 deletions(-) create mode 100644 drivers/gpu/drm/drm_nomodeset.c diff --git drivers/gpu/drm/Makefile drivers/gpu/drm/Makefile index 1c41156deb5f..c74810c285af 100644 --- drivers/gpu/drm/Makefile +++ drivers/gpu/drm/Makefile @@ -33,6 +33,8 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86. obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o +obj-$(CONFIG_VGA_CONSOLE) += drm_nomodeset.o + drm_cma_helper-y := drm_gem_cma_helper.o obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o diff --git drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 289d04999ced..fc761087c358 100644 --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -31,7 +31,6 @@ #include "amdgpu_drv.h" #include -#include #include #include #include @@ -2514,7 +2513,7 @@ static int __init amdgpu_init(void) { int r; - if (vgacon_text_force()) + if (drm_firmware_drivers_only()) return -EINVAL; r = amdgpu_sync_init(); diff --git drivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/ast/ast_drv.c index 86d5cd7b6318..6d8613f6fe1c 100644 --- drivers/gpu/drm/ast/ast_drv.c +++ drivers/gpu/drm/ast/ast_drv.c @@ -26,7 +26,6 @@ * Authors: Dave Airlie */ -#include #include #include @@ -233,7 +232,7 @@ static struct pci_driver ast_pci_driver = { static int __init ast_init(void) { - if (vgacon_text_force() && ast_modeset == -1) + if (drm_firmware_drivers_only() && ast_modeset == -1) return -EINVAL; if (ast_modeset == 0) diff --git drivers/gpu/drm/drm_nomodeset.c drivers/gpu/drm/drm_nomodeset.c new file mode 100644 index 000000000000..287edfb18b5d --- /dev/null +++ drivers/gpu/drm/drm_nomodeset.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include + +static bool drm_nomodeset; + +bool drm_firmware_drivers_only(void) +{ + return drm_nomodeset; +} +EXPORT_SYMBOL(drm_firmware_drivers_only); + +static int __init disable_modeset(char *str) +{ + drm_nomodeset = true; + + pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n"); + pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n"); + pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n"); + + return 1; +} + +/* Disable kernel modesetting */ +__setup("nomodeset", disable_modeset); diff --git drivers/gpu/drm/i915/i915_module.c drivers/gpu/drm/i915/i915_module.c index ab2295dd4500..1df66bf276ce 100644 --- drivers/gpu/drm/i915/i915_module.c +++ drivers/gpu/drm/i915/i915_module.c @@ -4,7 +4,7 @@ * Copyright © 2021 Intel Corporation */ -#include +#include #include "gem/i915_gem_context.h" #include "gem/i915_gem_object.h" @@ -31,7 +31,7 @@ static int i915_check_nomodeset(void) if (i915_modparams.modeset == 0) use_kms = false; - if (vgacon_text_force() && i915_modparams.modeset == -1) + if (drm_firmware_drivers_only() && i915_modparams.modeset == -1) use_kms = false; if (!use_kms) { diff --git drivers/gpu/drm/mgag200/mgag200_drv.c drivers/gpu/drm/mgag200/mgag200_drv.c index 6b9243713b3c..740108a006ba 100644 --- drivers/gpu/drm/mgag200/mgag200_drv.c +++ drivers/gpu/drm/mgag200/mgag200_drv.c @@ -6,7 +6,6 @@ * Dave Airlie */ -#include #include #include #include @@ -378,7 +377,7 @@ static struct pci_driver mgag200_pci_driver = { static int __init mgag200_init(void) { - if (vgacon_text_force() && mgag200_modeset == -1) + if (drm_firmware_drivers_only() && mgag200_modeset == -1) return -EINVAL; if (mgag200_modeset == 0) diff --git drivers/gpu/drm/nouveau/nouveau_drm.c drivers/gpu/drm/nouveau/nouveau_drm.c index 1f828c9f691c..b8158064c377 100644 --- drivers/gpu/drm/nouveau/nouveau_drm.c +++ drivers/gpu/drm/nouveau/nouveau_drm.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include #include #include #include @@ -32,6 +31,7 @@ #include #include +#include #include #include #include @@ -1322,7 +1322,7 @@ nouveau_drm_init(void) nouveau_display_options(); if (nouveau_modeset == -1) { - if (vgacon_text_force()) + if (drm_firmware_drivers_only()) nouveau_modeset = 0; } diff --git drivers/gpu/drm/qxl/qxl_drv.c drivers/gpu/drm/qxl/qxl_drv.c index fc47b0deb021..e4b16421500b 100644 --- drivers/gpu/drm/qxl/qxl_drv.c +++ drivers/gpu/drm/qxl/qxl_drv.c @@ -29,7 +29,6 @@ #include "qxl_drv.h" -#include #include #include #include @@ -295,7 +294,7 @@ static struct drm_driver qxl_driver = { static int __init qxl_init(void) { - if (vgacon_text_force() && qxl_modeset == -1) + if (drm_firmware_drivers_only() && qxl_modeset == -1) return -EINVAL; if (qxl_modeset == 0) diff --git drivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/radeon/radeon_drv.c index 380adc61e71c..956c72b5aa33 100644 --- drivers/gpu/drm/radeon/radeon_drv.c +++ drivers/gpu/drm/radeon/radeon_drv.c @@ -31,7 +31,6 @@ #include -#include #include #include #include @@ -637,7 +636,7 @@ static struct pci_driver radeon_kms_pci_driver = { static int __init radeon_module_init(void) { - if (vgacon_text_force() && radeon_modeset == -1) + if (drm_firmware_drivers_only() && radeon_modeset == -1) radeon_modeset = 0; if (radeon_modeset == 0) diff --git drivers/gpu/drm/tiny/bochs.c drivers/gpu/drm/tiny/bochs.c index 2ce3bd903b70..fc26a1ce11ee 100644 --- drivers/gpu/drm/tiny/bochs.c +++ drivers/gpu/drm/tiny/bochs.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include #include #include @@ -719,7 +718,7 @@ static struct pci_driver bochs_pci_driver = { static int __init bochs_init(void) { - if (vgacon_text_force() && bochs_modeset == -1) + if (drm_firmware_drivers_only() && bochs_modeset == -1) return -EINVAL; if (bochs_modeset == 0) diff --git drivers/gpu/drm/tiny/cirrus.c drivers/gpu/drm/tiny/cirrus.c index 9327001d35dd..c95d9ff7d600 100644 --- drivers/gpu/drm/tiny/cirrus.c +++ drivers/gpu/drm/tiny/cirrus.c @@ -16,7 +16,6 @@ * Copyright 1999-2001 Jeff Garzik */ -#include #include #include #include @@ -636,8 +635,9 @@ static struct pci_driver cirrus_pci_driver = { static int __init cirrus_init(void) { - if (vgacon_text_force()) + if (drm_firmware_drivers_only()) return -EINVAL; + return pci_register_driver(&cirrus_pci_driver); } diff --git drivers/gpu/drm/vboxvideo/vbox_drv.c drivers/gpu/drm/vboxvideo/vbox_drv.c index fd7abb029c65..f35d9e44c6b7 100644 --- drivers/gpu/drm/vboxvideo/vbox_drv.c +++ drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -7,7 +7,6 @@ * Michael Thayer */ -#include #include #include #include @@ -193,7 +192,7 @@ static const struct drm_driver driver = { static int __init vbox_init(void) { - if (vgacon_text_force() && vbox_modeset == -1) + if (drm_firmware_drivers_only() && vbox_modeset == -1) return -EINVAL; if (vbox_modeset == 0) diff --git drivers/gpu/drm/virtio/virtgpu_drv.c drivers/gpu/drm/virtio/virtgpu_drv.c index 749db18dcfa2..81eab9be57ea 100644 --- drivers/gpu/drm/virtio/virtgpu_drv.c +++ drivers/gpu/drm/virtio/virtgpu_drv.c @@ -27,7 +27,6 @@ */ #include -#include #include #include #include @@ -104,7 +103,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) struct drm_device *dev; int ret; - if (vgacon_text_force() && virtio_gpu_modeset == -1) + if (drm_firmware_drivers_only() && virtio_gpu_modeset == -1) return -EINVAL; if (virtio_gpu_modeset == 0) diff --git drivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index ab9a1750e1df..695b0ec725cd 100644 --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -25,7 +25,6 @@ * **************************************************************************/ -#include #include #include #include @@ -1651,7 +1650,7 @@ static int __init vmwgfx_init(void) { int ret; - if (vgacon_text_force()) + if (drm_firmware_drivers_only()) return -EINVAL; ret = pci_register_driver(&vmw_pci_driver); diff --git drivers/video/console/vgacon.c drivers/video/console/vgacon.c index ef9c57ce0906..d4320b147956 100644 --- drivers/video/console/vgacon.c +++ drivers/video/console/vgacon.c @@ -97,30 +97,9 @@ static int vga_video_font_height; static int vga_scan_lines __read_mostly; static unsigned int vga_rolled_over; /* last vc_origin offset before wrap */ -static bool vgacon_text_mode_force; static bool vga_hardscroll_enabled; static bool vga_hardscroll_user_enable = true; -bool vgacon_text_force(void) -{ - return vgacon_text_mode_force; -} -EXPORT_SYMBOL(vgacon_text_force); - -static int __init text_mode(char *str) -{ - vgacon_text_mode_force = true; - - pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n"); - pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n"); - pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n"); - - return 1; -} - -/* force text mode - used by kernel modesetting */ -__setup("nomodeset", text_mode); - static int __init no_scroll(char *str) { /* diff --git include/drm/drm_drv.h include/drm/drm_drv.h index a84eb4028e5b..89e26a732175 100644 --- include/drm/drm_drv.h +++ include/drm/drm_drv.h @@ -601,5 +601,10 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) int drm_dev_set_unique(struct drm_device *dev, const char *name); +#ifdef CONFIG_VGA_CONSOLE +extern bool drm_firmware_drivers_only(void); +#else +static inline bool drm_firmware_drivers_only(void) { return false; } +#endif #endif diff --git include/linux/console.h include/linux/console.h index 20874db50bc8..d4dd8384898b 100644 --- include/linux/console.h +++ include/linux/console.h @@ -217,12 +217,6 @@ extern atomic_t ignore_console_lock_warning; #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 -#ifdef CONFIG_VGA_CONSOLE -extern bool vgacon_text_force(void); -#else -static inline bool vgacon_text_force(void) { return false; } -#endif - extern void console_init(void); /* For deferred console takeover */ From patchwork Fri Nov 12 13:32:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616791 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DECB9C433FE for ; Fri, 12 Nov 2021 13:33:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A184660EBC for ; Fri, 12 Nov 2021 13:33:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A184660EBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05AC46E3D2; Fri, 12 Nov 2021 13:33:00 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62DA088FC8 for ; Fri, 12 Nov 2021 13:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+1s41S2hPwpPT7g2xpXi235aPAB5NLJoO6nNF2Iym4o=; b=SisXvzMjn8lGtlg3U1OOotVcbGoEnHd4U7ppe/iOBG++D4msueb5TqNSjJRBZMDAjzEKXx 9A4UUjXnotMw5naWuf+/mK9TlvlGxFcdo7UFXiWZdynJXzpVxa6AkI0FH8Ho+gDpW8SBxR +GPdgvco5phI9U3bXtP1Jxm7MxIiAfk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-527-nv0COL2sOQCr3Vk2A412Dw-1; Fri, 12 Nov 2021 08:32:53 -0500 X-MC-Unique: nv0COL2sOQCr3Vk2A412Dw-1 Received: by mail-wm1-f71.google.com with SMTP id m18-20020a05600c3b1200b0033283ea5facso2231702wms.1 for ; Fri, 12 Nov 2021 05:32:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+1s41S2hPwpPT7g2xpXi235aPAB5NLJoO6nNF2Iym4o=; b=wYG0tRoJreoa6uSvNJTka9RFRxNt+UHaR3X2kYElB7872jNQLdXabUj8cDgF4DLW2v TlTKngoKNQd0peTg3NoWXgVpyX9xBstyZ/nV4OTYJ3urwktyOOEk7qzrVptQBMa4RYZT QAbp9DAuD9JLIel6XYNsrsoklaxRdTSO+U+bfRlr5i4w5cwMI5BODXqylAJfuHcWJiFz 4RNTDUSUQwe9RRRDFFGruluCajsm+cj4KWTmdTtBR63IGTMcmb1VTRJHaJz5760rU+o9 V7VWNcUfb36PXDqCA2pc5inMJBEYPC98d9X7xf3cDeM+lySjmCCYVSSF5apaIhtvTiJ+ JJyw== X-Gm-Message-State: AOAM533j6y01V5XEhHJRyVVoGNN4tawwZjk8TS23oW9TkdnQKsyVc4KF QyhuT4gsbp0BCFDenNfNDGPCZjRZ6TH7dBHBFnixBVPK04AK0+nFJ62564DuJVRCgOAUlRs/RPm ZSckuT/Dq2nIfpXto3e5tCyFvARzV X-Received: by 2002:a7b:cf0f:: with SMTP id l15mr17452502wmg.92.1636723972337; Fri, 12 Nov 2021 05:32:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0Xujucpr+TCy5KQx1Uvs84Rns+3FCYJpzpxCgAXAGddQEWARAJGBX35Wrmx2RbfGOXF7SbQ== X-Received: by 2002:a7b:cf0f:: with SMTP id l15mr17452471wmg.92.1636723972162; Fri, 12 Nov 2021 05:32:52 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:51 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 4/6] drm: Decouple nomodeset from CONFIG_VGA_CONSOLE Date: Fri, 12 Nov 2021 14:32:28 +0100 Message-Id: <20211112133230.1595307-5-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This relationship was only for historical reasons and the nomodeset option should be available even on platforms that don't enable CONFIG_VGA_CONSOLE. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen --- (no changes since v1) drivers/gpu/drm/Kconfig | 6 ++++++ drivers/gpu/drm/Makefile | 2 +- include/drm/drm_drv.h | 4 ---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git drivers/gpu/drm/Kconfig drivers/gpu/drm/Kconfig index fb144617055b..483d534eb074 100644 --- drivers/gpu/drm/Kconfig +++ drivers/gpu/drm/Kconfig @@ -8,6 +8,7 @@ menuconfig DRM tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA + select DRM_NOMODESET select DRM_PANEL_ORIENTATION_QUIRKS select HDMI select FB_CMDLINE @@ -493,6 +494,11 @@ config DRM_EXPORT_FOR_TESTS config DRM_PANEL_ORIENTATION_QUIRKS tristate +# Separate option because nomodeset parameter is global and expected built-in +config DRM_NOMODESET + bool + default n + config DRM_LIB_RANDOM bool default n diff --git drivers/gpu/drm/Makefile drivers/gpu/drm/Makefile index c74810c285af..fa16d3e0bbdc 100644 --- drivers/gpu/drm/Makefile +++ drivers/gpu/drm/Makefile @@ -33,7 +33,7 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86. obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o -obj-$(CONFIG_VGA_CONSOLE) += drm_nomodeset.o +obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o drm_cma_helper-y := drm_gem_cma_helper.o obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o diff --git include/drm/drm_drv.h include/drm/drm_drv.h index 89e26a732175..da0c836fe8e1 100644 --- include/drm/drm_drv.h +++ include/drm/drm_drv.h @@ -601,10 +601,6 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) int drm_dev_set_unique(struct drm_device *dev, const char *name); -#ifdef CONFIG_VGA_CONSOLE extern bool drm_firmware_drivers_only(void); -#else -static inline bool drm_firmware_drivers_only(void) { return false; } -#endif #endif From patchwork Fri Nov 12 13:32:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616793 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 826BFC433EF for ; Fri, 12 Nov 2021 13:33:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5188D60F5B for ; Fri, 12 Nov 2021 13:33:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5188D60F5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F07456E051; Fri, 12 Nov 2021 13:32:59 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 801CC89010 for ; Fri, 12 Nov 2021 13:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3FqzlM6+St6bQetl39I3gwMqH+GHqZeZ7fYAU6/+0T4=; b=RI6DuPi0QABK0o3jmrqBE2n6lxRbjS/gn56u9K1xk8s0rwkQbqb7+oc+WB0JG/O4y1vU4v KBiYci0++Ph1ZhxtaYW/oqzPkNn54OWYUZkZQxBjmHdjwKCwRMtmyWiyAt5W5P+rAoV7kk +yI1xJecOS8FwAC5PxKpy9PiJleVGNg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-444-_qgKGqaRMvmOyxubFS1Yng-1; Fri, 12 Nov 2021 08:32:54 -0500 X-MC-Unique: _qgKGqaRMvmOyxubFS1Yng-1 Received: by mail-wm1-f71.google.com with SMTP id b133-20020a1c808b000000b0032cdd691994so6303620wmd.1 for ; Fri, 12 Nov 2021 05:32:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3FqzlM6+St6bQetl39I3gwMqH+GHqZeZ7fYAU6/+0T4=; b=rfBau/8SykUiSFeRg1ZG/+lcab9pV3XpXjDjf5rN8IecJdkTwAjBMNtvoWH85FZ8kj afkS2Pn5NCHz2wWQkAz7oMgoZ5n6gROAMl5I7HTctjL5tuOIAMSIT1nSbbLnfjXm5M2I gyLmUJmoNTu8k+tvWrMPbCbSsEIVBHoi+SvbzUwZPyZIWuASZGR3zeT4DjyEh6t/MlXz E4DEamEe7OGAM882FmlSe0xjrW4GW+mMXXV6dJnR1Z7n0bu5DrwHcOVmOsEsxEO0bbwX tDN5VGLuifxAe5cUJ/TEW0AAw/KxCAROpve6nKzzjemdkTvxwnxyrF0uYZBq6Pj/6wj8 PxUQ== X-Gm-Message-State: AOAM530wuh31r8IFs7bkvdlnwuZmNuzhYB3xe9AREYpNjX8YNGdfU7FL 2V/7FuxNFaqLWCSge47sQejYvPUMsS4UjoaDbTGhEPPl1BgK8ny6s3vXJyh1YU2+ByMhHeZJrsS msRNHA9HYFjtwZj7B9vi1P8f5PfP7 X-Received: by 2002:a05:600c:c1:: with SMTP id u1mr34049722wmm.163.1636723973510; Fri, 12 Nov 2021 05:32:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXhf8o+Hmrcc8jR2g8wf726UvSKzVQSsR1IKzZrdqoEz7h67KIvU9EZPqzf/sK1e/whAJWug== X-Received: by 2002:a05:600c:c1:: with SMTP id u1mr34049692wmm.163.1636723973313; Fri, 12 Nov 2021 05:32:53 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:53 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 5/6] Documentation/admin-guide: Document nomodeset kernel parameter Date: Fri, 12 Nov 2021 14:32:29 +0100 Message-Id: <20211112133230.1595307-6-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The nomodeset kernel command line parameter is not documented. Its name is quite vague and is not intuitive what's the behaviour when it is set. Document in kernel-parameters.txt what actually happens when nomodeset is used. That way, users could know if they want to enable this option. Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen --- (no changes since v4) Changes in v4: - Don't mention the simpledrm driver and instead explain in high level terms what the nomodeset option is about. Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git Documentation/admin-guide/kernel-parameters.txt Documentation/admin-guide/kernel-parameters.txt index 91ba391f9b32..f6434aff943d 100644 --- Documentation/admin-guide/kernel-parameters.txt +++ Documentation/admin-guide/kernel-parameters.txt @@ -3521,6 +3521,13 @@ shutdown the other cpus. Instead use the REBOOT_VECTOR irq. + nomodeset Disable kernel modesetting. DRM drivers will not perform + display-mode changes or accelerated rendering. Only the + system framebuffer will be available for use if this was + set-up by the firmware or boot loader. + + Useful as fallback, or for testing and debugging. + nomodule Disable module load nopat [X86] Disable PAT (page attribute table extension of From patchwork Fri Nov 12 13:32:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12616795 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3246AC433FE for ; Fri, 12 Nov 2021 13:33:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03A0860E98 for ; Fri, 12 Nov 2021 13:33:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 03A0860E98 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3F6589020; Fri, 12 Nov 2021 13:33:03 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id B08D089EA9 for ; Fri, 12 Nov 2021 13:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636723978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AaO3QXEQbXfVqe2t/6/9SpNrbCP6PsY29GvZKutU2UA=; b=B/3wHHBXHAbiPWFaj34Zx/2KdsdWLDneuNKhD+upUnVQ6IquN+qz+oBr9yC72DDNa6WR6R TxbWhLr0baKMvCgjAW5eo4qM7rP+b8CUO4xf+qRqMCel6/iyn2wZI81R7gwhkjvbBrjyRI lklK1hafCidd/cq4hfYqCyiiQhJfNFU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-337-eHv9QZWMN2KZjpkI6k-B5Q-1; Fri, 12 Nov 2021 08:32:55 -0500 X-MC-Unique: eHv9QZWMN2KZjpkI6k-B5Q-1 Received: by mail-wm1-f70.google.com with SMTP id z126-20020a1c7e84000000b003335e5dc26bso3012771wmc.8 for ; Fri, 12 Nov 2021 05:32:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AaO3QXEQbXfVqe2t/6/9SpNrbCP6PsY29GvZKutU2UA=; b=HQ/dRLAkBV330ejq/ZLkhJhWrmYmSXSJn09KHPpi7EIenrefW1od4Udg+rK3F7ZRiK QGqeSPrXRPl+Mv7ISiM1yXpZVFhoIO+t6Jopz57uYuJ1mslDQde5wCDzj9aEH9HbX4+w 8wZfdBklSyqR704m8Rf7Jcoawo9w9Wxg/xdy6h0L6K5qwRWAaApaoa50Smat0cUFbCPU meKC4KbKgepC7HeON4w0oXocSxdDC9XonVF9k6DZTsXuJFddO7koe6bVaW7y97UbVncy +eeVbcC5oA3YOYIP1LIkyPtlN0ZMtOd9XYK8BgnGgf4+xsE32V730B8IDfZlUqBtAD6t R8AA== X-Gm-Message-State: AOAM530BL3hDJWhkJ+PJAkocNNbh3oEcDGtQsYwripK2CmfEkJdTJUsi I2MsUqpVk+eTqy1YQp4P3AEbOHoKCWLd1TXiyBS3VAK/H++QxHyzD4VtqRf55kNtkoJqpqD41DE brlKb5FRRRg5dd4BWMf8defD/feCT X-Received: by 2002:adf:ce8b:: with SMTP id r11mr18856986wrn.294.1636723974602; Fri, 12 Nov 2021 05:32:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFhz4WOPQz4XIIQurMGjApmL4pEhOMydaNTrPkUDoEb55215QS7i1Xxt0f2vAEHuNr9oDRQA== X-Received: by 2002:adf:ce8b:: with SMTP id r11mr18856946wrn.294.1636723974379; Fri, 12 Nov 2021 05:32:54 -0800 (PST) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id z12sm5733470wrv.78.2021.11.12.05.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 05:32:54 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v5 6/6] drm: Make the nomodeset message less sensational Date: Fri, 12 Nov 2021 14:32:30 +0100 Message-Id: <20211112133230.1595307-7-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211112133230.1595307-1-javierm@redhat.com> References: <20211112133230.1595307-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Jani Nikula , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Peter Robinson , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The message printed when nomodeset is present in the kernel command line makes it look as if the parameter must never be used and it's a bad idea. But there are valid reasons to use this parameter and the message should not imply otherwise. Change the text to be more accurate and restrained. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Acked-by: Pekka Paalanen --- (no changes since v4) Changes in v4: - Don't mention DRM drivers in the kernel message and instead explain that only the system framebuffer will be available. drivers/gpu/drm/drm_nomodeset.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git drivers/gpu/drm/drm_nomodeset.c drivers/gpu/drm/drm_nomodeset.c index 287edfb18b5d..f3978d5bd3a1 100644 --- drivers/gpu/drm/drm_nomodeset.c +++ drivers/gpu/drm/drm_nomodeset.c @@ -15,9 +15,7 @@ static int __init disable_modeset(char *str) { drm_nomodeset = true; - pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n"); - pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n"); - pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n"); + pr_warn("Booted with the nomodeset parameter. Only the system framebuffer will be available\n"); return 1; }