From patchwork Mon May 30 08:19:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12864400 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9A65C433F5 for ; Mon, 30 May 2022 08:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=y9a431gcOztaZWhiVFbebCx3XK6wleUuoXaoKIP6OpI=; b=Kzr4SnvsrTf6Yz cd4DyUXUw39UQPVrGuXbV9mv9e9DRl+dP4RtTvD0oWsWUiiOcCLZ2WJo1mXaIeFGdOJkXEhwMrl6E ElVjdEPO4y7ckDyKaC1BOHjXzWpevGVefqBsgCAO/L5GpJ9+wJzsf3HGa8sjgx5XcwBnbUPjMd92b UliuZQwfKDv0MNo5n2dKmD1Ogbrll7AAzTKrDieraJDgZ0LUl7Y5cmSeCoWto7MA5pulyRdSLzSG2 lN+U9QXEKXVArFQXriOAR68XdESFVRqZd0w7PnSbWjsLfqtiizD85FBMjVvmdpxPjMD4vb/7GD+HT p8ocPl0OjJB81SddEyHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvaca-005slf-MQ; Mon, 30 May 2022 08:19:28 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvacV-005siR-BR for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 08:19:25 +0000 Received: by mail-pl1-x629.google.com with SMTP id a13so9682746plh.6 for ; Mon, 30 May 2022 01:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pBLLK5jVhwbNway5d1jcnH/mwgI9yxE1r2VmUrlYtDU=; b=LLgjKgp2+ro4rOIKxUWfMFimQjfxFWRvVWoMjpqWUvgtX/IIENmwdkMHUIq88hcolf ROFZ7vAAUlY+NJsshhvUkkommU11wX7sGxpjL1CjmCeZgVV/zkVhk3p7u/ZyNujeoi9J QxRXyXc9nqN8qIybleH4/7N9FDZp9fBXbaLPk= 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:mime-version :content-transfer-encoding; bh=pBLLK5jVhwbNway5d1jcnH/mwgI9yxE1r2VmUrlYtDU=; b=SpoeGVBNVccI4zmdvWeZnZgqwRvCfw3SHEn9wi/LaESzqY/w9LlNQcNNoQueivrocK uuWaYBNI3k2t6CKdmph5HYxSJtezsjf0AyaYjpvLQyhBRTgsbZFruiJQOicU6GeEziTc f/mVS1FSMydMDdwUytm+ZuDyhb24NQV3xmHC2E8H+xz8/rWs4i3s2zA7j3cr2tGavGEE qfs1n5gTuTlGEh8cSOXrMZ/+3t+t5uAiD3xUIuHw1Cj5+bRwZxd7wX0BLtw92i00gBwZ W1ecrBmkx1gSPZNQFcELdGJ6+/q1lOFV6V8/j5RLoDT9Igv6BdFf97HBgLUBHIMtmn2W bHRA== X-Gm-Message-State: AOAM533D+y2lvZvtH0wiky5tWTG64/NfBk7ukpBMrakjK0SGvxeBRsvf 6QJYx7JN98P18Cn6cyDVmKfh/w== X-Google-Smtp-Source: ABdhPJz+H5PQ1/wn0WMWpccN62eOSMQ6CsdGl2YYPW6OhEKjBgqYnlaum+TZJlp8G3W0bq500UZXIw== X-Received: by 2002:a17:903:124a:b0:154:c860:6d52 with SMTP id u10-20020a170903124a00b00154c8606d52mr55869147plh.159.1653898761542; Mon, 30 May 2022 01:19:21 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:ae1c:3d63:abec:1097]) by smtp.gmail.com with ESMTPSA id m1-20020a170902f64100b001618b70dcc9sm8537900plg.101.2022.05.30.01.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 01:19:21 -0700 (PDT) From: Hsin-Yi Wang To: dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Rob Clark , Stephen Boyd , Douglas Anderson , Chun-Kuang Hu , Sean Paul , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org, Rob Herring , Matthias Brugger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Simon Ser , Harry Wentland , Alex Deucher , Jani Nikula , Emil Velikov , Hans de Goede Subject: [PATCH v10 0/4] Separate panel orientation property creating and value setting Date: Mon, 30 May 2022 16:19:06 +0800 Message-Id: <20220530081910.3947168-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_011923_427854_058F6563 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some drivers, eg. mtk_drm and msm_drm, rely on the panel to set the orientation. Panel calls drm_connector_set_panel_orientation() to create orientation property and sets the value. However, connector properties can't be created after drm_dev_register() is called. The goal is to separate the orientation property creation, so drm drivers can create it earlier before drm_dev_register(). After this series, drm_connector_set_panel_orientation() works like before. It won't affect existing callers of drm_connector_set_panel_orientation(). The only difference is that some drm drivers can call drm_connector_init_panel_orientation_property() earlier. Hsin-Yi Wang (4): gpu: drm: separate panel orientation property creating and value setting drm/mediatek: init panel orientation property drm/msm: init panel orientation property arm64: dts: mt8183: Add panel rotation .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 + drivers/gpu/drm/drm_connector.c | 58 ++++++++++++++----- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 ++ include/drm/drm_connector.h | 2 + 5 files changed, 59 insertions(+), 13 deletions(-)