From patchwork Mon May 30 08:19:08 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: 12864402 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 B1A96C433EF for ; Mon, 30 May 2022 08:21:10 +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=mrMk/i/6SQ2OPnCqKo2v3HfK6Fnceuai56nSI6fHci8=; b=MixyDgg9hlH1al OpggJbRky8ZOeE+As1FKuVMY8A0tQ61SMdFCk2sFSMmUSPbp6nR6Fnkw/Em1CBF8pYohYXd9UnaJ9 YH8ulzeWxs4xOGRMm2n5y7aBqNDYB45ZWCVAVW7CifQcRNoiEZlwtO0sQqkDlxJA/MAxfCQ1g3qXG GuJbqjzmGg2ME9GeOiaUgszeRVSyQAU5MUKIBZx6fLhRiPX311VYx43h7EhR0pxp5YoJbJYNliWxS A9mVQ7vWNH1itOqzqx/yLLWzqZs9di2k69gu8jPfM9OOCosIrg3Be52/x7/aF3Tjrb+Kyiah18L57 rleiLKYBeTEsLP93DLow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvacy-005syv-60; Mon, 30 May 2022 08:19:52 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvacc-005smC-33 for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 08:19:31 +0000 Received: by mail-pg1-x52d.google.com with SMTP id e66so9510762pgc.8 for ; Mon, 30 May 2022 01:19:30 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=aXGQfQ7lsNUfjhcCcz/m8HUah1p/vDnEfDkpaJXX40Q=; b=j7HdUtSWpyZjY31tsETWgaBomYbcUL4NPjLRCEhLhcJhNgIJMPG4h8aVerkAWtdhJA 6xH+tfkb3bQV9uMkXvjv7squthw5m7QHVK9FPoxGwWesDXlxRpcFVzLVr8fh8Qp0i1Oy Cqr4umRydtfoIGytttZl5eX60xAiPR+cvlQfE= 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=aXGQfQ7lsNUfjhcCcz/m8HUah1p/vDnEfDkpaJXX40Q=; b=jTRTVphtL3wV2UwycwhDM2nVE3HWx/6UFMqdUsdy9AypLB4B8eRUuEhCG1nw/KLoqp Jkm5kI0x+hscc2sRSi8u1IfsYMcCOz1tOoIFUyau96qQT5xPCsxzFPlhk4JGKrBGXru8 je3b6njaW1cwazoAG6Rl9dAmqU8+d8pYq2hM/5I7OxZAtuj/Mtp/g16pgjkwGgNir3VH DFFvIK1fRFVjW45a8S32EaMBFJbwXlEfcfU3eZhBs12+1xif+kF3tnsR5BnhYhxU+rCN UnqybIPKfAwCBiP2QCycdBL3ayo9TM1nLzbLDCKcoZb1WSxzreJ7hJa3Cw/jxJ/ACxua WYbA== X-Gm-Message-State: AOAM5325zlKWt+RUWXEFpN7/39F7u9zvhth9AQuXuRzK2AxTH0TFs9HV Djogo11uXRUWFTo+E8EQKJTvyA== X-Google-Smtp-Source: ABdhPJznWw2scunjHm2cr/VTVq8k2dY3+xmqHFPQlQtp4K4hBNUYcOpZOCvf/PBzDXdbEYlNMCt0bA== X-Received: by 2002:a63:2107:0:b0:3fb:ac79:50ed with SMTP id h7-20020a632107000000b003fbac7950edmr12877684pgh.105.1653898769559; Mon, 30 May 2022 01:19:29 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 01:19:29 -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 2/4] drm/mediatek: init panel orientation property Date: Mon, 30 May 2022 16:19:08 +0800 Message-Id: <20220530081910.3947168-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog In-Reply-To: <20220530081910.3947168-1-hsinyi@chromium.org> References: <20220530081910.3947168-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_011930_166770_E7953B5B X-CRM114-Status: GOOD ( 13.00 ) 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 d9f10a33e6fa..3db44d9b161a 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -822,6 +822,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;