From patchwork Fri May 3 21:32:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13653665 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 1F231C4345F for ; Fri, 3 May 2024 22:46:47 +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=SuY5S0M2FbTVxIxNi1UlFLVvg0vU6pK3jhgRh8vyKfA=; b=izQFxBJaZTuyEd mmx5PPQhOOKpvlZFUqP9yKEGl4wa1R9zWsvs1VtINMxPKedNp+KAJWxg/Au97/im4KEftQkXlShgd AyMgcPsebNhB7b3K+IB/5V2h/3FtjLfqoYNycE2urf6y94I/cBGRLLogXy9n841HOS85L+TutMMlk m/155rqkTAyvzDbSmpsJdSN7GRAillmWFumqwMgpuKoz03t+/VeYKnez8X5/VJUEZXxAUSRMq+yKF Hdm+UByL5FW25eNBMtXhM1bQNbH5uW2/YM3hA9Ln4Ufsxj+oHtC0OVam3h3joWHgm44YIiy1MRjVx S9XjWrrDgVZsr3gF8pjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s31fm-00000000eQP-27SE; Fri, 03 May 2024 22:46:34 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s30a3-00000000RY8-1Vo7 for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 21:36:38 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1eab16c8d83so853245ad.3 for ; Fri, 03 May 2024 14:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772194; x=1715376994; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oJSS1xLEfY3Y1Nc4TX+Fmok5eKTdIJMR9yqmN0qgIiI=; b=HINDPiK06Ur6vaW0feaQ8stX4MCvSpV2vYIGuzEA6PnGYkSLsToGDt/ft3HJhUrDBQ 1qB16Wh+yB4sHEC/7Wjn2bXLFQFY1hN78gGVdEuCBEM4P2VSBzjAdLVYcJ1shWtkzMls yq/W2C0GOavW0dlD0TZPf/oFrxX2G/0QGdm8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772194; x=1715376994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oJSS1xLEfY3Y1Nc4TX+Fmok5eKTdIJMR9yqmN0qgIiI=; b=nhxxMYNOgmEer0BeqHbRcHYkzsQEdO6aLwZ757qIKD70gYQ8zBuSeAT77b8iQOObZC 6+QEyY2zaYbOVrtNWg7STYePfDFriQ0Qq7sIl3sj64T0UdAvh9HdW+KdlKnWidW/4Jlg 6IHPx6pHOqMSN7llT7BdYAtmcDSVlrcj3BKbTuS71wW/PdKLJYPD21QtzByEuR9Yh2Ct P4EYfolfRr6HnlLnoxb1XSIK9AG0Ds3iG+tALIUzmIPJy25kkrc87496PiR/6f+kThs8 n4CcIDeWQPDeD3gdg4FrOhhCGSs88/DWv0ee4guP2izJSQVH2HPLrHm0iTPKAC4rYaT/ dRwA== X-Forwarded-Encrypted: i=1; AJvYcCUYuOPB2EBBrW70ovKDZAIYMMZWVhpeduAn6WmrJhm3a/b9iGM7NFZYvgsDE078G+gyVvhMyVsay0sPwI5QPUlmpuKhocdOdea906N13XDITuvbmBY= X-Gm-Message-State: AOJu0YyaoF4Nr31OlR/rVH+oXBMvogH7fK1JVcspBMsrXvnmbfPDGxwV 6wIITtUGuSoekrPLyo/cPmR2E7hJdX6NecyhO3l+HBiVSs341wXuJLnCstb5xQ== X-Google-Smtp-Source: AGHT+IF/xaXv/X0Wte4aZNJO+64pdFolxJxdcSTQcUQ0uEZBKmCrVQEqCkWitBuj2PfiwIvx+UWLZQ== X-Received: by 2002:a17:903:41d1:b0:1ec:22ca:b290 with SMTP id u17-20020a17090341d100b001ec22cab290mr5154916ple.21.1714772194313; Fri, 03 May 2024 14:36:34 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:fb6a:b54b:7580:64f3]) by smtp.gmail.com with ESMTPSA id j12-20020a170903024c00b001eb51a46f5bsm3729134plh.43.2024.05.03.14.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:32 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Jitao Shi , Cong Yang , AngeloGioacchino Del Regno , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Matthias Brugger , Sam Ravnborg , Thomas Zimmermann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [RFT PATCH v2 04/48] drm/panel: boe-tv101wum-nl6: Stop tracking prepared Date: Fri, 3 May 2024 14:32:45 -0700 Message-ID: <20240503143327.RFT.v2.4.Ib501f2eceb62016e09cfb17bca29bde0f605a567@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240503213441.177109-1-dianders@chromium.org> References: <20240503213441.177109-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_143635_734609_74C0F6A5 X-CRM114-Status: GOOD ( 14.47 ) 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 As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Jitao Shi Cc: Cong Yang Signed-off-by: Douglas Anderson --- Changes in v2: - Only handle 1 panel per patch. - Split removal of prepared/enabled from handling of remove/shutdown. 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 0ffe8f8c01de..667e1bb4a58b 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; }; enum dsi_cmd_type { @@ -1450,9 +1448,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); @@ -1471,8 +1466,6 @@ static int boe_panel_unprepare(struct drm_panel *panel) regulator_disable(boe->pp3300); } - boe->prepared = false; - return 0; } @@ -1481,9 +1474,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); @@ -1523,8 +1513,6 @@ static int boe_panel_prepare(struct drm_panel *panel) goto poweroff; } - boe->prepared = true; - return 0; poweroff: