From patchwork Thu Jun 24 10:55:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12341807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E6EC49EA5 for ; Thu, 24 Jun 2021 10:57:14 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B5926613DA for ; Thu, 24 Jun 2021 10:57:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5926613DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=rCg0Vunz05s1iWK5bfxtXtY4R8ihVLIK0eH+wmlg8fU=; b=uzsw1ciLh7RZR5 fgPAzEbzFNWM1TnInl74mELvkJXbuEeO132MI9Qx1lFGfJTTKTu4tKZy55rLLVpqNiig8fs8s7dCw DbQFL5yZWBunME0NV9foLIWjeGAFkU5DzNMNNtsHTJh5veo9Z/gGF9LI0riyvLC+JVEhEWq7gC5yy wrlkLWoAYUeUCZRei4/A6R+XsTxo4h1UYuwPzhwwfMWpRkkK8vDwEqY1FeHkRVpb4UZGQ5P/M/k1S 0O3DVnGgfFU/xndT5pc6VrUamXKOgMtUHlGvfpPw7ZB9HXDCGpuAYpft9ngdtAxiLT77M6Tm2TkXb GlygBOPY5f5kvXs2jZIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwN1M-00EGAy-IS; Thu, 24 Jun 2021 10:55:44 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwN16-00EG4G-8n for linux-arm-kernel@lists.infradead.org; Thu, 24 Jun 2021 10:55:29 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d1so2112849plg.6 for ; Thu, 24 Jun 2021 03:55:27 -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=ovqPGUQPtbi9LNkbTpa5Y8dCy9rTdlKhQzy2ogksdJE=; b=LZguRud9skgmE05y7DdRbbHenMIcXxUkQGAfGtYIuObeQwsrZBdlKras4snIntfFGW UMvilXQaSeu16CBluo5pYm314hKeCeddvQxIFODOQk97WxdR4bJYCnYbc/xbC6619FV5 5jsAp3Wx33VRGJQ/6MIWYVtEOf/O8w+Ubdx9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ovqPGUQPtbi9LNkbTpa5Y8dCy9rTdlKhQzy2ogksdJE=; b=Zjpxufwofj3fDFHSJAono0AAXvNNWExg2vcMHaUzwlpmoeaLz8IKuY/cXS4hZtbjTp xawK6OVG8pMe0h5XSnXKNmGcLl9gvmrKSArHdMbFtZ2WSzFSonX6BcfjyPjPSqphdoKA AAF/Go7I2OhU9Iy2LUR7Y3S29NZ5Uzgt1aBdrk0mxvzaW69jvawCpVTa/q3mCc3mJnD8 sERNfrOHKXvlrzNAJwZuaibuocc7OhqTPnf0Pewq56cg871GWg8srDws1IDRdMHS4rS8 I56GinSl1FXzKT/neWMosK759FC29Qsl5za2NMQiMHizRoovCbw8mmgubbxPiItsU4SB BdFA== X-Gm-Message-State: AOAM530TrtidZC3lShL0pZm72b9ud/ZR67Zuo1a09i0ZDgzrsg2muTQA Na/MZmh8pgSGwN0U1Qckxo/roQ== X-Google-Smtp-Source: ABdhPJw1VAb8x6usa6X7gmyM/UenV/k+g8Gc96ZuEqGo8DCN70yTuL0TZ9yHRL+gn1ALSzPY8Iuylw== X-Received: by 2002:a17:90a:66ca:: with SMTP id z10mr4765432pjl.78.1624532127367; Thu, 24 Jun 2021 03:55:27 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:368f:686c:969:1f38]) by smtp.gmail.com with ESMTPSA id t7sm2212536pgh.52.2021.06.24.03.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 03:55:27 -0700 (PDT) From: Hsin-Yi Wang To: dri-devel@lists.freedesktop.org, Chun-Kuang Hu , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org Cc: 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 Subject: [PATCH v6 RESEND 2/3] drm/mediatek: init panel orientation property Date: Thu, 24 Jun 2021 18:55:16 +0800 Message-Id: <20210624105517.3886963-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210624105517.3886963-1-hsinyi@chromium.org> References: <20210624105517.3886963-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_035528_365767_4F9B8303 X-CRM114-Status: GOOD ( 12.41 ) 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 Tested-by: Enric Balletbo i Serra --- 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 ae403c67cbd92..9da1fd6491319 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -964,6 +964,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;