From patchwork Fri Jun 14 12:13:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10995195 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 C32661395 for ; Fri, 14 Jun 2019 12:16:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B41EF286A7 for ; Fri, 14 Jun 2019 12:16:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7E36286A1; Fri, 14 Jun 2019 12:16:03 +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 45BB4286A0 for ; Fri, 14 Jun 2019 12:16:03 +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=UC82AXcoKh60EUGcDbWEDqaNOTNOnAlQVPd6CZE2b6A=; b=IEqGF5wEw6p6re Z6xS6sUzRBnC6HEU7hWOmjdzwe5CUg/zrAvvQWKrfAkKw5umOdrxdK9uDd+yLWF6TIobOh0TC7ovo OXZn3GgzmmB3vhiUZTt8M26gxnb+ESMp8Rw17ZrjLwOViLpGEBZ94quN7iFyVdZbGdWEugGeSEBVF ku/+DXiw8SNmWmCXyzxnnsDvW9fYcRzL/YtqgQUZNnGnZ833exU6i5+8JrPY+7wDW4xlocLPzAIfa ZEGompYjU8n0k72HuohbjZU0H80e4ZGqIjx0FRBW73Kkolf3hSa1dtMM/exJRm+sRqsFor5FZBp2U 3MdOyCN3WLYmtwZhK44g==; 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 1hbl7d-0007Mm-S2; Fri, 14 Jun 2019 12:15:57 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbl5K-0004CU-6O for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 12:13:38 +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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 153E340004; Fri, 14 Jun 2019 12:13:21 +0000 (UTC) From: Maxime Ripard To: Maarten Lankhorst , Sean Paul , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH v4 00/12] drm/vc4: Allow for more boot-time configuration Date: Fri, 14 Jun 2019 14:13:07 +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-20190614_051335_111366_BD319447 X-CRM114-Status: GOOD ( 15.30 ) 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 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/atomic: Add a function to reset connector TV properties drm/modes: Parse overscan properties drm/selftests: Add command line parser selftests drm/vc4: hdmi: Set default state margin at reset drivers/gpu/drm/drm_atomic_state_helper.c | 18 +- drivers/gpu/drm/drm_client_modeset.c | 44 +- drivers/gpu/drm/drm_connector.c | 3 +- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_modes.c | 469 +++++-- 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 | 148 +- 12 files changed, 1529 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: 1123a3310ed6ad290be0fa4f2e995a7d68e108e2