Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp95744lqh; Fri, 3 May 2024 14:43:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/kB/SELKDygJ+KQm0em861pmpZpz2uLJQW2BMw+EqYnCnxYc7LURm/r96eavHeWLbLbjiMHqbUWYNE2TJG9qi5/klVFJqI9UeAo56bg== X-Google-Smtp-Source: AGHT+IGCPSqsmcvrNxoCVJXEz7rDVRLFFWr0vtsLyP+nSdoPHz7kRr5TzvWpqounMJNWvh8amTE8 X-Received: by 2002:a05:6a00:a05:b0:6ed:d8d2:5040 with SMTP id p5-20020a056a000a0500b006edd8d25040mr4038031pfh.21.1714772586644; Fri, 03 May 2024 14:43:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772586; cv=pass; d=google.com; s=arc-20160816; b=yidCR6ogidWiPhDIKiLM7c9Zz5OhHvCYZlzFQsff6umWNuflKvyWm8RvQ7aL+UZHnk TsMvHAPFs9FTduKxb1MKfezzM1sxBgyjvUSXyYylWEdGQXOKDdSSwwXL+WuXyRS/TaKr 9eHazdPebd0NSjkS4oybfxYxPOGyatXa8ATOqIra9z1P9Kk61hiQk2liXGNqBj4NyOoO Kde+wQCSdYh260Q7B9nB2z1tXIzZSV3ceKycdetG7Xky5FUAyi4xSBFkMk1bvFo/pmK9 9yrIS+5bTPZ9BjCvA4ZKj+F7htwCbkpxXMNcodxZUfGXqJom66Hf9WIH3hgj2tbCnL6c of7A== 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=Kta59gfQkdmQ0TL4kfPKXK/PL72P/0YD8zIuorS00AE=; fh=vRxpvY4ELaGWaqFnuuNt4NvL96YQMaAZv1L3zynzbeA=; b=WXF+C2FAimL8UXIvpUujdfcWNFtkK0BOIvUj/RYtlb57R4DM6XWdfxqtrjb2Dm3LFZ nk754qPXgvhMq7K7eHNaVnOj3eKGS+GzBU2YTMOyZQ79LrF857ghqjqneghaKVOoi4qb 8ehBvdnY678E5gch9A5wiHzyChSA1w9GOTf0XJxBGraad+sD1mu/DBGW8WsUFfiWZx7W 4wKiatit5cXpjR1cc9yz1G32Alz9H9SXNCAlVzumvjiJV14vaSESoggQO9XKWJWl2gLX isJ9+tQJJ2yeJeULsezk6kz+Y+WC4qlh0DrHDBJ4CfJ7JC1E1TCIAfmZh0MBnB0pKV3z mINQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RKuf7WuA; 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-168269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168269-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p16-20020a056a000b5000b006ecee76286bsi3724608pfo.233.2024.05.03.14.43.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:43:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RKuf7WuA; 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-168269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168269-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9E435B24662 for ; Fri, 3 May 2024 21:37:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E922785284; Fri, 3 May 2024 21:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RKuf7WuA" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 897DE84A57 for ; Fri, 3 May 2024 21:36:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772202; cv=none; b=BJw3IfBy1RH7wLrpGz5oU8U2eh2ZguUDwAJJ1Z1WX99t5bHnVtfdKKpHtkALCzlku3ZeEzMP+v2wMYPeRkrGm6RhZaJbnODBFzznts11/b/sb60W1ghrMUTB3W4arfAaYx1giGTyxzPFDl2LBfCtQlnJV6ukZqNHNTQXzt564fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772202; c=relaxed/simple; bh=Xl9OtOjknJgxbPeTWau1v9EcTyLAEVp1zRV24ZssokE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g7zJTStZIZcMgNorjrQLYkRIUNdjfQhz5nMK8j+bjE4FHGLncfiwlMcDe8yBnCKJkMGOm449R/XLN6xwlYsilEdXx8b34GTMimn2rI93JKJxBMvdlxOBp2zhHuHHR3N1U8vmZWE+AabIj6/3AkBHEtkE8NgEjaUwooatSKwWpaw= 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=RKuf7WuA; arc=none smtp.client-ip=209.85.214.178 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-f178.google.com with SMTP id d9443c01a7336-1ecddf96313so1021655ad.2 for ; Fri, 03 May 2024 14:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772197; x=1715376997; 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=Kta59gfQkdmQ0TL4kfPKXK/PL72P/0YD8zIuorS00AE=; b=RKuf7WuASvpstKfIfW3yhShTNOQuEveO6/fLm1OPufay7VnTcsCAE0JdmZ/2Hu0E4v dFtZePu/kZf2y0jem3OaeKKzxgu44HaOj9TPLbaJ0jQbvVzO3cvln0bvHxZqYKKbjvMx KnFEXgkCML1RQOAzVdK21JrcoKKDbCaQp0ag0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772197; x=1715376997; 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=Kta59gfQkdmQ0TL4kfPKXK/PL72P/0YD8zIuorS00AE=; b=scScBsroathzlQYfaLp0KAIfHdABABSB0sMCmrleekcYpteyxUmSzSKrPd1nVIMDpc Pgz5iTz0Pr27Yg9jIsEOQSKmNfyysWxNZMW0Yojtr7X5QHlYXK7HYJFah9AkipkiUfnM n447A1pznqovWTRotbBIB8GqjqF8fbkaFWLDXQmRrZ0iymwBDGt9RA5inRopCqnpPM9P j9eYHFEmdo9BUKCNxQU4DgihYWJIcY6JZxHIfg3J5ec7Q7DKbbmA07NXDTjgytqn1cL8 pBpx7oFk0nr/7ynL7A32okcGtTkh9JfekE1w1mnuekG0RJV6xu4gN1NTtzAPjPqoJqDf Ysng== X-Forwarded-Encrypted: i=1; AJvYcCWs/c6hlfcD0hVxyVS+BAhWUAFfj6JM+fyFCVcyzFs42pqeod4ghrPTFYIgbUAY5GtQod7Qk/XSG61BbbAnpWHpRoSTCu0i0jh4f6n/ X-Gm-Message-State: AOJu0Ywv72mQGoNKYcymmdjT3ediqYhFPYXjPrJSVkZQrXTyKV7DGQnb 4KN+V+TnCuOMqV+q6QEfDbytnD/WtCB69/lCpdoORnnkcYA6i8PZdIlSOCf9Fw== X-Received: by 2002:a17:902:d4c7:b0:1e5:4f5:7fa7 with SMTP id o7-20020a170902d4c700b001e504f57fa7mr5769734plg.21.1714772197003; Fri, 03 May 2024 14:36:37 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:36 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Jitao Shi , Cong Yang , AngeloGioacchino Del Regno , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Matthias Brugger , Sam Ravnborg , Thomas Zimmermann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [RFT PATCH v2 05/48] drm/panel: boe-tv101wum-nl6: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:32:46 -0700 Message-ID: <20240503143327.RFT.v2.5.I5bd120aa0b7d17a1149ea43cc4852492834058c0@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 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 Mediatek and Qualcomm boards. Both of those drivers appear 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: Jitao Shi Cc: Cong Yang 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-boe-tv101wum-nl6.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 667e1bb4a58b..77b20e24cac7 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -1910,21 +1910,11 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi) return ret; } -static void boe_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct boe_panel *boe = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&boe->base); - drm_panel_unprepare(&boe->base); -} - static void boe_panel_remove(struct mipi_dsi_device *dsi) { struct boe_panel *boe = mipi_dsi_get_drvdata(dsi); int ret; - boe_panel_shutdown(dsi); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); @@ -1972,7 +1962,6 @@ static struct mipi_dsi_driver boe_panel_driver = { }, .probe = boe_panel_probe, .remove = boe_panel_remove, - .shutdown = boe_panel_shutdown, }; module_mipi_dsi_driver(boe_panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog