From patchwork Thu Jun 15 20:21:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 108709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp902472vqr; Thu, 15 Jun 2023 13:38:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4TQa3fEbf6IN113m3QK+CJRvmKNAVt9Emqv/BbOBQmbnx14ek3G6OheJXntJB9Rhv6tsZb X-Received: by 2002:a17:90a:9f89:b0:259:3cc4:f978 with SMTP id o9-20020a17090a9f8900b002593cc4f978mr55744pjp.19.1686861523330; Thu, 15 Jun 2023 13:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686861523; cv=none; d=google.com; s=arc-20160816; b=Qar4zC5VNWBYVtDahhKQXblCqwD5wwFtx9/AOwQBdgZ/hxHm9KPkyoVuFwTdI8A88l gNJF7vWtq6axFzln9Nzcuvvi+OqNpGYRyXKXMK3toiwGUBIUfR4fZ6VrDSquKDo4lu1Z o9q/EueMrt/PjMeDlDP1K0nzKdMmj3Oel16e4ydERzK+D+vzuYu3tydy1JwI41b5YLUm RdlslG2kJHB/eYQDmjlvAbALgkfbiSk0XmiqC1xagUdQSjRqHmD4iGNZJSSqdn8Kw/cD 8I+SLnVKijLMiwNmaaMPE1ZmwBsxTFq6r4aUmyBZgAYHAOVXNOyE3XMhTImryPN/jXCN HvIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=kKBaB/9E61orl2m+5DjkcFtTpmNkTOXhn6/2KzxDt8E=; b=G4i8GeXTKdjjiNn0U8LN2lzaN8SIIGw/5YM9vgNz69UNWinbq0GIJeDPBxBR1QLIxN oAPaOxwhoIiF7OpbMJNg+js/DInzA+yJgMm2b8BG8JRiKmE+FQL82fB6HeQQVZ2Vmtnk UtnTKQwcM9bxy6aAyNmEHP2LlPh62BSRE/54PFx30oLbb2OTR4xegQl3nV5zGu91vc1H z5EqODg/QPoRbr3LyXSUT1wYyHrnaUss7JqaX6+PQcM0jt7QQVEDEXS4UKk1M4KHQEHs 5Y30ctzqv2hN2QeUu0ZP/2WwJzAM553DX38xYhdCh9Oy/CKNSz+AUK7/sTUAkjoTSpE3 0eyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ooRn7P/3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fz12-20020a17090b024c00b0025bae7f2b10si137049pjb.13.2023.06.15.13.38.30; Thu, 15 Jun 2023 13:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ooRn7P/3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236818AbjFOUVw (ORCPT + 99 others); Thu, 15 Jun 2023 16:21:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbjFOUVt (ORCPT ); Thu, 15 Jun 2023 16:21:49 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 852592101 for ; Thu, 15 Jun 2023 13:21:47 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f640e48bc3so11057015e87.2 for ; Thu, 15 Jun 2023 13:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686860506; x=1689452506; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kKBaB/9E61orl2m+5DjkcFtTpmNkTOXhn6/2KzxDt8E=; b=ooRn7P/3nfvzdMKi01LrsE9k9ILxzSQBhQFr5AUVnFXqvhXiQGOtXZnyTeH3yPqOlG ME3qSxWOTsVIor8/HBW4rznQBIyB6wKPBaRAaZTw3vHGkBZ/A26f7x/LZGhPfVo60s/V Mk+svDS0wfQNBNGXA2Tgx0iMiIlph0XLSVv8lkn/ihlQ0LW9SWyZFsYrnJp06DpDNHO/ LqQLqpftykWL54nwlWYqrtVOeEMC+EaNsnKvf/KfifPXTtNZ/zf9u511maK1NNRv1IaS MqFCQ42lvHld/nar7kFhmpUh8sOicw4NYlt/IKtGF0kGQiAYvTR9ZuQCUuV8VHQzLVqO 5rnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686860506; x=1689452506; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kKBaB/9E61orl2m+5DjkcFtTpmNkTOXhn6/2KzxDt8E=; b=gDeqz/RiH7uPUewh1Q9DzklGC08fV9XDfPMez4zvECjZKiLpQjA+UwBKnY4QOZNLrh 7ZGz+rfhUOJHPmdArrCgbtzG1MPkSIrcvlDsC8KkEjm4iBmfcvIEIhMs7/OdCV8nhP3/ in0Sgwd1qUkxVPifGGzVZOoh5kzLe9Ft3m7atocpNNxlRFSHq26EktNknrPzKxRHAeTS u5KizV6eX/mlzh8aVT4HgzFww8G9kRf+PbTl0WYtcK5iSNfvPTZD01k7vA6AynbjNPU9 OQ8OjE8PNUtbyVSJplmyfEsN4XmpzZdd0NnFIZsQscbvBhD4Wp+PYOfk8gzYBxx04oFt LGPA== X-Gm-Message-State: AC+VfDz7Ah4uy+buqH0/DWmDMKTHJfs6pmN1YgjT2QehSALtnmWcdXiQ e8yhuKBkxBye0KPOn7UrmLZyxg== X-Received: by 2002:ac2:4985:0:b0:4f3:a485:919a with SMTP id f5-20020ac24985000000b004f3a485919amr10251508lfl.57.1686860505791; Thu, 15 Jun 2023 13:21:45 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id r14-20020ac252ae000000b004f3946030fasm2736470lfm.68.2023.06.15.13.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 13:21:45 -0700 (PDT) From: Linus Walleij Date: Thu, 15 Jun 2023 22:21:38 +0200 Subject: [PATCH 2/2] drm/panel: boe-tv101wum-nl6: Drop surplus prepare tracking MIME-Version: 1.0 Message-Id: <20230615-fix-boe-tv101wum-nl6-v1-2-8ac378405fb7@linaro.org> References: <20230615-fix-boe-tv101wum-nl6-v1-0-8ac378405fb7@linaro.org> In-Reply-To: <20230615-fix-boe-tv101wum-nl6-v1-0-8ac378405fb7@linaro.org> To: Ruihai Zhou , Stephen Boyd , yangcong , Jitao Shi , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768802508365776850?= X-GMAIL-MSGID: =?utf-8?q?1768802508365776850?= The DRM panel core already keeps track of if the panel is already prepared so do not reimplement this. Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index d19d30e134dd..412d4d99aec6 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -50,8 +50,6 @@ struct boe_panel { struct regulator *avee; struct regulator *avdd; struct gpio_desc *enable_gpio; - - bool prepared; }; static int boe_tv110c9m_init(struct mipi_dsi_device *dsi) @@ -1286,9 +1284,6 @@ static int boe_panel_unprepare(struct drm_panel *panel) { struct boe_panel *boe = to_boe_panel(panel); - if (!boe->prepared) - return 0; - if (boe->desc->discharge_on_disable) { regulator_disable(boe->avee); regulator_disable(boe->avdd); @@ -1307,8 +1302,6 @@ static int boe_panel_unprepare(struct drm_panel *panel) regulator_disable(boe->pp3300); } - boe->prepared = false; - return 0; } @@ -1317,9 +1310,6 @@ static int boe_panel_prepare(struct drm_panel *panel) struct boe_panel *boe = to_boe_panel(panel); int ret; - if (boe->prepared) - return 0; - gpiod_set_value(boe->enable_gpio, 0); usleep_range(1000, 1500); @@ -1357,8 +1347,6 @@ static int boe_panel_prepare(struct drm_panel *panel) } } - boe->prepared = true; - return 0; poweroff: