From patchwork Tue Feb 8 08:42:33 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: 12738353 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 04F29C433F5 for ; Tue, 8 Feb 2022 08:44:39 +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:References:In-Reply-To: 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: List-Owner; bh=V7iuE8ules+sUBwpD/qxeVJ7axt8Wu24cHeaV2WOnIE=; b=GBlTlJfHEPbY+2 vsAy7lHvOIgiFhV7b4RXKhNzkmtcs1Id0T1gHQn3DTt+aqwsORwtU5K2bXNGzhRHuZvMlQlvj4VA8 xTBLRCZzzpE8we31orodaXC4hKGqcd9sO9ptzCsZiFfJWffIy6p2j6D/RUIbj9xE7XOZizYdR0RfD 8D449qz+eQSyYez8rLG1Rii9WlEieTyAKbzlQsRelr0lNAFE38Q8ftbfGB+bA2b3ckaYJQK4e81SS E9LWs/Mq5XglWObNqQUUydxAEFv9gnC7P750c/12Ndg4raVynspNsrT3CKnobO5+ys7yCLHRitcYH 091nj3m5UDB8xtQcgvtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHM5j-00D2OJ-M9; Tue, 08 Feb 2022 08:43:15 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHM5E-00D28p-2M for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 08:42:45 +0000 Received: by mail-pf1-x42d.google.com with SMTP id i186so17746481pfe.0 for ; Tue, 08 Feb 2022 00:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B51vztbAqanx3odcGYslN+f+8QXuSl3IGdZkOcgCEP4=; b=hSZaqn46Eg0k230j9msW8ZWdSycTD9QMSFONsAMN8N1GCF9epels6qCenWB+VLnHwi teHq4HupE7iMOHfyDa7zXdzjdrXplNx1GCcS6au9TnF+ZWtgVkOseJI3ghUEeNeJhkPZ shrywUSRRfEgTRLCyYagH0Kb0aulUHKv+f3OQ= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=B51vztbAqanx3odcGYslN+f+8QXuSl3IGdZkOcgCEP4=; b=LDCpHClomq5qSYlskMjDxLvT6Tzk/RaeqKA7hk3rOLRLrmveWonVQy6pNUMi22EDAc ezaO0B7O7xHtwTCZC6pz1gRywaZp2LeVOgYqh7iHRw3L2qKPw8jVHIlgMmZrS87SxsDM /52Bh0TdIHwEQ4wPMiWXR3X2RbD+t1rCT4N9RkOEbqvs1HHlNZQsB+bV4RppTtPjfMKS Omf8zYLTlEuI2c/ichG6GpyIdWn02rvptgnEdsT5GgpIY2aU1w/SwB+6ypNqIwnsa+Hq AaVggga4tEtWgY8qhhp5tEtLi6LBF8bQBxhn81rCZ/2ArFYP0FUI9weJCNe0ACnEWycQ n3Cg== X-Gm-Message-State: AOAM532mbEdHJ7WAZiZk5XfWufvDDfk3Ke53tzFrE012YcxP+hhdJPA7 RoLl46a/ZisdYNWtvyNfdEOT/g== X-Google-Smtp-Source: ABdhPJwHECSzf8M58olhYXNLvBSmJuhfsp/CcQrf6d4N0193YY0h7uxL1BuFys94fBnhwtRkxle5pw== X-Received: by 2002:a63:f709:: with SMTP id x9mr2665838pgh.428.1644309763116; Tue, 08 Feb 2022 00:42:43 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:7d9a:166e:9d34:ff4f]) by smtp.gmail.com with ESMTPSA id m14sm15362390pfc.170.2022.02.08.00.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 00:42:42 -0800 (PST) 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 Subject: [PATCH v8 2/3] drm/mediatek: init panel orientation property Date: Tue, 8 Feb 2022 16:42:33 +0800 Message-Id: <20220208084234.1684930-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220208084234.1684930-1-hsinyi@chromium.org> References: <20220208084234.1684930-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_004244_137990_A404C262 X-CRM114-Status: GOOD ( 12.75 ) 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 Init panel orientation property after connector is initialized. Let the panel driver decides the orientation value later. Signed-off-by: Hsin-Yi Wang Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 5d90d2eb001935..491bf5b0a2b984 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -965,6 +965,13 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi) ret = PTR_ERR(dsi->connector); goto err_cleanup_encoder; } + + ret = drm_connector_init_panel_orientation_property(dsi->connector); + if (ret) { + DRM_ERROR("Unable to init panel orientation\n"); + goto err_cleanup_encoder; + } + drm_connector_attach_encoder(dsi->connector, &dsi->encoder); return 0;