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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 E9223C433B4 for ; Sun, 2 May 2021 01:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7F1F61459 for ; Sun, 2 May 2021 01:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232021AbhEBBnt (ORCPT ); Sat, 1 May 2021 21:43:49 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:55190 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbhEBBnt (ORCPT ); Sat, 1 May 2021 21:43:49 -0400 Date: Sun, 02 May 2021 01:42:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1619919776; bh=Kl3Jo+OZEZzf10VJacbXDH3A1fF+G/d1ql1pz/OtWqI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=a29YV91YarPuYd+ZgiO2zQf9fSlWHiDHo8E62fQRNqW4dxw2rUuwV3k27xSeHIJun fzVc8h5St4JjOlfqwfIbENSdGZft1O38P3GF9j4iUd65wI8WX/m5R7CxQpp7CTxILR acqjI8EZtPl8usqMEeAjOf2ksUxdHtP7JYiAtLlM= To: caleb@connolly.tech, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Reply-To: Caleb Connolly Subject: [PATCH 2/4] drm: panel: sofef00: remove reset GPIO handling Message-ID: <20210502014146.85642-3-caleb@connolly.tech> In-Reply-To: <20210502014146.85642-1-caleb@connolly.tech> References: <20210502014146.85642-1-caleb@connolly.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Resetting the panel on fajita causes it to never come back, we aren't quite sure why this is so for now lets remove reset handling as it is effectively broken. It is also not needed on enchilada. Signed-off-by: Caleb Connolly --- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/dr= m/panel/panel-samsung-sofef00.c index 8cb1853574bb..cfc8b2a19742 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -23,7 +23,6 @@ struct sofef00_panel { =09struct drm_panel panel; =09struct mipi_dsi_device *dsi; =09struct regulator *supply; -=09struct gpio_desc *reset_gpio; =09const struct drm_display_mode *mode; =09bool prepared; }; @@ -42,16 +41,6 @@ struct sofef00_panel *to_sofef00_panel(struct drm_panel = *panel) =09=09=09return ret;=09=09=09=09=09\ =09} while (0) =20 -static void sofef00_panel_reset(struct sofef00_panel *ctx) -{ -=09gpiod_set_value_cansleep(ctx->reset_gpio, 0); -=09usleep_range(5000, 6000); -=09gpiod_set_value_cansleep(ctx->reset_gpio, 1); -=09usleep_range(2000, 3000); -=09gpiod_set_value_cansleep(ctx->reset_gpio, 0); -=09usleep_range(12000, 13000); -} - static int sofef00_panel_on(struct sofef00_panel *ctx) { =09struct mipi_dsi_device *dsi =3D ctx->dsi; @@ -132,12 +121,9 @@ static int sofef00_panel_prepare(struct drm_panel *pan= el) =09=09return ret; =09} =20 -=09sofef00_panel_reset(ctx); - =09ret =3D sofef00_panel_on(ctx); =09if (ret < 0) { =09=09dev_err(dev, "Failed to initialize panel: %d\n", ret); -=09=09gpiod_set_value_cansleep(ctx->reset_gpio, 1); =09=09return ret; =09} =20 @@ -155,8 +141,11 @@ static int sofef00_panel_unprepare(struct drm_panel *p= anel) =09=09return 0; =20 =09ret =3D sofef00_panel_off(ctx); -=09if (ret < 0) + +=09if (ret < 0) { =09=09dev_err(dev, "Failed to un-initialize panel: %d\n", ret); +=09=09return ret; +=09} =20 =09regulator_disable(ctx->supply); =20 @@ -276,13 +265,6 @@ static int sofef00_panel_probe(struct mipi_dsi_device = *dsi) =09=09return ret; =09} =20 -=09ctx->reset_gpio =3D devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); -=09if (IS_ERR(ctx->reset_gpio)) { -=09=09ret =3D PTR_ERR(ctx->reset_gpio); -=09=09dev_warn(dev, "Failed to get reset-gpios: %d\n", ret); -=09=09return ret; -=09} - =09ctx->dsi =3D dsi; =09mipi_dsi_set_drvdata(dsi, ctx); =20 --=20 2.30.2 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 07AB8C433B4 for ; Sun, 2 May 2021 01:43:07 +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 8802661450 for ; Sun, 2 May 2021 01:43:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8802661450 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=connolly.tech 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 AE84A6E049; Sun, 2 May 2021 01:43:04 +0000 (UTC) Received: from mail-41103.protonmail.ch (mail-41103.protonmail.ch [185.70.41.103]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2AFEF6E049 for ; Sun, 2 May 2021 01:43:03 +0000 (UTC) Received: from mail-03.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail-41103.protonmail.ch (Postfix) with ESMTPS id 4FXplT2nkXz4wyTW for ; Sun, 2 May 2021 01:43:01 +0000 (UTC) Authentication-Results: mail-41103.protonmail.ch; dkim=pass (1024-bit key) header.d=connolly.tech header.i=@connolly.tech header.b="a29YV91Y" Date: Sun, 02 May 2021 01:42:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1619919776; bh=Kl3Jo+OZEZzf10VJacbXDH3A1fF+G/d1ql1pz/OtWqI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=a29YV91YarPuYd+ZgiO2zQf9fSlWHiDHo8E62fQRNqW4dxw2rUuwV3k27xSeHIJun fzVc8h5St4JjOlfqwfIbENSdGZft1O38P3GF9j4iUd65wI8WX/m5R7CxQpp7CTxILR acqjI8EZtPl8usqMEeAjOf2ksUxdHtP7JYiAtLlM= To: caleb@connolly.tech, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter From: Caleb Connolly Subject: [PATCH 2/4] drm: panel: sofef00: remove reset GPIO handling Message-ID: <20210502014146.85642-3-caleb@connolly.tech> In-Reply-To: <20210502014146.85642-1-caleb@connolly.tech> References: <20210502014146.85642-1-caleb@connolly.tech> MIME-Version: 1.0 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: , Reply-To: Caleb Connolly Cc: linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Resetting the panel on fajita causes it to never come back, we aren't quite sure why this is so for now lets remove reset handling as it is effectively broken. It is also not needed on enchilada. Signed-off-by: Caleb Connolly --- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c index 8cb1853574bb..cfc8b2a19742 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -23,7 +23,6 @@ struct sofef00_panel { struct drm_panel panel; struct mipi_dsi_device *dsi; struct regulator *supply; - struct gpio_desc *reset_gpio; const struct drm_display_mode *mode; bool prepared; }; @@ -42,16 +41,6 @@ struct sofef00_panel *to_sofef00_panel(struct drm_panel *panel) return ret; \ } while (0) -static void sofef00_panel_reset(struct sofef00_panel *ctx) -{ - gpiod_set_value_cansleep(ctx->reset_gpio, 0); - usleep_range(5000, 6000); - gpiod_set_value_cansleep(ctx->reset_gpio, 1); - usleep_range(2000, 3000); - gpiod_set_value_cansleep(ctx->reset_gpio, 0); - usleep_range(12000, 13000); -} - static int sofef00_panel_on(struct sofef00_panel *ctx) { struct mipi_dsi_device *dsi = ctx->dsi; @@ -132,12 +121,9 @@ static int sofef00_panel_prepare(struct drm_panel *panel) return ret; } - sofef00_panel_reset(ctx); - ret = sofef00_panel_on(ctx); if (ret < 0) { dev_err(dev, "Failed to initialize panel: %d\n", ret); - gpiod_set_value_cansleep(ctx->reset_gpio, 1); return ret; } @@ -155,8 +141,11 @@ static int sofef00_panel_unprepare(struct drm_panel *panel) return 0; ret = sofef00_panel_off(ctx); - if (ret < 0) + + if (ret < 0) { dev_err(dev, "Failed to un-initialize panel: %d\n", ret); + return ret; + } regulator_disable(ctx->supply); @@ -276,13 +265,6 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi) return ret; } - ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(ctx->reset_gpio)) { - ret = PTR_ERR(ctx->reset_gpio); - dev_warn(dev, "Failed to get reset-gpios: %d\n", ret); - return ret; - } - ctx->dsi = dsi; mipi_dsi_set_drvdata(dsi, ctx); -- 2.30.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel