From patchwork Fri May 3 21:32:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13653501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25ADDC4345F for ; Fri, 3 May 2024 21:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qkF7ac41bcVtYeEIezHW+PFr0pbmRziq7/fuHjlUWIM=; b=LZsDqzfK6ZBk0c K4BD5qIO83TvzVF3Y61NVrpRQlQg2pwms41PgjMkQ9LThsG6h0vul4x1XT8FvJOIjMhEOn7kskw1g V/j+bssFXYVDTbx/6lL3bMdmtXcKnL4F/ohzZ2NLsQvVqA1RxboeeX5x45OQzpdHl2l4OHa7k2PSk IBl4R/AX86yVQdeJuR32VmrB5k9kmmVy6MVxhoCR2dDeUFb3TtovmKmLQY6xLTFh27ebta4cKzIPO PAmxWjZ8jkJC9QANyDSMZuSKtdB1sKWZmfqe83N5gK/sPM2oLMpZ/u2WlV1L2vMVAHptB9dZFQn8H xzZO5aO70hjvOKllW4lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s30i5-00000000UK9-1xDo; Fri, 03 May 2024 21:44:53 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s30i2-00000000UGq-1FdE for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 21:44:51 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-de4665b4969so133533276.2 for ; Fri, 03 May 2024 14:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772679; x=1715377479; darn=lists.infradead.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=G7JvCv/wdVUsGEPaHfLuGQGaFgjOMt1PHx2y+wdLkXZkn5vlUV2QiIbRRh1qqxMQDP 8NaV9lfZOKF85RMoNmvGvyPXKC2CkMpGqwZE7XJtVKT51p/xDrq3P0r+fTQBHJaB2S5a 9dt0TupdmSVWC45eldKpoGAdWsh7fo423eG2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772679; x=1715377479; 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=HkfBZqmCsK7cDG1kmMsPGHPBlbiq8Q7SJlkyvcGLIfM+etlEfZrJMVXGtLUsqznFot ZxfJurV05TnyvjOvbXImqb4qg9mrgt9D6Wz/H0irEnZbhMQ/ToFybSn3qKLX1V5X86k+ 3f5g2/LsW5eRcVpPLA/rkQQBqnmGIzvRuI/RLCX3Dbv9aRywvh3o3Yt0hqCj/IqQ13JE 6OCxCnkDyu8JXMkFDkkAUSla2T0x9FT2EAJmQeNCx2kd5JgUEJJV+reyjwJecHztB+U9 ph7OvVl8DOddPKWaVs/d9yDT3W1tjij3EdCpzGDLZbaQXoLOpC/jTRDbXvV7ODDAUwiY dxmw== X-Forwarded-Encrypted: i=1; AJvYcCUjwGJoB+KhkjERiAyYni02YfxikHgUUpx3eVk6Ck8096I4Leo5bfemXxSyTWYgCflyCmhqOOjTbVvhrnKSTRBVb2UI3PKnDN++YdQU45omHC9OhGs= X-Gm-Message-State: AOJu0YxlkLjgWuyIXZfuiBuefB9n20NaDh3cPXDYXF+FxqtNs73ZSApd 7hhKGrEKlLbo181HAVg/pTlK5i4UEvp4PzdO/6tj4T6pFmE7QMMAWi/28ffFye0vzPENRb3AkOp iFQ== X-Google-Smtp-Source: AGHT+IHVhWhn4/nQtVyQZZLqUsnywWTqYGnhPIFneTo2Pek/30GOWy84nbyfus1Fy+LIRhpR3w7cFQ== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_144450_342881_28FA0643 X-CRM114-Status: GOOD ( 15.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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);