From patchwork Tue Feb 8 07:37:13 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: 12738271 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 F1F34C433F5 for ; Tue, 8 Feb 2022 07:38:46 +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=CteaquSIsW0B/t VF/qID8M7oOvrDoRL2Aysh/06FtzSlSQ12OBOWKQkUwvSKdQqQhDOcA/208pUNomUfdps1XFP9wcC ydMUHWr1uVyuEt2dWMrSBHKQOoNZfjwt+Ud1FLH292LGFZ9EbirU10vQjQfusj25ETkdnP+wr6kY7 0H32nIo66RG4uz8CQAbfm326coXXo4IxWnDY96xxAvlbewfjAjEhkkR6rBoYkGcrwT7OmB/jZVbE3 u0hP/VXKVFfrQsU7tJL5sF4N44399njT0qnLrCuVWxe2cZ+D4Vc7U6c7WDKj1NUkjm734dCk4ZHq7 ktZ7qHiAvKyuiWHBDHoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHL4F-00Cn49-IN; Tue, 08 Feb 2022 07:37:39 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHL40-00CmwB-2z for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 07:37:25 +0000 Received: by mail-pj1-x1033.google.com with SMTP id a11-20020a17090a740b00b001b8b506c42fso1434571pjg.0 for ; Mon, 07 Feb 2022 23:37:23 -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=B11JIsqRugzE1lPzLbVrLBxQRW5fnSgxLSLKgwr1IROc+g9ZzYhWrC1z2DTdGwYxxc zTZC5C6/ehGlzMo1J6qtuwveXNMaFeY7njbnbEiu43w4jwaanMcHAXwYob4oTe4haPpH OSqw2rNF9vvlgVMfdSEmvclOIi10EZASOCcpU= 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=7ayL7in1Pqm6j+a0m1kHiDC4dQnBZlNIvXdphHkay+R5fYnW4Dob7OgB00tFKfLvge 2Xr8TzvV/oE31D8aJTnFcxTl5sYwRrdVHr7V4SDKyv4ePaJjQ9iQnRHSv50kvg46b1Jq dJP3r1s6oDq/4O194YLEMflKgvx1oDvKefhg2S9am/2nVLwfLlXwydZtrkeIZ9IAAtl/ FFbGsaKi8Twr1dLFd2zbNWmAC/irVLfYYv1MzZYJjPjnsy2XH7K0okGUvypNipe33Mmf MV8Q8WZmWmBuXyg022FNZaxO2eVKJxl8jvWtagWqHbm/KbHkleHz0bjNTDD4bhT/9mwZ MSNw== X-Gm-Message-State: AOAM5309KphRtu+v/0y+6tLxc9VET9QYIbVSsyCH0Nyba6MJddS9Hgp1 gJDyC7sLuJRodfKp31j9NwFqcw== X-Google-Smtp-Source: ABdhPJxwrTpJBtY7yw1Sd0APOFBVLEGy3Kepc+/jvxRR/t7rzd5FBc9Yf4VRdbT05jYEsKVObL+Oiw== X-Received: by 2002:a17:902:7609:: with SMTP id k9mr2997567pll.143.1644305843446; Mon, 07 Feb 2022 23:37:23 -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 ip5sm1677243pjb.13.2022.02.07.23.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 23:37:23 -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 v7 2/3] drm/mediatek: init panel orientation property Date: Tue, 8 Feb 2022 15:37:13 +0800 Message-Id: <20220208073714.1540390-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220208073714.1540390-1-hsinyi@chromium.org> References: <20220208073714.1540390-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_233724_148127_6133C61E X-CRM114-Status: GOOD ( 12.57 ) 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;