Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp457734lqb; Tue, 4 Jun 2024 17:29:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKjxbcdmY0i/rD0qRqwP2osipBrH1V52fRMiLM9mDAFJKzzmx7b9EwbCRP7cWHJynOhGesaiSw0RQ10gTMplsXNycKmqtifrO+jv30xA== X-Google-Smtp-Source: AGHT+IHkwKPSWLesphY7PpD4IGKb74/eeunOVHWSPWEY1SQzRzx4j67BVJcwFtjGTNTqn/ijdiT/ X-Received: by 2002:a17:906:22d5:b0:a59:a85c:a5ca with SMTP id a640c23a62f3a-a699cc98ed1mr96204766b.7.1717547352838; Tue, 04 Jun 2024 17:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717547352; cv=pass; d=google.com; s=arc-20160816; b=aYTmN4EdYhShBm4VsTUECK63FbTG7bXU7wLQEVj4oEUHqSS2gHiqFoQ7EBNKffjQbx aE3I/gqZBlRhV3d2NX5d35XWXrp1Xnmp8+LqaQFAUN8vPSuITLcw6bnFXXA8OO/agM0G KkPGuvcQCLjG2uqEG5IWkxJKY6kNB9TIuMUcRnvN7qcuS10qJMfn2cNz4zBanGxh6PUF bVLSfqsHx7PjOkW7/2LVdAY3RkVTTo34JwDYpoMejYEVLd6ynFRzoMiqEWOMyoBv/ZmC V/g3axJ8gcC3qtAqnOfZp2A78viIG5uoBy9rZC4hBszx0rqcncMx2yHPTg5mBhb/eF/a qyVQ== 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=HPVmtOP7OzClmuYgtUVqnYcO82gUWMj5hZYUvdlHA1M=; fh=mUb343FVcbhX+/cUxRZcnVwDJ4S9vFq8ZGh3HnHTXKE=; b=K7+rPcr4mkW8ugPAncCr2sehGSEwURSHFMA2YthCQKH9M9mojC1qcpdZirHGsHdiDJ ztwkeyTyeLSQwgYYbrOd1sBdmeL42W3ft2QqBgsY6PfHpbYdBFX//ZZNxjaIZ8kKsjS8 xnvScGUBRweXlwalf4nLkO2go2uzrqy/LSV3CKYipYhZ5repRoLUf38ClhYx+2YhWScy b7mlsJ6JJy4jWQdy/8yC6PLI2+AK3ez80yDXkOn7rwvaxgQlxB1fpqshv/hNmJJJGc8p RTFxBO4RZBL2hdcw8hJCUVfobRVEukkeLBgQIG4meTrX7JWKnOh4a0A8x5SCeDPtrK/6 Vjyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QDKnoDBU; 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-201604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201604-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 a640c23a62f3a-a690a89efcesi249785966b.548.2024.06.04.17.29.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:29:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201604-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=QDKnoDBU; 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-201604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201604-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 6E2C71F215D0 for ; Wed, 5 Jun 2024 00:29:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F347161FD8; Wed, 5 Jun 2024 00:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QDKnoDBU" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 B1AEE5FDA5 for ; Wed, 5 Jun 2024 00:24:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547100; cv=none; b=MpkejaCdOV4/gi2+83OQXgYicR1zSKimHtcF6xK5t2RhMgmqPXIeIYcLHK2mDZ/wL8ejhzdWsom+4RcpZpGuKFyi+zxqEPq/voP+3SsPdl/qAI8e0rfAQo6ZU+PYy/UO/PecNBEYuKrqKz5rsEeoCIVgDLRM5fzIh96ShN/QP9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547100; c=relaxed/simple; bh=FQKiizhZ8vcg7Ag7A25RUwqNF6hI3SccADd32dafVj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C8BQZuKY3suvkHQPd7I3dDj1aOsmOVQn0te1XHu2ad8iTZcPX8ISh4q4cooYZYe9fGwc5rxNxfSsep1NiLMy93vZSH1Iy5P5e428LlYH8SwyX8BIZqj32FUWwEsEKOEYj7/rrbDaVZlCeqCNRrjMwN2titEjfMYQVV1ENWpGAUY= 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=QDKnoDBU; arc=none smtp.client-ip=209.85.214.177 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-f177.google.com with SMTP id d9443c01a7336-1f61f775738so44200585ad.2 for ; Tue, 04 Jun 2024 17:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717547098; x=1718151898; 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=HPVmtOP7OzClmuYgtUVqnYcO82gUWMj5hZYUvdlHA1M=; b=QDKnoDBU8NADr6hEiLxSZ8qkIMcv47tQmZ3HITQVgqH4MKenI25RwM+EUoVyN7PPVv Nt0J5qqCS4TweJLsdNk5/YnX1/oOvmRLsjnpesvD8JQyXUOCuDSjj59hgERcbm+A8kAD KEOht7KGdEBv/X4T9NPCqiYkyDLBPlD1c2Ekg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717547098; x=1718151898; 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=HPVmtOP7OzClmuYgtUVqnYcO82gUWMj5hZYUvdlHA1M=; b=GsUNUuwAskjMn5q7YoRgLlReIV3fVVDWhVB/+YT5sdZQSsLHe8I1WmzcPWCd818jYY Ns74lQFgYi8iK+YePrG7Zzb5L/ZUKHUDo/Efc+/tI7Klt0p0zrp2dADjFchu+nMqBpqw IP6KqBVSGuwsONwBn16ihgYbwWJHRnZYm7O+4FO/PwLRC/MkThVpgs3/zki+IMZKJ6Y/ jpCPBuBipicffvz1OI2C/f9dO1EHwzECoxhaMdKHqmlHh6BDDR3EJqghU7DPqEjOZ6Ol O7N1mEgVEQlnlCLxw7aP4Ei5vgnLTIGgbhrqQUtV892++/BEOGbYU8LOcdTgZlSRRgey wYbQ== X-Forwarded-Encrypted: i=1; AJvYcCWUN32dAbQEYHZL8OCtmsBS2ItVoBFIg6rVj3Z/yGAH2Tr52Y3gNJ3crymYi+TAqvVhXIozuI96c+psMbcXn2jU6wivgwIy7lCEeBLK X-Gm-Message-State: AOJu0YyAgmzk7xN//sRlB6ObHFVRfIS5/6t1bJ2SZVtaMOK8hV/5sLxp ukcQHzBcDPVDPVM0VtRsz+pxZuilF9BDG9iL90ZtNpFiT0uSNKaZnSzFMzlF5g== X-Received: by 2002:a17:902:d2ce:b0:1f6:6939:ad23 with SMTP id d9443c01a7336-1f6a5a1976emr12033745ad.37.1717547097993; Tue, 04 Jun 2024 17:24:57 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:3609:ff79:4625:8a71]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323dd862sm89032025ad.147.2024.06.04.17.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:24:57 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Neil Armstrong , Yuran Pereira , Douglas Anderson , Werner Johansson , Dmitry Baryshkov , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v3 20/24] drm/panel: sharp-ls043t1le01: Don't call disable at shutdown/remove Date: Tue, 4 Jun 2024 17:23:06 -0700 Message-ID: <20240604172305.v3.20.I89ee53f7fc2f0806cab318128e5fa927990d830f@changeid> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog In-Reply-To: <20240605002401.2848541-1-dianders@chromium.org> References: <20240605002401.2848541-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 It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Qualcomm boards. The Qualcomm driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Werner Johansson Cc: Dmitry Baryshkov Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson --- (no changes since v2) 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 c86337954ad7..729cbb0d8403 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -267,10 +267,6 @@ static void sharp_nt_panel_remove(struct mipi_dsi_device *dsi) struct sharp_nt_panel *sharp_nt = mipi_dsi_get_drvdata(dsi); int ret; - ret = drm_panel_disable(&sharp_nt->base); - if (ret < 0) - dev_err(&dsi->dev, "failed to disable panel: %d\n", ret); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); @@ -278,13 +274,6 @@ static void sharp_nt_panel_remove(struct mipi_dsi_device *dsi) sharp_nt_panel_del(sharp_nt); } -static void sharp_nt_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct sharp_nt_panel *sharp_nt = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&sharp_nt->base); -} - static const struct of_device_id sharp_nt_of_match[] = { { .compatible = "sharp,ls043t1le01-qhd", }, { } @@ -298,7 +287,6 @@ static struct mipi_dsi_driver sharp_nt_panel_driver = { }, .probe = sharp_nt_panel_probe, .remove = sharp_nt_panel_remove, - .shutdown = sharp_nt_panel_shutdown, }; module_mipi_dsi_driver(sharp_nt_panel_driver); -- 2.45.1.288.g0e0cd299f1-goog