Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp94372lqh; Fri, 3 May 2024 14:39:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVW2cx5z9t9+8Qi9k2jCwoyaokoQuA3VqHvyxP+XfICA7uxo3sj8u8WV8ceyM22nIq+FauRiwdo3jMRxashrOW1VG48DzOXnQ0udhBHag== X-Google-Smtp-Source: AGHT+IETr3qgNQUqsOa921r5ASW+tFcmCNeupLZQ2Dw/ViCtu/+8r06lpsLgP1OMd+mOyzmC35Za X-Received: by 2002:a05:6214:e86:b0:6a0:c9eb:25db with SMTP id hf6-20020a0562140e8600b006a0c9eb25dbmr4357920qvb.8.1714772383304; Fri, 03 May 2024 14:39:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772383; cv=pass; d=google.com; s=arc-20160816; b=Tg1ArHRB+WPxykkpPgMKXLUq+GesA103dhaRiIF8GyeUSwdzjiiJ0dSy1EDb9K0Inw 9mZ1/GkOctZ2TExSks7s+pdaoQzeiVZZn/g0zwfGRXpx5H2ejvwGy4ErC3qPCoJk9zK0 LCXYQxtg3xHCCJyTNO882J6Z7h+FZQEpeUq1WvxgPDxzQSFiG1GcRjJLHHx2T8q7tKtP ROiqRa3iGiXeuAnRyshIgAqXC2A0ih+GsivosFL33gfAcCKShcfNqg+C3C1blg85MkgQ kFl3AMYOFB+QWRxzTN4n7z/fKsoKVDOHoTUj8k9ZUvWMAKWS+Ky4IFxeFONjdNg++7xO 4Wqg== 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=Vb3TgP/wCNf81D+aV3nRlzqlLyhQoFFUaND2nsUQhqU=; fh=VQSuXKtphXpXPTAOvyqkgVVxbGRqWAh97S40biswFfM=; b=lsqUD3oOpR9uHTft6nLE5xSA0KEiOqxshAdBY+sZeSBuqdE7BC62bYEIR56W4gJ55Q iAxAULgtHLeJ4UrKpSAHfGze6h40dLxXvVeOFAGDqLpYnzU0z74r4GXC7StnMnLhH8eZ gP8tmZyyzGaOlpQ1QjeHqG1BSbH8aYdHw/sRe2d0CaF742R5m+w4OEwnES1j0/q5C9Y9 /MHeVJ87eDx0BM8BLtmKkzjGvVE1cDe3wDJrqDMiazCr34kW/nlc/h0TKZ76LRQGEpR3 yudtipMghMmN90IyfbyQ3bZO0sBYOwBObZmSkTzuEsPG9NsY/1AhCf9o+7wnEiWrJqrc XJgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nwblLWNv; 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-168277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168277-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 jf15-20020a0562142a4f00b006a0d2c22d98si4130164qvb.90.2024.05.03.14.39.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168277-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=nwblLWNv; 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-168277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168277-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 ECE701C21478 for ; Fri, 3 May 2024 21:39:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7C3571B51; Fri, 3 May 2024 21:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="nwblLWNv" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 60E4412F382 for ; Fri, 3 May 2024 21:36:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772217; cv=none; b=OzxHhQqxQEC+17V+FeCJInKvwSlhzM+QOdWPQcbAVoKypIv/e5Mn7Mlx0lvrZ/zJ5PIGWMiLeVgT23Hz088rVXRdH3yevHuAyVy8Bct3TSx5cnjZdEQ3E1cYVj0nUMbsBmAoqgISBLquc3DLY9m3lEhWMF3puPN55ePUYu/0lxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772217; c=relaxed/simple; bh=MBnyH8mXANNQ2wH6x1SnrtTpzMyE3MelDz2HOgqKRow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KITRoIDlE3Fgu29I34Qi6ZYEsBldXQXPxt4DeJGPjmVHt1o6FUdl28+UVtyfc27z7Fpn2mM1wE9/RMGNtCG+6hkvE9e/kk5FRaIhgD7TvVc+8C/Y5/2z07MydfePuqgWyz4JjoIBe92jPp4lLbP2E8fxCUe/GfchrOK8yaIU45k= 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=nwblLWNv; arc=none smtp.client-ip=209.85.214.176 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-f176.google.com with SMTP id d9443c01a7336-1ed835f3c3cso1038375ad.3 for ; Fri, 03 May 2024 14:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772216; x=1715377016; 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=Vb3TgP/wCNf81D+aV3nRlzqlLyhQoFFUaND2nsUQhqU=; b=nwblLWNvIIHb8q4WRA8BA6LcIblwz+OUJfxMT3S6xKoXAt01EIN/dRFW2Lhm49etHs qKGPVOGkhZMu93SGJ+B8b1xtsP6vkYFj8hBdR7EtEkUF/rRKvObcKU3h8ngXLG0+Lyk7 DhBB8Xw4uEuI0BXVilCnOpJ83SR57NXIEOju4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772216; x=1715377016; 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=Vb3TgP/wCNf81D+aV3nRlzqlLyhQoFFUaND2nsUQhqU=; b=FVhDpAKbBuPxbzFWEA3OfJUyZtledFEGfS7CDOCUVzGul9ptaCT/24ScaHL4DgFrgB TR/J00sYUP67sjP+kjUTA3unrxA8xp8BySBECF+/NLJD7E2b3DyKvrHUap1/Q9v78QF5 +5gLRhfdy5SEwXxNJ0bGroRKrj9+eNJFOb664vElOMbQFUQywcmHpg3AEFO/P4hTIZ39 eIMwpLOLYZ67rloFKLYNdhd/i895xlFVyBM3LxoOWZFVbZube65P4+wCwDRvcd7X8BtP SohqGUhr4X9eLqHcZAF/cOQpMFKj6CwujmHEcXNc6Wck0bEV6I+132zcWxUDMW0Cw/Of L95A== X-Forwarded-Encrypted: i=1; AJvYcCVV9k0HBCi/sCQ9q2WhR0qn+QJTCMxgEfrCoHgP8l3Ob/WcR/fKYUG1FBX6jDXbmn8YuF6gI2C7TO60fvkn6Zf9Wh5YUFXlcUBnGOiM X-Gm-Message-State: AOJu0YydDG85CC1vAY/kzOUmrP7rkvDJj+umLxwrl1GE5X6byOLfIk2u CP6Aps5/fel8O4EmS8dTfprdLHt5MjfM9H5xOCU5aWZ3lX8tbv+p0cn64wsDNA== X-Received: by 2002:a17:903:2306:b0:1eb:1af8:309f with SMTP id d6-20020a170903230600b001eb1af8309fmr5572876plh.4.1714772215701; Fri, 03 May 2024 14:36:55 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:54 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Brian Norris , Chris Zhong , Nickey Yang , =?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 13/48] drm/panel: kingdisplay-kd097d04: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:32:54 -0700 Message-ID: <20240503143327.RFT.v2.13.I6c7c84b1560dd374f6e7e8dc50f419a870d31d31@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 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: Brian Norris Cc: Chris Zhong Cc: Nickey Yang 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. .../gpu/drm/panel/panel-kingdisplay-kd097d04.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c index 88d775e000d4..d6b912277196 100644 --- a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c @@ -389,14 +389,6 @@ static void kingdisplay_panel_remove(struct mipi_dsi_device *dsi) struct kingdisplay_panel *kingdisplay = mipi_dsi_get_drvdata(dsi); int err; - err = drm_panel_unprepare(&kingdisplay->base); - if (err < 0) - dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err); - - err = drm_panel_disable(&kingdisplay->base); - if (err < 0) - dev_err(&dsi->dev, "failed to disable 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); @@ -404,14 +396,6 @@ static void kingdisplay_panel_remove(struct mipi_dsi_device *dsi) kingdisplay_panel_del(kingdisplay); } -static void kingdisplay_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct kingdisplay_panel *kingdisplay = mipi_dsi_get_drvdata(dsi); - - drm_panel_unprepare(&kingdisplay->base); - drm_panel_disable(&kingdisplay->base); -} - static struct mipi_dsi_driver kingdisplay_panel_driver = { .driver = { .name = "panel-kingdisplay-kd097d04", @@ -419,7 +403,6 @@ static struct mipi_dsi_driver kingdisplay_panel_driver = { }, .probe = kingdisplay_panel_probe, .remove = kingdisplay_panel_remove, - .shutdown = kingdisplay_panel_shutdown, }; module_mipi_dsi_driver(kingdisplay_panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog