Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp94557lqh; Fri, 3 May 2024 14:40:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXf6ufjPtjCtbETjPN0FmMF2Wep2RSvnJ5YwdiFZRy9owZNhp/+qYpQeeFg+LCXXNtIrQZZSV1nW68Uu5A7LcyYaeg0vn/nPvo9ESUpIg== X-Google-Smtp-Source: AGHT+IFtdVKaDxCs3UXXtmoBT0m7cOHg/YyAg979LoAbSpZ+KB6CUgzxaufmQbW6HxrX9Iz7Hy5w X-Received: by 2002:ad4:4ee3:0:b0:6a0:76fa:a323 with SMTP id dv3-20020ad44ee3000000b006a076faa323mr4800271qvb.4.1714772410763; Fri, 03 May 2024 14:40:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772410; cv=pass; d=google.com; s=arc-20160816; b=kPuaZoLt8+H0nUQ8zlC/skvPw5pTILznwu828koqgKgM3kjcydLlKLBSk0SKoo5JHo RTUbyBbsboEU7XOmWAz36/bUN3a9Rd59/dcl5e8cldXJ42h1XD3fW0DODeTLNHkDP4J+ lv2IK7HiAG33+6a7etyGeYSsMI5vyA34t6rP/ylhCQJQKTqOS9HyAb6C2qY1JYc3PsQd Kh3stSNJ/4Oim9mLuGE8d9HSgYPzXOuYrR0DtADjWNKO01LpswtNrTnzJ73BVi8/m0El ivBp3cWMYMDvnr4oP2/uiot5fNFnXwp2Al4iYenAj5kwCe6Frb2EzYaprN38iFr44Ftc dXIQ== 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=8Y9nTdENQ7Wsy544i8JrWRgyMyQ3M74fjSP7BIF4QEI=; fh=kdVjqLaEcmt/5FqBVZUevAIGdvqVVOchFHxArbST0nM=; b=Llw79bXjx5+LFwndzIq80XGJ8aaZA3uMFt7bNdN7g30xWmhbEgBDg2bDquxZlJJ/4W PLQlPE79qS58jpBILBk/xGmbL0i9093ytwjULXPzfdDUXXt8+hCrRLykRFolr1ngrxuw FbWhyjAT19qGab03W340bQdnYEpT6gm6sY+OXGkEUT8J/asR28fxTgLg66C0dK0CFbjD 0hA+gAhcqtkBqcMdaJHFGhC5aCRVOFkzuhSBC6uK57SmMFxXvOeXgsX4/tiaFQ3xLrDH oMrd2MFesvs1c5OjU4OwPI8l/uG2RdsmhVvwBwdP/qeKYCgHdxoaKXy2X/T8aOGjljzo ATCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fOEdVGa3; 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-168279-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168279-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 t3-20020ad45bc3000000b006a0b509dceesi2720938qvt.261.2024.05.03.14.40.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:40:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168279-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=fOEdVGa3; 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-168279-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168279-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 70B6D1C2311E for ; Fri, 3 May 2024 21:40:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3D03762CD; Fri, 3 May 2024 21:37:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fOEdVGa3" 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 A94C912F382 for ; Fri, 3 May 2024 21:37:01 +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=1714772223; cv=none; b=P5CvSxYKpMXywLx6fr0LUmGPMo1NBa5W5ItE5hPTdRFa8a8O4BXLPV65V4tbXvqAME6jDMqOGU433sltcAMV7kvWms5W1xmIdTqQoE7GSn1IZp+WWqtcKi7cy48A7yB9mtuzttEF3cOFm4bBB9/Toi2gUZOIiEFAqA2u/zoj11A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772223; c=relaxed/simple; bh=ofQg9FgdPDQqQAShgmMqDyWZORG0+F8zbwQrNcERnsU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QMV7fjJ7sQF43N0eqMN5mJhJXwJnkB5jacqUErNQI37iWs6GOEi8hZ3uaUIrJXm4cpBcjf4W+aDjbI39YOljN27u3LWFvk0sTZ8mMNYpK8IeFkXQxlYTljb4DgBVcf3PCCwRA9KMDTolNojmxKNX94xFCFusKsDrETFB5h8AWsA= 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=fOEdVGa3; 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-1ecff927a45so1150235ad.0 for ; Fri, 03 May 2024 14:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772221; x=1715377021; 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=8Y9nTdENQ7Wsy544i8JrWRgyMyQ3M74fjSP7BIF4QEI=; b=fOEdVGa3biIGHT6JfOdgWL+Hzz/c6l+VwGM1SQDQ/PKXzkp1LeTrnJp5glxW8q39De c3Bu+V/21JbzD2zSwnib5Fm0z2Mcxg0L4GQWh2PJYZu2L/n1VmOXIVm8EFT/oOQuazgV S3QVeiQhO4SkGWlySbYapPo1ud/umx6W+btO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772221; x=1715377021; 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=8Y9nTdENQ7Wsy544i8JrWRgyMyQ3M74fjSP7BIF4QEI=; b=FbxNPQMN8iNj34JG5OYh7zC9RMVNp7BYbirDF3ybbMxDqy15Mrz4X7RjvANRxdB+Sb V3d6vhz9InKr/OkcGO0NJPwpGXXuAGDycIqnpbez7DSpw/NcKyd0wXsrsGfAYy+u1nGD Y1a1Cp+z5VQYmwMyq2lVucNIfJX4ht0rgcziQnh7fqrpiQDBzwaR204bufBS7zSMG2jA DQriyH+NTUf6UgwqgkPkjsoggDFtWd/pOMOG8UFj67Pm5xssLVFBgxL5VuPfQ9YMGKaW eW30D0SgE5/MbWLoGG9YvB+FAO6M3Mehq7p1k55Bu1txHccUiN54auR4u7E5NzHw2+ME 0XzQ== X-Forwarded-Encrypted: i=1; AJvYcCWDqAtL1GX4KCVtGZ/v93g4jMvsfaVsRtDgGjaR3fgA4FIysON7ykHWsMT4Z2dVc82SeSSsriemD/0743PkNiK7Sr5rq89XEqGVArFp X-Gm-Message-State: AOJu0YwakG9/2ycBPUNSzEA+LhrkWdUQvCYCCZiDxLrnp4K6pIKcclnf FxmUUyZfo0F+7s3+j6Pe/pzh2MSsnWqmzL2wMPDqpAuNhEDMAfrQUCQZ4W02yQ== X-Received: by 2002:a17:902:a60c:b0:1e4:6938:6fe3 with SMTP id u12-20020a170902a60c00b001e469386fe3mr3701239plq.58.1714772220922; Fri, 03 May 2024 14:37:00 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:00 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Quentin Schulz , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 15/48] drm/panel: ltk050h3146w: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:32:56 -0700 Message-ID: <20240503143327.RFT.v2.15.Ibeb2e5692e34b136afe4cf55532f0696ab3f5eed@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-Type: text/plain; charset=UTF-8 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: "Heiko Stübner" Cc: Quentin Schulz 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-leadtek-ltk050h3146w.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index 5894bf30524a..292aa26a456d 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -673,27 +673,11 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) return 0; } -static void ltk050h3146w_shutdown(struct mipi_dsi_device *dsi) -{ - struct ltk050h3146w *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = drm_panel_unprepare(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); - - ret = drm_panel_disable(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); -} - static void ltk050h3146w_remove(struct mipi_dsi_device *dsi) { struct ltk050h3146w *ctx = mipi_dsi_get_drvdata(dsi); int ret; - ltk050h3146w_shutdown(dsi); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); @@ -725,7 +709,6 @@ static struct mipi_dsi_driver ltk050h3146w_driver = { }, .probe = ltk050h3146w_probe, .remove = ltk050h3146w_remove, - .shutdown = ltk050h3146w_shutdown, }; module_mipi_dsi_driver(ltk050h3146w_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog