Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp94025lqh; Fri, 3 May 2024 14:38:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPP+dgNfNoswk5E3zw2d2Rr//7wABsj0UOG7GJmjzHrHbLzmcIg6f64eAz8TQf5vYZAbfWtt2ai+ZL2zThthejK9u/Izs5tYk2Pd0okg== X-Google-Smtp-Source: AGHT+IExXsnjgLNfFxwRxbz48pay/im4be/XDsTwSGLyNX7/yyLJrG8eJLdeGGzV+S03QVMusLcx X-Received: by 2002:a37:e20c:0:b0:790:8cb1:16e6 with SMTP id g12-20020a37e20c000000b007908cb116e6mr3474511qki.60.1714772330394; Fri, 03 May 2024 14:38:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772330; cv=pass; d=google.com; s=arc-20160816; b=JsPQbqqR3CZBdKzYDXgkCkNIdSfIZ6gSKif/xHBjyvqR29YSiXr6AyAWLlkD+d9QgU kort6LE3noLpLgGxrgcgaTQVLwcUboH0IQ3iPyszqK8daGRnhm2YTBVMDR0nkLYQQ6Se H/MgzOA7/z5W7R4vLmtxOfBh7fONoWuVV4QpIQdqkSTYFTLB3/Yx+ofZF47R+J6uLoyI zjn7UAV5vYPdM10XE68SQ5iF6Vd11Jz76XsyfZGKuy4Aw0I2fMPqGzrbG9jNRyo//2Wd 9Ch8/vdD5EGR3Qa62GTpJ/v/npHyzefcEtdwD00YflXKkQrpmBmf1nt/VYTZAvEI/YP0 iFxQ== 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=AM3srp3tc9xHdA4+vQgvWU13AmEZ/1q1evFgoZKKMpU=; fh=GSBT8h80IONhWElD4oGYyzVqYcNvDXFShg/n3OHnPLM=; b=e39gT1tn0DwRW+2K+Lkz8aGVSAQDiXuvPECzT04Gvh0M0By/5lt3C0ovrGsOlidR0p hl6cbeQflt3wGdSCNUGr7H5EPCtadq/b+IvJ6GK5fJRPzwEFbYtbRN0LK4Dgp6oLNKUd /eYC8H9SoORutJ0GbVUK5Tmm1Ci2M/f0xvGqdojZbSmz56TZ9CnkV0kJFo02w5OXGL8f /RZNB61BlsTXchFXykUB6fc8EB0hjNtPE1zGf+L3drptJOXsto+K4q+vziM2X0ErsiQ/ n2LADZgN0lQdhfzHsnhDRJWy9uILDTjr+CsebU+9Mp743JBDRrpt+zk5QtoA3buPRBqU iSGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="e/yRfOcP"; 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-168272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168272-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. [147.75.199.223]) by mx.google.com with ESMTPS id wm25-20020a05620a581900b00789f314248bsi3973245qkn.659.2024.05.03.14.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="e/yRfOcP"; 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-168272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168272-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 CA1EA1C23C29 for ; Fri, 3 May 2024 21:38:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BDE7126F2A; Fri, 3 May 2024 21:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="e/yRfOcP" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 482F68615F for ; Fri, 3 May 2024 21:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772208; cv=none; b=bsM1QdRBMIRclDQxGLI3LUrjbIcXzy2OHD8rZ2/rUeydH8mo9Tn5cVM4gzMq83DRIZQDYUOwqQZNMmnPhbisviWDsIYJEwCO2Ua0d33Fw4oO3TmSv1AsJiGSRDpRhXTu6bgbcd/TwmtJ3rmBiMEuGo+vXTiGQyLDTfdXLGGrvfc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772208; c=relaxed/simple; bh=Ls0hx0BhTj3G0QRMQs+tqGMhFB+yvlJdCpWTrSoM8rs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cLxFmgoYbc/MYwCtNTQaponrepFqW2wyWnytLQR/6XOQRxpgWyTsHEwA5T3GelH034ZZE3Ot9YBijLmpDHYuoZLh1+7M6YkHWD3h+dJm0ZibXS1nMGADo8YxdDTAFGihV32EOsV2xxpyEsGXW/RDgWSB99/zwJkXHCaL7GbgwQU= 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=e/yRfOcP; arc=none smtp.client-ip=209.85.214.170 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-f170.google.com with SMTP id d9443c01a7336-1e5c7d087e1so1044575ad.0 for ; Fri, 03 May 2024 14:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772206; x=1715377006; 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=AM3srp3tc9xHdA4+vQgvWU13AmEZ/1q1evFgoZKKMpU=; b=e/yRfOcPp2+qhZoSzW6aNc+ojRklJkTmQzVL/1ZN4PNY8jTbJyouM+E47OHrT3psbr A83I5VZNIlDcFJ5uAseBQvalFdE7YgThzgBm9w3C9VUCtbfmuv9S5bsnPJrmWGyLDA33 ocRpSFZ0RTqsdInua0eQre+1FPY0MgO7FzH0g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772206; x=1715377006; 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=AM3srp3tc9xHdA4+vQgvWU13AmEZ/1q1evFgoZKKMpU=; b=DhWocMGw/n5aBcTvAC2q93yTvkhjUINl/Fehl30tAhw0okTgRaM4EJDTc5rOdFnGr7 A1khPWfXbSiiSZPcLEdp0A8e1Y2Dn2FvFNKNI4iXLQIIckrYlrOARBvYA8tA9tyTa3Fi EEjjI3nBoHCeEgNI1H8YuN27PE/MGL2NdsDxTDAFe8DBv9wpZuT8acVacdehgpoIDRP3 47ih/a+gzGjZ+IKN9lbcK3oFFah2QO9JCbBejIfQJuCXwYNirpAVn/DSJ0SuBLjTglHb YhAba4ts13HiSSjMhiSh6RmDyNb6/3+z6/E6MiqluQDyMHmCKDAaDNxELV03riCum1mC CXkQ== X-Forwarded-Encrypted: i=1; AJvYcCVKtprxksnMDRjBBdKLyP2XHiW40q9epDzB7LPtIhYr8PgE3aprMJPbHZHMAf880q9a3mRWibbCKYiH3K9+7BUoRiutu+dvUXS+owir X-Gm-Message-State: AOJu0YzGM0kiLpS+sauEfR8RGq3OBI78OHqoam3EjbyF8RVc1lGkr6zx vqEbLwTuA9lAirdyVeO2YMoL/6pm34OP+p1W04W/VVG6JzqtXjJxTaFU0Mjd2FIdjVLfX/BTzNo ZCw== X-Received: by 2002:a17:903:1211:b0:1e0:115c:e03c with SMTP id l17-20020a170903121100b001e0115ce03cmr4713172plh.53.1714772206553; Fri, 03 May 2024 14:36:46 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:45 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Chris Zhong , Lin Huang , Brian Norris , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 09/48] drm/panel: innolux-p079zca: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:32:50 -0700 Message-ID: <20240503143327.RFT.v2.9.Iaddb8e0cab570e2f8066a4baf1d49239a820b799@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. A grep through mainline for compatible strings used by this driver indicates that it is used by Rockchip boards. The Rockchip 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: Chris Zhong Cc: Lin Huang Cc: Brian Norris Cc: "Heiko Stübner" 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-innolux-p079zca.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 5833d3a0fc79..280f0fc35b67 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -471,13 +471,6 @@ static void innolux_panel_remove(struct mipi_dsi_device *dsi) struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); int err; - err = drm_panel_unprepare(&innolux->base); - if (err < 0) - dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err); - - err = drm_panel_disable(&innolux->base); - if (err < 0) - dev_err(&dsi->dev, "failed to disable panel: %d\n", err); err = mipi_dsi_detach(dsi); if (err < 0) @@ -486,14 +479,6 @@ static void innolux_panel_remove(struct mipi_dsi_device *dsi) innolux_panel_del(innolux); } -static void innolux_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); - - drm_panel_unprepare(&innolux->base); - drm_panel_disable(&innolux->base); -} - static struct mipi_dsi_driver innolux_panel_driver = { .driver = { .name = "panel-innolux-p079zca", @@ -501,7 +486,6 @@ static struct mipi_dsi_driver innolux_panel_driver = { }, .probe = innolux_panel_probe, .remove = innolux_panel_remove, - .shutdown = innolux_panel_shutdown, }; module_mipi_dsi_driver(innolux_panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog