From mboxrd@z Thu Jan 1 00:00:00 1970 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=-18.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 45E46C49EA5 for ; Thu, 24 Jun 2021 18:36:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ACF4613C2 for ; Thu, 24 Jun 2021 18:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232615AbhFXSjG (ORCPT ); Thu, 24 Jun 2021 14:39:06 -0400 Received: from gloria.sntech.de ([185.11.138.130]:36710 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhFXSjE (ORCPT ); Thu, 24 Jun 2021 14:39:04 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwUDS-0000zY-Nu; Thu, 24 Jun 2021 20:36:42 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Ezequiel Garcia Cc: Hans Verkuil , Philipp Zabel , Alex Bee , maccraft123mc@gmail.com, Chris Healy , Paul Kocialkowski , Jernej Skrabec , Jonas Karlman , Thierry Reding , Sam Ravnborg , David Airlie , Ezequiel Garcia , kernel@collabora.com Subject: Re: [PATCH 01/12] drm/panel: kd35t133: Add panel orientation support Date: Thu, 24 Jun 2021 20:36:41 +0200 Message-ID: <3142080.Ii9rTq9gLj@diego> In-Reply-To: <20210624182612.177969-2-ezequiel@collabora.com> References: <20210624182612.177969-1-ezequiel@collabora.com> <20210624182612.177969-2-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Am Donnerstag, 24. Juni 2021, 20:26:01 CEST schrieb Ezequiel Garcia: > Parse the device tree rotation specifier, and set a DRM > connector orientation property. The property can then be read > by compositors to apply hardware plane rotation or a GPU transform. > > Signed-off-by: Ezequiel Garcia similar patch already applied for 5.14: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/gpu/drm/panel/panel-elida-kd35t133.c?id=610d9c311b1387f8c4ac602fee1f2a1cb0508707 > --- > drivers/gpu/drm/panel/panel-elida-kd35t133.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > index fe5ac3ef9018..5987d28c874c 100644 > --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c > +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > @@ -39,6 +39,7 @@ > struct kd35t133 { > struct device *dev; > struct drm_panel panel; > + enum drm_panel_orientation orientation; > struct gpio_desc *reset_gpio; > struct regulator *vdd; > struct regulator *iovcc; > @@ -216,6 +217,7 @@ static int kd35t133_get_modes(struct drm_panel *panel, > connector->display_info.width_mm = mode->width_mm; > connector->display_info.height_mm = mode->height_mm; > drm_mode_probed_add(connector, mode); > + drm_connector_set_panel_orientation(connector, ctx->orientation); > > return 1; > } > @@ -258,6 +260,12 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) > return ret; > } > > + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation); > + if (ret) { > + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); > + return ret; > + } > + > mipi_dsi_set_drvdata(dsi, ctx); > > ctx->dev = dev; > From mboxrd@z Thu Jan 1 00:00:00 1970 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=-18.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 31CDDC49EA6 for ; Thu, 24 Jun 2021 18:36:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4E4016128A for ; Thu, 24 Jun 2021 18:36:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E4016128A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB9886EB39; Thu, 24 Jun 2021 18:36:46 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28EA6EB39 for ; Thu, 24 Jun 2021 18:36:45 +0000 (UTC) Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwUDS-0000zY-Nu; Thu, 24 Jun 2021 20:36:42 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Ezequiel Garcia Subject: Re: [PATCH 01/12] drm/panel: kd35t133: Add panel orientation support Date: Thu, 24 Jun 2021 20:36:41 +0200 Message-ID: <3142080.Ii9rTq9gLj@diego> In-Reply-To: <20210624182612.177969-2-ezequiel@collabora.com> References: <20210624182612.177969-1-ezequiel@collabora.com> <20210624182612.177969-2-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , Jernej Skrabec , Jonas Karlman , David Airlie , Ezequiel Garcia , Alex Bee , Hans Verkuil , Thierry Reding , kernel@collabora.com, Sam Ravnborg , Chris Healy , maccraft123mc@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Am Donnerstag, 24. Juni 2021, 20:26:01 CEST schrieb Ezequiel Garcia: > Parse the device tree rotation specifier, and set a DRM > connector orientation property. The property can then be read > by compositors to apply hardware plane rotation or a GPU transform. > > Signed-off-by: Ezequiel Garcia similar patch already applied for 5.14: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/gpu/drm/panel/panel-elida-kd35t133.c?id=610d9c311b1387f8c4ac602fee1f2a1cb0508707 > --- > drivers/gpu/drm/panel/panel-elida-kd35t133.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > index fe5ac3ef9018..5987d28c874c 100644 > --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c > +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > @@ -39,6 +39,7 @@ > struct kd35t133 { > struct device *dev; > struct drm_panel panel; > + enum drm_panel_orientation orientation; > struct gpio_desc *reset_gpio; > struct regulator *vdd; > struct regulator *iovcc; > @@ -216,6 +217,7 @@ static int kd35t133_get_modes(struct drm_panel *panel, > connector->display_info.width_mm = mode->width_mm; > connector->display_info.height_mm = mode->height_mm; > drm_mode_probed_add(connector, mode); > + drm_connector_set_panel_orientation(connector, ctx->orientation); > > return 1; > } > @@ -258,6 +260,12 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) > return ret; > } > > + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation); > + if (ret) { > + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); > + return ret; > + } > + > mipi_dsi_set_drvdata(dsi, ctx); > > ctx->dev = dev; >