From patchwork Wed Jul 10 02:16:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Basehore X-Patchwork-Id: 11038269 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 3D90C13B1 for ; Wed, 10 Jul 2019 07:26:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2983A288DB for ; Wed, 10 Jul 2019 07:26:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D903288EA; Wed, 10 Jul 2019 07:26:39 +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 DC4D1288DB for ; Wed, 10 Jul 2019 07:26:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC20A89D84; Wed, 10 Jul 2019 07:26:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1243C899A5 for ; Wed, 10 Jul 2019 02:17:09 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id az7so377001plb.5 for ; Tue, 09 Jul 2019 19:17:09 -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=bjkDizQzax2Evtj4R+Rq7drcETIvNSzi0PJ77g0to4T6qWwFkvGbnuCf/WH3k+PfW9 CjCsv1MowoW3dnoh865iXXztPo7cqw0VQADkywd1Bhv3B1WbANiOKR3eEHLy9KVK4+Pe KJ22sQMFURMNDGYIPa6khwZV1fqAGT8InQXIKKy8NRPisC43BKQfH9WI+URsJXV7AGK5 vnRy6lYtiNIPtTgYPwgya5RQzjVgJNP/ufwv3NfZZ17OaPbh4tMvZs8w4Z0fm0WEjzCC e/GFQWXd76+P5czTs9mrdyLYLyQD8JXJTwpXZTJI0J5pByAQzmS93LkenrcT7ng3wfZS xQQg== X-Gm-Message-State: APjAAAXmway4xIr1uCz3pkZpnrqX4mCA+2M9b4uHWyfZUsAH+VDV/cjR nAdU9O5S01X+dUM2qgUm9LOavg== X-Google-Smtp-Source: APXvYqyqOasWPK4ZpeQARWIZEdPGz1HraSAZfsyOpQz9qUNv7Z9acXIyi2h1oPo/iq/+u18NZCadrQ== X-Received: by 2002:a17:902:100a:: with SMTP id b10mr35190007pla.338.1562725028674; Tue, 09 Jul 2019 19:17:08 -0700 (PDT) Received: from exogeni.mtv.corp.google.com ([2620:15c:202:1:5be8:f2a6:fd7b:7459]) by smtp.gmail.com with ESMTPSA id f17sm326296pgv.16.2019.07.09.19.17.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 19:17:08 -0700 (PDT) From: Derek Basehore To: linux-kernel@vger.kernel.org Subject: [PATCH v7 4/4] drm/mtk: add panel orientation property Date: Tue, 9 Jul 2019 19:16:59 -0700 Message-Id: <20190710021659.177950-5-dbasehore@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog In-Reply-To: <20190710021659.177950-1-dbasehore@chromium.org> References: <20190710021659.177950-1-dbasehore@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 10 Jul 2019 07:25:19 +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=cOH8q2NXyovDSMUi7Xd+oHt9KadYcDoTUvRMkD/0Uf41BGCgaVcf7ZDlhSjXFXm6Lu ESTtRPTKtFghn8CC6QIqS7fRiHEAAJ+mCfoZNe3O8zcvXAT3weo6V4fimDAF1Z3n145Z 2ghQAYXOmiz9HHA0Iybxqrs5iV+2A4uq9ZIHE= 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 Reviewed-by: CK Hu --- 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;