Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp93903lqh; Fri, 3 May 2024 14:38:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJ5svM/3rSSaqjlEZh1zc4fRKqIy1/82+kjAvbsLN6Vbid03zpZGD+QnOY58BIoa/Rv4mg3bZ/QrvRLhcQMUgkTnCQkmmNV/V+OJUzGg== X-Google-Smtp-Source: AGHT+IH2tk1aZeqDmP5MWoaRMPE+rh3sFCX9GW08GbQOQKfWzu5tCW3oNosMESrwQt/sQgtwoJL+ X-Received: by 2002:ac2:58d9:0:b0:519:166a:d217 with SMTP id u25-20020ac258d9000000b00519166ad217mr2973738lfo.32.1714772309015; Fri, 03 May 2024 14:38:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772308; cv=pass; d=google.com; s=arc-20160816; b=HyQUjd84om1SnZa++W2rVPfFSTfEc6/WVU0tl/61Jdt2fdWRQ+0OP4BYdccu5w2KcE bcMVncHtjXhLgSsV/UUFe/WvBgVOcASpPqM22alsNhY9ECBbLwujKeBlBdbY7HTKzAHM g08Df4dDN2kaHDzOmRYARfY9y8fES3PnOonUJy5AoCl/eX/woofbXqI5q+BvcOZzbqZe c/Im/z0XHb7C9De41w1epfdSD0H6uOA3CjmLZUcH3DdMdLEUSnTdM/ivZxmfsdtSyaRk ssQV1Ar4HTqor4r5eVaP7/h/f0lX4Xgdk0PYV2B92cH7Uw2H+IG75W5Tjlf65Wz9xCq8 gcPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=paGqFOJ2nhC87MmLby9MgxTeHu7XKJBlCB1L6uiDNwg=; fh=1bD8MIhvc6q9FWwNkNufiOvC36tx3T5WjwEnoxJzIbE=; b=vosqDwTdmnLhNcm2hRP3zdobyFOgt0O1dtWeGa+vfyQBZALlmrSeksPgj/unUytTMU 1kdJXa2IaGMAkk/t/y9KrT3M6ssjjNnjSJ+hzJNZJd771R7dXLCE1UhkH7461vPXCwdc eZtWGdvaQvnGFe6T3AWajByavnFlao8tuIFZBf1GN7eGdAtT8+xPBPvIg2wkN4aZ443X DlKSBKpRuBPqsECJ6skQ8ISM5H4+5opA7r6qTfF05HbJI+AQbFJbK0bs3l8hN156ubAw l9MKfAlEqZtif0gqpbZHI3jYsovuC4Qy7KRYya9DZAs8f0EtadHZF+PzGsLUFq8ELTL8 2rYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mOldH39n; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-168271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k27-20020a1709062a5b00b00a5588c75626si1893971eje.15.2024.05.03.14.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:38:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mOldH39n; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-168271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8F9981F2177C for ; Fri, 3 May 2024 21:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94AE28625A; Fri, 3 May 2024 21:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mOldH39n" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4006758ABC for ; Fri, 3 May 2024 21:36:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772206; cv=none; b=HfTvmVUpSzrKTFdYXiQDtKTPaIzKOQQpz8oJcPr54QTikh3SwMtwPB92WGPI4GX9CfDnZ6vkjZJkL+awxsFjKtvm9YsDL3TbAQwVo/MF7Z5DiWG5LnQGJwW4j+jAcnVZtnvOFtzYufmgkrwMSCm15uVf8Em4JD4VbGS0IuCASpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772206; c=relaxed/simple; bh=UFRhW7hFxmMjKYOVgXJWmGpqqggLO+iuoq5fYFD0R2s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PvW1ZWJn+pK+AEokTGoxqVs5xUqigzwz8H/qUstHPg2FpBMSOdz+VHo+rCnwKPlgiD+btKXnrpBHufpoLBLAZRoUfj+FouY3LEvEUmp97CvVynudOSR0B+yZLHo7U3VAK43os7Ar0RdeeNmx3ONZzk6wcNM/aY7jyh0RBxNWdJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=mOldH39n; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1e3ca546d40so1023605ad.3 for ; Fri, 03 May 2024 14:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772204; x=1715377004; darn=vger.kernel.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=paGqFOJ2nhC87MmLby9MgxTeHu7XKJBlCB1L6uiDNwg=; b=mOldH39nPA9cGqFTxg8kr220pral2lm7wmXU7LhY+hnCLG1lXJYHoyR+trqLu30/9b roGQKTGuIKIIMdrBlOqudWL/QqPXzDOfqD2y3TQZjDUTj+TbcC49FfP3zqp21w4f2JHB ocIbBSSk6byjkYUTdYSR7GDnL8ugUso9BlQ3c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772204; x=1715377004; 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=paGqFOJ2nhC87MmLby9MgxTeHu7XKJBlCB1L6uiDNwg=; b=gz4g5I0ng6ENNo9V1gf86KT+bb4xpM2U+6XaKn4JkWA5dlFdxVk+faXHRsqT10Ayaz zaws/aUE1N04Px/mPwtWyqylRUi05CswPKQ8AIndunQtpOMoCmyXgbcras3PlyTwVSvO m3ypSzO4ly1h7KOedEDizdvqtI+QuHNdPDqFoLvT2Mnq81BDU6M0KtmYxllNUhlc18UK WltBAo1PMUJBpk7k1buqJUlAAhNOsbl/gBHSl1/1v33kOZG1wHGAT1AZz7bv8JxjorzA XseUfXt0M3ka1a4XQ6xC90R7QNt999rVX9PpAoIbfKvgosmzb8HbTzaNbRQWDNEOX3vB 1PWw== X-Forwarded-Encrypted: i=1; AJvYcCWFrDBylhW1EunvrZVqcEKMx5LHuXNJvapNXltSw+VKIK/3N/fTjElnfly5DMNoKn1W1gk5dgaRqor/NA9iAwHwL3nEU43hwFAdj3uV X-Gm-Message-State: AOJu0YzudEvWfUZpNavaIMKJg9foQ50XlU14Muy8y39hCbdK3CaAh6kq ayDi7L6B54tsspbdnjg+ZZSSrGwwuL02Z/w/+/Fnqf+3HfQax1srzdsg8Z7pog== X-Received: by 2002:a17:902:c40c:b0:1e4:df0c:a570 with SMTP id k12-20020a170902c40c00b001e4df0ca570mr4139211plk.8.1714772204518; Fri, 03 May 2024 14:36:44 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:43 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Chris Zhong , Lin Huang , Brian Norris , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 08/48] drm/panel: innolux-p079zca: Stop tracking prepared/enabled Date: Fri, 3 May 2024 14:32:49 -0700 Message-ID: <20240503143327.RFT.v2.8.I99c73621fe3fba067a5e7ee6a1f6293c23371e1e@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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Chris Zhong Cc: Lin Huang Cc: Brian Norris Cc: "Heiko Stübner" 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-innolux-p079zca.c | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 485178a99910..5833d3a0fc79 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -51,9 +51,6 @@ struct innolux_panel { struct regulator_bulk_data *supplies; struct gpio_desc *enable_gpio; - - bool prepared; - bool enabled; }; static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel) @@ -61,26 +58,11 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel) return container_of(panel, struct innolux_panel, base); } -static int innolux_panel_disable(struct drm_panel *panel) -{ - struct innolux_panel *innolux = to_innolux_panel(panel); - - if (!innolux->enabled) - return 0; - - innolux->enabled = false; - - return 0; -} - static int innolux_panel_unprepare(struct drm_panel *panel) { struct innolux_panel *innolux = to_innolux_panel(panel); int err; - if (!innolux->prepared) - return 0; - err = mipi_dsi_dcs_set_display_off(innolux->link); if (err < 0) dev_err(panel->dev, "failed to set display off: %d\n", err); @@ -104,8 +86,6 @@ static int innolux_panel_unprepare(struct drm_panel *panel) if (err < 0) return err; - innolux->prepared = false; - return 0; } @@ -114,9 +94,6 @@ static int innolux_panel_prepare(struct drm_panel *panel) struct innolux_panel *innolux = to_innolux_panel(panel); int err; - if (innolux->prepared) - return 0; - gpiod_set_value_cansleep(innolux->enable_gpio, 0); err = regulator_bulk_enable(innolux->desc->num_supplies, @@ -178,8 +155,6 @@ static int innolux_panel_prepare(struct drm_panel *panel) /* T7: 5ms */ usleep_range(5000, 6000); - innolux->prepared = true; - return 0; poweroff: @@ -189,18 +164,6 @@ static int innolux_panel_prepare(struct drm_panel *panel) return err; } -static int innolux_panel_enable(struct drm_panel *panel) -{ - struct innolux_panel *innolux = to_innolux_panel(panel); - - if (innolux->enabled) - return 0; - - innolux->enabled = true; - - return 0; -} - static const char * const innolux_p079zca_supply_names[] = { "power", }; @@ -407,10 +370,8 @@ static int innolux_panel_get_modes(struct drm_panel *panel, } static const struct drm_panel_funcs innolux_panel_funcs = { - .disable = innolux_panel_disable, .unprepare = innolux_panel_unprepare, .prepare = innolux_panel_prepare, - .enable = innolux_panel_enable, .get_modes = innolux_panel_get_modes, }; -- 2.45.0.rc1.225.g2a3ae87e7f-goog