From patchwork Mon Jun 17 14:51:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10999391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E9546C5 for ; Mon, 17 Jun 2019 14:52:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FCF426538 for ; Mon, 17 Jun 2019 14:52:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E03428814; Mon, 17 Jun 2019 14:52:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2BC4726538 for ; Mon, 17 Jun 2019 14:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GmkSNrKW2E98WV0gYsfgJo+gaRSNaYA08jm2B+FvD+A=; b=SczZ2rQvZQfo9o Jiesah+zVYI4kt8N7Edh2gDY05RuJ8v4zCqF1txjbLByOpo5Z+x94eA6ypT9q5s+eM0wSxA7Dz+kT hc4KUZzg0E9v5/7FEHF1YHP7ZwBnG1v3OD3LarSo90Yt85EJDNYlKaoLzQ7ugpHgrK8T5gKVWpvUT n/Oz5JzfcZqmaR08BcQUpGVzKTYFpC7gQwowu+9G0f9QAXjzBLO5bVzgYKHFI6WXnKGdyqz6KOCOF egbGJG63N9zGrJK7+KHFsXdsJXVF00KuRqOhyTrvARGqPZ8a3Argfz2O4Ln9VYkbkWRh1CShPl3ta jWFnOZELT/PPH+bW7oSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hcszX-000532-Nx; Mon, 17 Jun 2019 14:52:15 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hcszG-0004rY-FW for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2019 14:52:00 +0000 X-Originating-IP: 90.88.23.150 Received: from localhost (aaubervilliers-681-1-81-150.w90-88.abo.wanadoo.fr [90.88.23.150]) (Authenticated sender: maxime.ripard@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id A290EC000D; Mon, 17 Jun 2019 14:51:43 +0000 (UTC) From: Maxime Ripard To: Maarten Lankhorst , Sean Paul , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH v5 00/12] drm/vc4: Allow for more boot-time configuration Date: Mon, 17 Jun 2019 16:51:27 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190617_075158_947712_E574CB5B X-CRM114-Status: GOOD ( 16.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eben@raspberrypi.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski , Eric Anholt , noralf@tronnes.org, Thomas Petazzoni , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, The proprietary stack for the RaspberryPi allows for a number of video parameters widely used by their users, but yet don't have any equivalents in the mainline kernel. Those options are detailed here: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md While not all of them are desirable to have in the mainline kernel, some of them still have value, such as properties to initialise the overscan or rotation parameters. This series is an attempt to support those, and is based on a rewrite of the command line parser I did a couple of years ago that never reached upstream (due to a lack of time on my side). While this parser was initially made to deal with named modes (in order to support TV modes), it also allowed to extend it more easily, which is why it's resurrected. It relies on the series "drm/fb-helper: Move modesetting code to drm_client" by Noralf Trønnes found here: https://patchwork.freedesktop.org/series/58598/ Let me know what you think, Maxime Changes from v4: - Change the name of the variable to make it clear it's about reflection and rotation. - Fix the reflection case in drm_client_rotation - Fix the documentation accordingly - Added missing modedb.rst documentation - Fix a chunk not in the proper commit - Fix a few typos - Rebased on top of current next Changes from v3: - Add documentation for drm_cmdline_mode and the new variables - Move the TV properties reset to a helper - Fix a missing X resolution or a missing Y resolution - Add more tests - Add the rotation to the orientation - Fix the reflection - Change the name of the drm_client_panel_rotation function - Rebased on top of current next Changes from v2: - Fixed some sparse warnings - Rebased on top of next and Noralf series - Moved the property initialisation to vc4 reset hook - Added documentation for the new drm_cmdline_mode - Renamed overscan to tv_margins to be consistent with the APIs Changes from v1: - Dropped the patches to deal with EDID - Added the unit test as selftest - Rebased on next Maxime Ripard (12): drm/connector: Add documentation for drm_cmdline_mode drm/client: Restrict the plane_state scope drm/client: Restrict the rotation check to the rotation itself drm/client: Change drm_client_panel_rotation name drm/modes: Rewrite the command line parser drm/modes: Support modes names on the command line drm/modes: Allow to specify rotation and reflection on the commandline drm/connector: Introduce a TV margins structure drm/modes: Parse overscan properties drm/atomic: Add a function to reset connector TV properties drm/selftests: Add command line parser selftests drm/vc4: hdmi: Set default state margin at reset Documentation/fb/modedb.rst | 13 +- drivers/gpu/drm/drm_atomic_state_helper.c | 18 +- drivers/gpu/drm/drm_client_modeset.c | 54 +- drivers/gpu/drm/drm_connector.c | 3 +- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_modes.c | 473 +++++-- drivers/gpu/drm/selftests/Makefile | 2 +- drivers/gpu/drm/selftests/drm_cmdline_selftests.h | 55 +- drivers/gpu/drm/selftests/test-drm_cmdline_parser.c | 918 +++++++++++++- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +- include/drm/drm_atomic_state_helper.h | 1 +- include/drm/drm_client.h | 2 +- include/drm/drm_connector.h | 149 +- 13 files changed, 1557 insertions(+), 141 deletions(-) create mode 100644 drivers/gpu/drm/selftests/drm_cmdline_selftests.h create mode 100644 drivers/gpu/drm/selftests/test-drm_cmdline_parser.c base-commit: a125097c841039deef9dd589b86467f7d20f4b3d