Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp456117lqb; Tue, 4 Jun 2024 17:24:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyVgjCVUH13i49ak3ij4zNzjfKobaczICzKPSifL1iuYym/JL0w6iCRJwClgAnklUHB82zSPX6ElHKGr6PwRhe+x2wMoBub4o7r1lHRA== X-Google-Smtp-Source: AGHT+IHM6qniQz0OIRK/bN38zSYxxrO2THVveeVNAEwVqfJWmCUaCLk9psfUg86ph/zeVQvSui4V X-Received: by 2002:a50:c31b:0:b0:574:ebf4:f78c with SMTP id 4fb4d7f45d1cf-57a8b676fdfmr580256a12.7.1717547090555; Tue, 04 Jun 2024 17:24:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717547090; cv=pass; d=google.com; s=arc-20160816; b=MpWWF/IDrq+sWgo+H0+r1w0P6DKEd/PqHlqcoEPsMppJ5c9YR4scj7KVVBsJ05rmwE 4zikfolkPvZg5VWmn+kcYsYEg/NOrUVQ9PlXKDfuSfRFF5lL6CYHjWJrWfPeiUCT4Svt 69zTKoq3kqM0eNEfMPod8SPLxavbOdzGm02TIVP8LRkqnuNdWrcfz2sKgEGvze/NoJt+ viEmj+cJW1sj778kktr/86sDXp9Rz8UkN4mRcUyX1qT2AWcg2WD1rW7X5hx/h187NtgP mpSLbXprZNwrrJeYWxdn+LUW06cPLp9IyxHt95JcEgj8KwRDbqxWIoGuhuWenF5Vp5fl 5dyw== 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=XsRu3jEWU9sK1vmuNiyJjPrhOLNs5NH11TNjKSLZ2vI=; fh=7rVg/8+ouQ9aA/PS918cFVgxr7/Iocizj7i3FpRU2b8=; b=CgQlflt6ZnUDXjOB+Ji3OMGHwSq5kxgxcJjHkIrSPnRJjvm4pxNxA9zgAsVWtOv01i sHpNRN9/Y0nHwWwOxvqndmT4G3psv152F3fK3f0EzQFq4MIg2H6We6iFpf1+bwyCQQuN v6rrW4wTwgBFe6gA3aHNKgAD7VTYw6EXzgyQAzSky3qVzi4am3/Z70IzfvurVIBduxCA NhY6zOgxPiDohF9vLPsHQ2l9JIziNLdZjjO1Pwka8yS/SCFgndkmUP7rLOep8JMIGaPX pjbm2vcKTcpgjMXRIx+05wgTvlUl4LjeVnq0hc5mWez4/T1j1cAZLHh4Ag+aOr7bJaND VvyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HPL++jCd; 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-201586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201586-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 4fb4d7f45d1cf-57a31ca5033si5531699a12.509.2024.06.04.17.24.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201586-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=HPL++jCd; 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-201586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201586-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 4A6FB1F22588 for ; Wed, 5 Jun 2024 00:24:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33B7B944D; Wed, 5 Jun 2024 00:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="HPL++jCd" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 C341E4409 for ; Wed, 5 Jun 2024 00:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547057; cv=none; b=Y81uy1GwQ0QSI+kr7r7kggQDVwByhC1ahG8d5vL74gM+Q6v3M7QyAy3FusBjnlNnrH8Y5tc3GxfQrM31fLGIFBvtplHNqNbJwH5D2LtI7b5xct99fg39KEQF9Q+q6DpdS6zZcHaWV4NU5lcBehHMgLRgDXC9psZkPfCLLciux6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547057; c=relaxed/simple; bh=kwdPU1qbN1GChGRQI4ADk5uJrc5stY/TlBaj+rld0uA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oL19gIr5e7EvDGVoC1fvSHNpeayOvdzt/sP59t8rMrUwZyFLBgf+o+p429w/sNUh+8xBkgxTlZBUQUNT272kGqpAXHFVAXi8bPxXLxfYmFFF3PdugDzpaL+VLo3K97Edqx9bT3VeL6YkuZqWbtK1pbyLL25H5ZrBXHXmUuACwPw= 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=HPL++jCd; arc=none smtp.client-ip=209.85.214.175 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-f175.google.com with SMTP id d9443c01a7336-1f4a5344ec7so2936295ad.1 for ; Tue, 04 Jun 2024 17:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717547055; x=1718151855; 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=XsRu3jEWU9sK1vmuNiyJjPrhOLNs5NH11TNjKSLZ2vI=; b=HPL++jCdAeWiQdvtuLhsMWjeeVQzSdwCtIZuweh/30rlgNKoecRIsxWqrJinEJbTr4 eJAjiTVl/CVK8lfpqZUNeONrovoNlobLqyILVOJs6KhCs7x7cGdOQWU80Kq8zz2op3cT acYBiJVFw/bveOJF1UVILKiw/zyMxQ12aznro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717547055; x=1718151855; 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=XsRu3jEWU9sK1vmuNiyJjPrhOLNs5NH11TNjKSLZ2vI=; b=L0zGc0YQpMtu5zWjltM7FEdCcFtVlq7IwOww6uTUjcjtxgLUsxCJa5OPw3I6dWViYD 3+OhuWdjjttBOPHsWhvTFdbBqaKAu96ZBRzXOfOD5sYOJUXrBxIIvUNzSBHbbOC/u1v6 7lApsp46+HxVUOSBn792GdLR84RBx8zVyf5edeNsK3pPUwk8lX4MmzzL4XuKp2P3Sne9 zeboBMXS9jD6EmcIM2laQtXXFkPjIwQ6+n0K1YHV42O4TQx8uohu9kI30twDNOmRIwv+ 8eQqhoXk3wlM+PYMcrROiQN2s3AL4USNTOp4Lrvj/pU31vKQHlIVxPnDGm+yZE7ub4UA H3SA== X-Forwarded-Encrypted: i=1; AJvYcCUC6dZ52VWNNyIGnQ7wQNQuCKURUtUNRCb/i8o5Q/ZhoZXJ65urpkohSyhL4SRf0s2slJuE7/9isR9DHUNyBO08QBx9EVvuuO6BDZuT X-Gm-Message-State: AOJu0Yzx41H4fwCVj5tCJTK7KsB59RYN6z2H4QBuyCLxuaxANnn8eIf5 2xD1rKl1MmlZmDnS/SwCRZJykMi6+PpWG3BoyFKFdjsD14PRbWQcXGrrkA1ApQ== X-Received: by 2002:a17:903:2303:b0:1f6:a572:86ab with SMTP id d9443c01a7336-1f6a572a1d3mr22763635ad.15.1717547055143; Tue, 04 Jun 2024 17:24:15 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:24:14 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Neil Armstrong , Yuran Pereira , Douglas Anderson , Jerry Han , Jitao Shi , Rock Wang , AngeloGioacchino Del Regno , Daniel Vetter , David Airlie , Jerry Han , Jessica Zhang , Maarten Lankhorst , Matthias Brugger , Thomas Zimmermann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 02/24] drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove Date: Tue, 4 Jun 2024 17:22:48 -0700 Message-ID: <20240604172305.v3.2.I19086c524d38f28f746befe85cb39ffda9d2f666@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. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [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: Jerry Han Cc: Jitao Shi Cc: Rock Wang 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-boe-himax8279d.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 12e14615298b..df746baae301 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -894,14 +894,6 @@ static void panel_remove(struct mipi_dsi_device *dsi) struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); int err; - err = drm_panel_disable(&pinfo->base); - if (err < 0) - dev_err(&dsi->dev, "failed to disable panel: %d\n", err); - - err = drm_panel_unprepare(&pinfo->base); - if (err < 0) - dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err); - err = mipi_dsi_detach(dsi); if (err < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); @@ -909,14 +901,6 @@ static void panel_remove(struct mipi_dsi_device *dsi) drm_panel_remove(&pinfo->base); } -static void panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&pinfo->base); - drm_panel_unprepare(&pinfo->base); -} - static struct mipi_dsi_driver panel_driver = { .driver = { .name = "panel-boe-himax8279d", @@ -924,7 +908,6 @@ static struct mipi_dsi_driver panel_driver = { }, .probe = panel_probe, .remove = panel_remove, - .shutdown = panel_shutdown, }; module_mipi_dsi_driver(panel_driver); -- 2.45.1.288.g0e0cd299f1-goog