From patchwork Fri Mar 18 07:48:21 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: 12785020 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 61EB9C433F5 for ; Fri, 18 Mar 2022 08:30:36 +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=chZV8VhJaQFoEhJSq5cNZcP/La/cvqXro5Kdo30CYeo=; b=UIqIAmYEAl9Oa8 Njt76E9uU8pszsHT2kQINcprrGh49B+K6d88c1IS4Side0sr0KUSVl7QhsRlIj/CwItvCKePNklIo hfmQFytaRFttnODb4yuhl8xuABZtgT6R2rDwbcgepJKbBMV8Tl+SEl30tfxJlzazDu/K/CWRI4DNB oFZ7SeTCFV1OSHo36DtTqppKh6hCyhH+tuyBI1nawEDUcXUpaOW4U2JheV1GxcenVP78s9vl4gC5K j1u+CjNVnsxSS5ndVSLzoUir/LrT54ZqG+Xom3nlUqqvh0wTUH8zuTaNjRq47NvqmPsnVtP3+jtSR ns4Q8nXGgNgY2OVRN8FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nV7z2-000mYc-Po; Fri, 18 Mar 2022 08:29:16 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nV7yz-000mWu-0y for linux-arm-kernel@lists.infradead.org; Fri, 18 Mar 2022 08:29:14 +0000 Received: by mail-pj1-x102b.google.com with SMTP id kx13-20020a17090b228d00b001c6715c9847so5449844pjb.1 for ; Fri, 18 Mar 2022 01:29:12 -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=ZerwMZnU5WRGenUWw/mrV6k1v4q9EhMydhshaosUPPY=; b=T2JR3/lfNpGKK7qASyH6+wW97BBOWNrh7oRmcfnmWSqfgDCBAwtyhw6+z45yNahIVS eT7DsjSjEvXTznTI7qXdOGBWQS7eFEssrIgW0IBCHbilYllZhz4kW2weUObdWIu+O4X8 KFf9ujVOZylaa3ymqWZq66ufRx7SrPJ6hbHD4= 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=ZerwMZnU5WRGenUWw/mrV6k1v4q9EhMydhshaosUPPY=; b=rzFqXgM1Nd+ALHf+jz1iynCbuWBzAExNJ7hvqnf5BvreH0W9Ft6D+vp1Yb3NTIY2FA Bqd/vn6g4CrcO5zuP5Td/TE08nHzs8WY57QXBtRCkFHat+6lgLBbYFkP74OF6Oo5MgAZ Cokz1JbfqSn9wDjGskc8Iy9Fw7jWGkXNLplP458v1GwzysW4A93YWaoVfYy9BbA1boSU UTfSJZTnf3LeQroW1M6twDQ4yUatv1E3W/FApACOpMnqEtPFKOisF1O+soifmNIzVlwa +6KL8vSl3VTE6JkzF8FKIe1pYpZ3+iBIxd4WYn6tiXdjaQ93A4QSB7rXkQrsYsiv93na Fs1A== X-Gm-Message-State: AOAM53320tY9zG0+6Ccob0/egGubeGXjDMTkVnz2YPIIaY12FnYnQ5je gXh+Mk1kbM694VilrezJYZKNWQ== X-Google-Smtp-Source: ABdhPJxSlFaBTNqCJx14g1bDgmJ+YaO+Pg4LlRrGaMoIJ9J2tXiqSbojTVGwkQAUer85nUyOr+wzKQ== X-Received: by 2002:a17:90a:ba10:b0:1bf:6900:2c5d with SMTP id s16-20020a17090aba1000b001bf69002c5dmr20601000pjr.36.1647592151148; Fri, 18 Mar 2022 01:29:11 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:435a:ce78:7223:1e88]) by smtp.gmail.com with ESMTPSA id q2-20020a056a00084200b004f761a7287dsm9404044pfk.131.2022.03.18.01.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 01:29:10 -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: 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 v9 0/4] Separate panel orientation property creating and value setting Date: Fri, 18 Mar 2022 15:48:21 +0800 Message-Id: <20220318074825.3359978-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.35.1.894.gb6a874cedc-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220318_012913_121130_527705B7 X-CRM114-Status: GOOD ( 11.76 ) 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, so it won't affect other drm drivers. 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(-)