From patchwork Wed Jul 3 23:02:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Basehore X-Patchwork-Id: 11031085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5B9D1510 for ; Thu, 4 Jul 2019 07:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0B26287B4 for ; Thu, 4 Jul 2019 07:25:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B155728676; Thu, 4 Jul 2019 07:25:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5CA1D287B4 for ; Thu, 4 Jul 2019 07:25:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D78786E2A3; Thu, 4 Jul 2019 07:25:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F9E06E21A for ; Wed, 3 Jul 2019 23:02:20 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id r7so1979927pfl.3 for ; Wed, 03 Jul 2019 16:02:20 -0700 (PDT) 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=vxC6cpJeD3A10tWWsNE37FjIALjzLREnlwwa6KDygFo=; b=dFLRsLEGT9lV8sajBuGdG58SsCSPsFMTV6OUNzfbtYbmkvOwvaxyVpWXsO/E7acQfn k794I/+qOZLeZKUjhX0BOQSY2MANMGyYCUZb5bf0xOmdXGEC9DQFYsSKmypmXYJD8vve ek8alhPDHFqBueDOgGMrLxLZ75ofZb0R2cUe8JdPRpL/RYqZEQG+V374cFDfdmhUrEcn GhH9ombQt1j2z4EOAkrr9E1BSF7xVMhWfp/5FNwQ+vhUUPqN+PlGi0vF7TdX2gz5OJzy a68bAQbwMtWIXVRr8ojWwwWk9qLJsPKUpDTe566dnqNQ7ngZspg4yyZqw3wsnXrbHqKm w1Gg== X-Gm-Message-State: APjAAAX2U1NHeZajYDDDzgTeisX5bUE1xE5w4iFWWi3dYUdBFiK7waLp oCJE31uy71h8DdIqltQWemPMHA== X-Google-Smtp-Source: APXvYqyG7F1sqItbURwJvHhS/2DarvFHk2VbgTA5dTpR7guaFyZ6mbPUxyay/cbBh1DPeX4KcfiwJA== X-Received: by 2002:a17:90a:cf8f:: with SMTP id i15mr14955387pju.110.1562194939953; Wed, 03 Jul 2019 16:02:19 -0700 (PDT) Received: from exogeni.mtv.corp.google.com ([2620:15c:202:1:5be8:f2a6:fd7b:7459]) by smtp.gmail.com with ESMTPSA id t8sm4245171pfq.31.2019.07.03.16.02.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 16:02:19 -0700 (PDT) From: Derek Basehore To: linux-kernel@vger.kernel.org Subject: [PATCH v5 4/4] drm/mtk: add panel orientation property Date: Wed, 3 Jul 2019 16:02:10 -0700 Message-Id: <20190703230210.85342-5-dbasehore@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog In-Reply-To: <20190703230210.85342-1-dbasehore@chromium.org> References: <20190703230210.85342-1-dbasehore@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 04 Jul 2019 07:25:13 +0000 X-Mailman-Original-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=vxC6cpJeD3A10tWWsNE37FjIALjzLREnlwwa6KDygFo=; b=KoFbuYFaOMgz+CA9HtkLNTvAr+pabLlsPrLFWh8/CDrvglaCWGGLw4Pnxd6skHFk9D q3Vow7aYTiXXFCeiDRL8qO677+a7piMs8y1uZhje39FRkVgbfJ0BDZ+RweMNQAxf5gWi dXTZ2iVaBDwYMJGt3iTUEcM1C9Zfdf2BI1S3A= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Derek Basehore , Maxime Ripard , Sam Ravnborg , intel-gfx@lists.freedesktop.org, David Airlie , Thierry Reding , Matthias Brugger , dri-devel@lists.freedesktop.org, Rodrigo Vivi , linux-mediatek@lists.infradead.org, Sean Paul , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This inits the panel orientation property for the mediatek dsi driver if the panel orientation (connector.display_info.panel_orientation) is not DRM_MODE_PANEL_ORIENTATION_UNKNOWN. Signed-off-by: Derek Basehore --- drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index b91c4616644a..2920458ae2fb 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -790,10 +790,18 @@ static int mtk_dsi_create_connector(struct drm_device *drm, struct mtk_dsi *dsi) DRM_ERROR("Failed to attach panel to drm\n"); goto err_connector_cleanup; } + + ret = drm_connector_init_panel_orientation_property(&dsi->conn); + if (ret) { + DRM_ERROR("Failed to init panel orientation\n"); + goto err_panel_detach; + } } return 0; +err_panel_detach: + drm_panel_detach(dsi->panel); err_connector_cleanup: drm_connector_cleanup(&dsi->conn); return ret;