Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp95694lqh; Fri, 3 May 2024 14:42:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdDGf5JpobMMwieNno8CV7x4MWmEJD1+XwpnlkPMh01jT+ALQR7dgIMXsLaxiEhj1Wyd4uyztryhe7PkpwDYrZGxDjddi3pgwnvocKRg== X-Google-Smtp-Source: AGHT+IELpegEleyPmGjAjz4WX7JTulZAnytNZN+5SywgyH3s5NKoKZBMuTN34Edt8KGRh8kab1Ff X-Received: by 2002:a05:6a20:c888:b0:1ad:85c1:2d21 with SMTP id hb8-20020a056a20c88800b001ad85c12d21mr4779039pzb.8.1714772578968; Fri, 03 May 2024 14:42:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772578; cv=pass; d=google.com; s=arc-20160816; b=SnOjSvjZh5uwl260SQlfw6fZdawdV2sYYsQdIOjyd3OrWwZDz5sX/DEmNBNAxoZ9oU k2KTPQfOxgBlTmdPKDoILSadwBbi1acpQs04pu5CGONz/TWIR9dL65VOXG6W2zvzrMWX 3cFT96syhoEryVQdMKkOJQ73y3kNrECiWv0a2rKcc6Hp/djBJ8q861W56Tbe/6fMFfeg qRFFEJYuWd0sBz07M+In0Y1lp9O0OrnBTJ9c1EJHFzhnqiZxi7QgJamhO04Q3Dj7S3HV E/O4SJiKPVWv5YfL/eEDsomh2d2vTJQqBGZYBxJqL/WdNk47vvC5CFhQprcCqe3isfG/ jd5g== 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=T4ZnBWaIKiuSZ6rYgD6PXXRcgsfalihno55gNzam3kQ=; fh=VaGX5CB304hArqFxPkAhJTVUKiOjxEh03xHhr5qSi1I=; b=Dp1WKZfQ4W54x6cbF1cwPb5xXDXK9jIwHtC9/X2lHtqwUebuOLorPYKTX7Ry3y4j6P z25yLePG1/4MYCQkSj6QAM9fp6o4UCykurhBZannIi/i2RJgMaIw/CTVIRrdJgUcG9aD 6itqpyxVmkNyDueMpL1vV/iAkvc6nOAixFnzcRF59WHwubbrgdvWYuNK4B+MpEN0+5ov DDiwd8lOR8cBNYnE/NYx3kZDzZO9k62BANhZvvR46ajIuCfarWhWXlrQdG3GAc19rURI B3FyY6kqGT2Fket/KATmterVU+aUntSyQ+vu8wsaw055MhLLbNq/wia8rkyx1KmkdcMH FyfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WwpHQ++f; 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-168289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id pi14-20020a17090b1e4e00b0029cf40e2b43si6298564pjb.143.2024.05.03.14.42.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:42:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WwpHQ++f; 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-168289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168289-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7E152281DBE for ; Fri, 3 May 2024 21:42:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2158132801; Fri, 3 May 2024 21:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WwpHQ++f" 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 6E84113248D for ; Fri, 3 May 2024 21:37:21 +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=1714772242; cv=none; b=tmuOlfw9cyidA1IcBzoX3qlWdvNDDjtGiRk+hnEqXchPp2K7CM9zohiCrGg/urZwG2ZGKYhSVZSP9dhWZQ3Shk/6e/ME87klCVp0LJeZfLSMvT4swAIRXw4AMT2arO/T5aerqIignhVFNIxRo3zFwlw1tka8N2vcTWr30UfKXBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772242; c=relaxed/simple; bh=GX4HIAvO+VZX4N8pwlhT++o+kYYGJe0qQHHVtQMYJ/4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BwXybGJ4HnLfzT5AjQiQQaxu0h8mW6uAOK7mgzXZaVN8XTJ62ff8cb/12uKsZ0+m0WYSvBcI9jgr+IyZ/zQdHNupMvaixIKQzUQLp5gSVVGTICLjdIl5a63QXFrEHQ0r2GZyCyaFBh7cIgxMvjCXoxF/1JUem9DOhzh92xxCrWY= 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=WwpHQ++f; 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-1e5c7d087e1so1048565ad.0 for ; Fri, 03 May 2024 14:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772241; x=1715377041; 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=T4ZnBWaIKiuSZ6rYgD6PXXRcgsfalihno55gNzam3kQ=; b=WwpHQ++fSV1kqSAHqQ/5r6IqAwsvkk0Vep+T0JlwzDhVbDgeP9V/m2bmnpoK+kn48E fHesmArLB/2nrg/YRJ0JkDx91F1KwnrxPiILhel1QxZUVbLmbEJEa5XLahcC2kxLnsAT uGSXo6y6dtEHuznIK8F9Gnpog+/BnoKjABkKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772241; x=1715377041; 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=T4ZnBWaIKiuSZ6rYgD6PXXRcgsfalihno55gNzam3kQ=; b=rU68hPGk+3TCDHWklTuZB5diZ2RQlPjjBgts4lAEF6Dm04ZZw1xUKRObPPNEfcVifz LfmT+lUgPSv9ln3VPX/m5b5WqnCEPolNg1XmxeEq2b6l0e3sWqIlbSoEfhleczDWoVta q3Yeo83oSfNZeCavnu/QcTs8Mv0UlXOGCAdr/SbOH5DgQhodS/AtR5N3AjWFApTboca8 zCjYWcIe0PnUyEcIQPKhP3lBIe5j5u+y11WKBPhzguDIUYuPIJzoZfHu1/sIVkI5ac8D L8yaF0Q/G5TriXQstspckBOURTFEbtyF15PnDp/9rwl/YHRyB3Vl3rgIZLMQFalI6kKd hATA== X-Forwarded-Encrypted: i=1; AJvYcCVLmvZTYpPQdrD9lJcgGvevjprK+m1KpVQqGxCewKUKPvbhSHQTgm447qpi8LOlDptzgwTez5cET8O5c9ExsrfuuklE2Bsaxs+fKQ5c X-Gm-Message-State: AOJu0YxwfUe0dmKlmL647Ua44IaeBnW2pEff/UkdI3ImmJ0ytGXdZoqc P1ugu4K4Xd6ehajgFZ3IuHGFpxzk7CpuOGwaHjogX+SL8qFjr1CXIRwsxLdwZA== X-Received: by 2002:a17:902:6503:b0:1e0:a3dd:82df with SMTP id b3-20020a170902650300b001e0a3dd82dfmr4006853plk.38.1714772240760; Fri, 03 May 2024 14:37:20 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:19 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 24/48] drm/panel: samsung-atna33xc20: Stop tracking prepared/enabled Date: Fri, 3 May 2024 14:33:05 -0700 Message-ID: <20240503143327.RFT.v2.24.Ibb4f923363a27167c480a432e52884b117221974@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. Signed-off-by: Douglas Anderson --- Changes in v2: - Only handle 1 panel per patch. - Split removal of prepared/enabled from handling of remove/shutdown. .../gpu/drm/panel/panel-samsung-atna33xc20.c | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c index a9f0d214a900..a322dd0a532f 100644 --- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c @@ -25,8 +25,6 @@ struct atana33xc20_panel { struct drm_panel base; - bool prepared; - bool enabled; bool el3_was_on; bool no_hpd; @@ -143,13 +141,8 @@ static int atana33xc20_disable(struct drm_panel *panel) { struct atana33xc20_panel *p = to_atana33xc20(panel); - /* Disabling when already disabled is a no-op */ - if (!p->enabled) - return 0; - gpiod_set_value_cansleep(p->el_on3_gpio, 0); p->el_on3_off_time = ktime_get_boottime(); - p->enabled = false; /* * Keep track of the fact that EL_ON3 was on but we haven't power @@ -173,10 +166,6 @@ static int atana33xc20_enable(struct drm_panel *panel) { struct atana33xc20_panel *p = to_atana33xc20(panel); - /* Enabling when already enabled is a no-op */ - if (p->enabled) - return 0; - /* * Once EL_ON3 drops we absolutely need a power cycle before the next * enable or the backlight will never come on again. The code ensures @@ -195,20 +184,14 @@ static int atana33xc20_enable(struct drm_panel *panel) atana33xc20_wait(p->powered_on_time, 400); gpiod_set_value_cansleep(p->el_on3_gpio, 1); - p->enabled = true; return 0; } static int atana33xc20_unprepare(struct drm_panel *panel) { - struct atana33xc20_panel *p = to_atana33xc20(panel); int ret; - /* Unpreparing when already unprepared is a no-op */ - if (!p->prepared) - return 0; - /* * Purposely do a put_sync, don't use autosuspend. The panel's tcon * seems to sometimes crash when you stop giving it data and this is @@ -220,26 +203,19 @@ static int atana33xc20_unprepare(struct drm_panel *panel) ret = pm_runtime_put_sync_suspend(panel->dev); if (ret < 0) return ret; - p->prepared = false; return 0; } static int atana33xc20_prepare(struct drm_panel *panel) { - struct atana33xc20_panel *p = to_atana33xc20(panel); int ret; - /* Preparing when already prepared is a no-op */ - if (p->prepared) - return 0; - ret = pm_runtime_get_sync(panel->dev); if (ret < 0) { pm_runtime_put_autosuspend(panel->dev); return ret; } - p->prepared = true; return 0; } -- 2.45.0.rc1.225.g2a3ae87e7f-goog