Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp96630lqh; Fri, 3 May 2024 14:45:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWP2MGzhzucwq0k8H1sn0bHHCEri6to7y/tsAoZK3uJZa/HrRIzV8R3jYInpyX0kWRv6ZMyHa+GBhUF7JiRi+YZLRzwc55307AdKkyRaw== X-Google-Smtp-Source: AGHT+IG4pP7EM823ifAKVwtzzvmUor6qyCoXq7d4Vk0nbPSQmw6AhMleLZy5qdarnVxUj1H/du5c X-Received: by 2002:a67:ce06:0:b0:47a:40f9:5bb5 with SMTP id s6-20020a67ce06000000b0047a40f95bb5mr4657113vsl.22.1714772727005; Fri, 03 May 2024 14:45:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772726; cv=pass; d=google.com; s=arc-20160816; b=SMY3SfSzKyqUSi0+3v6fpq5uyq8QwL01NgImcLVkMP6ujjrBFs3UI2XppUcwrvfMoV 6xDCliSPTnYPpSh9XJJXxqox/dg7DjM2OInzQRT4S71XGaJlcFK5P8bNWBCDAHszVKjD kK4VgW7WyUyAPer0aq/CKCTJlAHr4WZw16PdUWJFqh/jCjlX0fEIhJhE/xhj4EHn/Zn7 h4slutaz6p6zywQE4pqd5QTk64UFAz1A39nwdAHSw+6SxehcAUw9ORDqd3hVshGudP6C 2llJO6Wvt9+17NtwawHW5AJmKIchldx3REScs1zC19t5T1JvTqBomDXJtBhdiq2zDOU2 SS0w== 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=cC/7w7cvbMIg1H0tLbovKCpsSruQDzBcns5w6WWFLNE=; fh=IA5X8zPz+8NdhI5q9q/5/5VAxHA+5HcyeiEv5iB5qoA=; b=FkF5oxSHxbzdFDgboiJ5gES0K/4lAJ3Jmsj3oYeCetjE2bZjmfsvm9Z1BIreM0KYCo oMU5dGXJi73p0UVCOM+1alK4/y2rY9Bs+D+8qj+RF/GM/Md7x2JGo4Bo9xPeNQZWHZNg oU4+7R3twzsJwhkKfvAj7IRe06+ocPoafmMxiDyA7D4Rai35OfiyARRJzZpQYD/XMRVL SrhyMn40KlWDrGiokf3Z9BRTNMMF+WRV8IMqZqlIMcaJLiv3hZXZvc4rtJSOTsNIqzxG xi9Ze4ItUqGjR+jqzneDdPluGulEiLBXKiFcjHliJd84WjI615PkfbI1TEWc0ADfou0M lmcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="U/CazDPa"; 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-168305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k1-20020ad45be1000000b006a0af439f9asi4009277qvc.134.2024.05.03.14.45.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:45:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="U/CazDPa"; 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-168305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168305-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B977E1C21899 for ; Fri, 3 May 2024 21:45:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A96E885285; Fri, 3 May 2024 21:37:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="U/CazDPa" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 66446136992 for ; Fri, 3 May 2024 21:37:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772278; cv=none; b=sMotxhVOI57Dpib3mFehcSgClHdE2daiZ5yNTCjMAiXh/jl4JZKwLe+C+u+od1KWGVDCXry5OFgtIDuUPgBPjZKfqCoomJMjH1DPTsNjCSfbJx+5uFBUCfPvuho4bF+HCnkXfygvc6DkujHYoFNBZHjB6T7CycNMBNP+5klP1Nc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772278; c=relaxed/simple; bh=24YRgd+bMU8QhFuBpmcHLr3V7mmVueRyG88apmBnS24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IAcg5JYl9j6tg4ZQ0DeCCZWlHg6scBe+K142JUA5svoKC24QEkd6/OPIKaj62WYBocIcmKnXxSG68nIcEx2mm9EDJ8nPqraEuq/o2zfm+FL/91beXjaVeny7NWYqTiiNpLoSWG4jVv1mdkLA4zeyOX2I8TlP7iDOXnCmNx3gBLA= 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=U/CazDPa; arc=none smtp.client-ip=209.85.214.181 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-f181.google.com with SMTP id d9443c01a7336-1ec5387aed9so1022795ad.3 for ; Fri, 03 May 2024 14:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772277; x=1715377077; 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=cC/7w7cvbMIg1H0tLbovKCpsSruQDzBcns5w6WWFLNE=; b=U/CazDPaQqjv/OLLZUtlgtr5LeQiKcPrJi/Vrf19DgQkaLtx3GQqKUSyVpK/Sa6WXh jv+mVoi4Dw/KcdehTYvObj8EcyyjoWRFLmnZfjXy1MHbQAs6XtYwwayUbKzVZmGaMiSM 1Z0gUpuGp77H4fzjSNB2LKtobrlzZn+ortDVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772277; x=1715377077; 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=cC/7w7cvbMIg1H0tLbovKCpsSruQDzBcns5w6WWFLNE=; b=O7DBSLnI/ohLDexSZ23Bq0kvUEAtTxTqfXYeLZ4q3NyhFabiA1iyHiCyUhUVn08B8C axHmbA76R2cUhsjsfVqyrMfJhnERHZcIJlJ+jtSLp0YFNXjhhIW0PFQENourFv/swlJU 09W434yfG7CzI5tHzaKLBFUgMOEUiHEfq1lzOR7xpYZ0cg95J/w54Mp1k1epZvh6r/EK YkZAz/g3MBcTlW3yt65+7bG/T5cNhBKxJbXPHUgNYLLzUpdwGMoT/cCzHhFl1XFof5Kc eTNFn7RoG/05KVkRWQVHc2CXeiiwqXsq5jwSNowfgtTsCCsNjE7DW6+qSPMR4j8h1IHd 8TEA== X-Forwarded-Encrypted: i=1; AJvYcCU2mSXiS9lj1Ggth0dejXgN2DiDxGamhODq8GlvLqAsjABUM31B9CEEIU7sKndI7jk0FdilFXBc2eZuQiMTg87h1lIpC3xSxEUQyTzD X-Gm-Message-State: AOJu0YxSIg+cp7JQl03430fmRLEncZCGzUBQAhb/wmLe3gXv9pKvjHfR boT6CnLtQNVUXwrTWYRMGGg3pkJ/pKnPj5VF73xhNH/Vzvp+RPFhWlLZKYzjH+lPiOeAHx2ISAD EnA== X-Received: by 2002:a17:902:ecc2:b0:1e8:c993:a13c with SMTP id a2-20020a170902ecc200b001e8c993a13cmr4897231plh.25.1714772276873; Fri, 03 May 2024 14:37:56 -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.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:56 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Werner Johansson , Dmitry Baryshkov , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 40/48] drm/panel: sharp-ls043t1le01: Stop tracking prepared Date: Fri, 3 May 2024 14:33:21 -0700 Message-ID: <20240503143327.RFT.v2.40.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@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-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: Werner Johansson Cc: Dmitry Baryshkov 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-sharp-ls043t1le01.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c index 855e64444daa..c86337954ad7 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -26,8 +26,6 @@ struct sharp_nt_panel { struct regulator *supply; struct gpio_desc *reset_gpio; - - bool prepared; }; static inline struct sharp_nt_panel *to_sharp_nt_panel(struct drm_panel *panel) @@ -99,9 +97,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); int ret; - if (!sharp_nt->prepared) - return 0; - ret = sharp_nt_panel_off(sharp_nt); if (ret < 0) { dev_err(panel->dev, "failed to set panel off: %d\n", ret); @@ -112,8 +107,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) if (sharp_nt->reset_gpio) gpiod_set_value(sharp_nt->reset_gpio, 0); - sharp_nt->prepared = false; - return 0; } @@ -122,9 +115,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); int ret; - if (sharp_nt->prepared) - return 0; - ret = regulator_enable(sharp_nt->supply); if (ret < 0) return ret; @@ -152,8 +142,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) goto poweroff; } - sharp_nt->prepared = true; - return 0; poweroff: -- 2.45.0.rc1.225.g2a3ae87e7f-goog