From patchwork Wed Jun 8 09:48:10 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: 12873112 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 DF547C433EF for ; Wed, 8 Jun 2022 09:49:54 +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=mKmqtc2KSelynTmTlt+U0G0vzLWB+G2RYqDoup3NhBY=; b=dyy3oOdgnlT2HC T/4qKzlq1sn7JNA8BjWU9BCcoJdEssLcj2YxJmHflyYDSMs7OL8BIeMZj16XPM7gHNWhiYO1FjM3O fZOXJmdzAX/Mmg1LGU0rrprTZJI5ooPAIRoad5hZyLXFCqnPnFjgKhGxNCvkxeD7c0D+zzhMFglDS t0z1XiupgyTMLm7fdLz/eYPmg4yah7GRcwDfSLvAP9gEvN0Ik6WlR3SewIJN5K8jQYFEenf3Cq3vD hlHqJqLNuNov8dqpaJRCgjp8yl8pQYDv+MN5idmbz9tiSgTDZS1Knm5Fvyam8b8eoyZmEbVA5CrwH QMQl/xIwSyp0A8GtZmzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIy-00CTCp-8B; Wed, 08 Jun 2022 09:48:48 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIh-00CT5r-LD for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 09:48:33 +0000 Received: by mail-pg1-x52e.google.com with SMTP id g186so9528940pgc.1 for ; Wed, 08 Jun 2022 02:48:29 -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=W5IKfgYz5xf2GI+6lvPe+62g09BBcgumm5yF5o1+Nx4=; b=FQ7vGEL7CIyuMkUWz69rqKrfbSKqncuXS8hn3qh8zQiCYfyqiMehg/B+6gdS5GARXc ui9CaQ7f77yeRz7RY/Zsh7ogBiuv7UkxPXGf8AbJYk/iYQ6T/2ylrotouKqEowLpbmeo JdnYEyK/8LRszk3diG3Wrg1lqdPFcK30T8wZ8= 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=W5IKfgYz5xf2GI+6lvPe+62g09BBcgumm5yF5o1+Nx4=; b=7d8RowwgRNGZsBU7NtkzeC2kpRvWVOdzhvJj67Gtmx646AUcFTbP/YMIwcOgYIDTB/ yt36/46zMKpdw1SWq6F5fG/zcDS8NIth6l/vaTVBkiQ8LK3/vC2lsn/gfwtT+xjLLM1C K057fIXfzTN0T4wkv+lpIY4G+pLRh3AtuinCFbbyKhvK6U9mO5ye8sgdnTqYnTDe0wFZ xf3U1IH3Es2ppHPyPyJ7cP+KtNIWhxlvxVk+FYbzPa3CKbGVA7GP54Q855lJNnAQdXgc IDuHpKXFzpXoQmUF9ezx3TfRecBSiFlJ2jbWUY4iyEXBk7gDBIJFGUGS1aQUppNtdnzK SrEQ== X-Gm-Message-State: AOAM530orzCjpKkWhe8Ej3sUQ8n6hAgFxCzJNxfBhmkXdZp7YfMlQRAR EZR4TqyWldlNDihwSytzs0zyqA== X-Google-Smtp-Source: ABdhPJwY10X54qkCemGXIJKUyFcIOP4JABpqefy/KV0RlOOHwUX0S+RhW7c3RXQRcQoGKn5AVKPZbw== X-Received: by 2002:aa7:85d1:0:b0:51b:f4b5:db7b with SMTP id z17-20020aa785d1000000b0051bf4b5db7bmr21661005pfn.41.1654681708744; Wed, 08 Jun 2022 02:48:28 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:c46b:e7b1:f6c8:5eb8]) by smtp.gmail.com with ESMTPSA id t10-20020a17090a950a00b001e28e80a8d6sm13584038pjo.38.2022.06.08.02.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:48:28 -0700 (PDT) From: Hsin-Yi Wang To: Hans de Goede , Sam Ravnborg , Stephen Boyd , Douglas Anderson Cc: Thierry Reding , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Clark , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/8] drm/panel: boe-tv101wum-nl6: Implement .get_orientation callback Date: Wed, 8 Jun 2022 17:48:10 +0800 Message-Id: <20220608094816.2898692-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220608094816.2898692-1-hsinyi@chromium.org> References: <20220608094816.2898692-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_024831_789006_EF4132E2 X-CRM114-Status: GOOD ( 12.05 ) 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 To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 1be150ac758f..07f722f33fc5 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -1511,16 +1511,28 @@ static int boe_panel_get_modes(struct drm_panel *panel, connector->display_info.width_mm = boe->desc->size.width_mm; connector->display_info.height_mm = boe->desc->size.height_mm; connector->display_info.bpc = boe->desc->bpc; + /* + * TODO: Remove once all drm drivers call + * drm_connector_set_orientation_from_panel() + */ drm_connector_set_panel_orientation(connector, boe->orientation); return 1; } +static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *panel) +{ + struct boe_panel *boe = to_boe_panel(panel); + + return boe->orientation; +} + static const struct drm_panel_funcs boe_panel_funcs = { .unprepare = boe_panel_unprepare, .prepare = boe_panel_prepare, .enable = boe_panel_enable, .get_modes = boe_panel_get_modes, + .get_orientation = boe_panel_get_orientation, }; static int boe_panel_add(struct boe_panel *boe)