Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3241052ybd; Fri, 28 Jun 2019 05:22:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjdtpIWYw6H2ua4APbH+G+D1nax6Ty1Svnpr7gj3hKqSTMznSOZYS2FdiOj7Y/qsI+p5fO X-Received: by 2002:a63:3d09:: with SMTP id k9mr8897175pga.321.1561724541820; Fri, 28 Jun 2019 05:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561724541; cv=none; d=google.com; s=arc-20160816; b=YgOomnwpq09a0WIkN9TNvNpFsRNEm6y6Vr+QfXENqN5EYb3+5yud4bVX61HRP9M7jw SoryZQxr36inKPnLnuUaJ4tXJQv/V9ObgUPwNRoZ+wt5yg6GmXyaoQ5WThmGXExtouTY xX3Lo0EcqVaaaswt7euNOzk35/aWNB1RAX7Tw3mihTPyzNdrKfHvFA+KGavnMIWMDA4j 2sC1n3b6+O5RUFrN/Q6HTE/2Vv3bGLfrHXKKD/hjJsYR715KDVfHNC3K9eicCKOmU9VO Uyfoi3GZJeSOawrCp6RmyyLNPL6uRvTezOaTVNSmEo3Yxob9g99knitIBZQFPpX+wexL wi0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oOwOSCxbZh/8uQiBXY+7QLjNRJOPdEk2ewzEqFQcDtU=; b=tvlZy3dwqzsOxu3joN8Z02k9OfRSAjtVT6qbAOtxbZPctpaXZOoFd33kfcBToi/f6l j4uck8QrGMnM9ZQKeOba7U+vrLw7jciTGiz4zVHLDfKi9BJqdF7GuDh979KP+0MSO5v5 ZyRzed9rIOUD/Prg2VdnIPwGdysl5sk5MkPoKqJbNalXGEe2Q5qu19QF5zI6HFvh6h3j 8vngTjiC59VjDB6RM0qk+fbLjwLbIqZeG1KUDtG8XVsEyZ1nY1kGPhx+mADTO+c7lyOl OwHgH0aSfIR5eLZX+YSrhvXmAA9/k+oQKg52MgDQoV7eQCGmERzjVudZT78BEAy7orjf yw3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p5kvvJ+r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si2009591pll.347.2019.06.28.05.22.05; Fri, 28 Jun 2019 05:22:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p5kvvJ+r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727023AbfF1MU5 (ORCPT + 99 others); Fri, 28 Jun 2019 08:20:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58798 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbfF1MUq (ORCPT ); Fri, 28 Jun 2019 08:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oOwOSCxbZh/8uQiBXY+7QLjNRJOPdEk2ewzEqFQcDtU=; b=p5kvvJ+rs+cLmQ+c0oXFGTXbL4 rmUqAfjducYKYD6conb47hi0BDJrU+kLj2HAzG0XTR8a960cy8waVhBKgVFEIgmeY+NQPRZbXIglk vA37C/K49ysh+9Gtf7WIt0BIxqDsaKK1X9ybULB1/DsuBOWhu6BHcVJG+YNY4ir4HbriROod1oEPc wwXV6eIIrG5ChE4YhULSUVZ18E4DJKeAHv71PodC5DHzuOfG9m8TGUYiNY3vDhyp76xczxyyPtpxf V2ettC5wrN8c3CTsEp86XImKdnb/KB4h7Ge0fZcXHgilw2W1hfR3M+AqxTtQMQYtAt86NibUWSYxl aouz/TlA==; Received: from [186.213.242.156] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hgprv-00009y-8k; Fri, 28 Jun 2019 12:20:43 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hgprt-00057f-Ae; Fri, 28 Jun 2019 09:20:41 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Jiri Slaby , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH 11/43] docs: console.txt: convert docs to ReST and rename to *.rst Date: Fri, 28 Jun 2019 09:20:07 -0300 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert this small file to ReST in preparation for adding it to the driver-api book. While this is not part of the driver-api book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman --- .../console/{console.txt => console.rst} | 63 ++++++++++--------- Documentation/fb/fbcon.rst | 4 +- drivers/tty/Kconfig | 2 +- 3 files changed, 38 insertions(+), 31 deletions(-) rename Documentation/console/{console.txt => console.rst} (80%) diff --git a/Documentation/console/console.txt b/Documentation/console/console.rst similarity index 80% rename from Documentation/console/console.txt rename to Documentation/console/console.rst index d73c2ab4beda..b374141b027e 100644 --- a/Documentation/console/console.txt +++ b/Documentation/console/console.rst @@ -1,3 +1,6 @@ +:orphan: + +=============== Console Drivers =============== @@ -17,25 +20,26 @@ of driver occupying the consoles.) They can only take over the console that is occupied by the system driver. In the same token, if the modular driver is released by the console, the system driver will take over. -Modular drivers, from the programmer's point of view, have to call: +Modular drivers, from the programmer's point of view, have to call:: do_take_over_console() - load and bind driver to console layer give_up_console() - unload driver; it will only work if driver is fully unbound -In newer kernels, the following are also available: +In newer kernels, the following are also available:: do_register_con_driver() do_unregister_con_driver() If sysfs is enabled, the contents of /sys/class/vtconsole can be examined. This shows the console backends currently registered by the -system which are named vtcon where is an integer from 0 to 15. Thus: +system which are named vtcon where is an integer from 0 to 15. +Thus:: ls /sys/class/vtconsole . .. vtcon0 vtcon1 -Each directory in /sys/class/vtconsole has 3 files: +Each directory in /sys/class/vtconsole has 3 files:: ls /sys/class/vtconsole/vtcon0 . .. bind name uevent @@ -46,27 +50,29 @@ What do these files signify? read, or acts to bind or unbind the driver to the virtual consoles when written to. The possible values are: - 0 - means the driver is not bound and if echo'ed, commands the driver + 0 + - means the driver is not bound and if echo'ed, commands the driver to unbind - 1 - means the driver is bound and if echo'ed, commands the driver to + 1 + - means the driver is bound and if echo'ed, commands the driver to bind - 2. name - read-only file. Shows the name of the driver in this format: + 2. name - read-only file. Shows the name of the driver in this format:: - cat /sys/class/vtconsole/vtcon0/name - (S) VGA+ + cat /sys/class/vtconsole/vtcon0/name + (S) VGA+ - '(S)' stands for a (S)ystem driver, i.e., it cannot be directly - commanded to bind or unbind + '(S)' stands for a (S)ystem driver, i.e., it cannot be directly + commanded to bind or unbind - 'VGA+' is the name of the driver + 'VGA+' is the name of the driver - cat /sys/class/vtconsole/vtcon1/name - (M) frame buffer device + cat /sys/class/vtconsole/vtcon1/name + (M) frame buffer device - In this case, '(M)' stands for a (M)odular driver, one that can be - directly commanded to bind or unbind. + In this case, '(M)' stands for a (M)odular driver, one that can be + directly commanded to bind or unbind. 3. uevent - ignore this file @@ -75,14 +81,17 @@ driver takes over the consoles vacated by the driver. Binding, on the other hand, will bind the driver to the consoles that are currently occupied by a system driver. -NOTE1: Binding and unbinding must be selected in Kconfig. It's under: +NOTE1: + Binding and unbinding must be selected in Kconfig. It's under:: -Device Drivers -> Character devices -> Support for binding and unbinding -console drivers + Device Drivers -> + Character devices -> + Support for binding and unbinding console drivers -NOTE2: If any of the virtual consoles are in KD_GRAPHICS mode, then binding or -unbinding will not succeed. An example of an application that sets the console -to KD_GRAPHICS is X. +NOTE2: + If any of the virtual consoles are in KD_GRAPHICS mode, then binding or + unbinding will not succeed. An example of an application that sets the + console to KD_GRAPHICS is X. How useful is this feature? This is very useful for console driver developers. By unbinding the driver from the console layer, one can unload the @@ -92,10 +101,10 @@ framebuffer console to VGA console and vice versa, this feature also makes this possible. (NOTE NOTE NOTE: Please read fbcon.txt under Documentation/fb for more details.) -Notes for developers: -===================== +Notes for developers +==================== -do_take_over_console() is now broken up into: +do_take_over_console() is now broken up into:: do_register_con_driver() do_bind_con_driver() - private function @@ -104,7 +113,7 @@ give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must be fully unbound for this call to succeed. con_is_bound() will check if the driver is bound or not. -Guidelines for console driver writers: +Guidelines for console driver writers ===================================== In order for binding to and unbinding from the console to properly work, @@ -140,6 +149,4 @@ The current crop of console drivers should still work correctly, but binding and unbinding them may cause problems. With minimal fixes, these drivers can be made to work correctly. -========================== Antonino Daplas - diff --git a/Documentation/fb/fbcon.rst b/Documentation/fb/fbcon.rst index 1da65b9000de..26bc5cdaabab 100644 --- a/Documentation/fb/fbcon.rst +++ b/Documentation/fb/fbcon.rst @@ -187,7 +187,7 @@ the hardware. Thus, in a VGA console:: Assuming the VGA driver can be unloaded, one must first unbind the VGA driver from the console layer before unloading the driver. The VGA driver cannot be unloaded if it is still bound to the console layer. (See -Documentation/console/console.txt for more information). +Documentation/console/console.rst for more information). This is more complicated in the case of the framebuffer console (fbcon), because fbcon is an intermediate layer between the console and the drivers:: @@ -204,7 +204,7 @@ fbcon. Thus, there is no need to explicitly unbind the fbdev drivers from fbcon. So, how do we unbind fbcon from the console? Part of the answer is in -Documentation/console/console.txt. To summarize: +Documentation/console/console.rst. To summarize: Echo a value to the bind file that represents the framebuffer console driver. So assuming vtcon1 represents fbcon, then:: diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index 0e3e4dacbc12..1cb50f19d58c 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -93,7 +93,7 @@ config VT_HW_CONSOLE_BINDING select the console driver that will serve as the backend for the virtual terminals. - See for more + See for more information. For framebuffer console users, please refer to . -- 2.21.0