Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp97143lqh; Fri, 3 May 2024 14:46:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXVp4HHMRJEVNZk9zWBhXUePCOl0/5lDBFQym6ymGLODJ0reX0tjlLcyfZZqVn0biLqTFODUVVTj+Arzk5KbOLRTKwhs53+Aut2NrFlTA== X-Google-Smtp-Source: AGHT+IFHxmRh7uW2558MtBKZy8hdu5xQLQP9pHe7kD0X/HNcLLP++w1FDLTdYp73wOKE3emoEST0 X-Received: by 2002:a05:6359:4582:b0:186:5fc3:e415 with SMTP id no2-20020a056359458200b001865fc3e415mr4663465rwb.26.1714772797988; Fri, 03 May 2024 14:46:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772797; cv=pass; d=google.com; s=arc-20160816; b=TDvpWK74H64IOA3RRRiwDsc8hShaOJb4XGtIWu32PZjfH5MFJ1Nc1Cl9dmsq4G//vY 4XJNz8fy81JTBspcFjKMv0cOaooKYCOZCrsr3mKuS/iP+D6iXgXvodHv0tFxdyffREOM oaWxPDm+YnEOONQgKhrEpS1emLFbzF7hc/Mv5H4PCPxEBixoyqSE5gTDJD/u4x23VGvd KL9wurwFx1GRQBV9FU0bO4GkM6ISrXZrq4zuLffOBmDqkf6mZfLhMcocXOPUM9n6pFOI djpTnlmjUuAtDI+j8iBuvGhmhQw+uX+Gb4EiWwSvUXts8+D4tcmsIs+OEG6N6kMgcUsG UnsA== 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=jCEzmsJkNVqJjLKEek1G559OvdmwxBqijlKTr/wX13A=; fh=A3zLuhGLuGKugHJhXNWxCMJ7snkvKYjSFaoBE0DA5aY=; b=lnPeWZQTcGQQAjeMznYR4BNXkaVPv8xiO/jSdPvtEFRPTgDE/Sb5pM17ajsoDNfe/C GtpmWsZkKgUX+j5cGZU3QJ385sG26e6XhFfYmkpwToQ0jNu8Z4SA9IT4kuB4qE1wcajr MdJ2Yh7GQJm0Lm1joHU3iUCDt7JB0BhvQKR7z6DLZgRd00g08mAQeQQVlw4NgxBpCN5h WOvkOWvqXcpR+DLwV6dGpJvBOgHTNUYr0EkLROOU4KzuLu/20RzqyV+EqYwB4GFdZJKb bYmQm84ZgL9w+wnR/YVezAnLGxTH6D/ihUhgyksiNxF3urPQuG7SvnszXet8KhmIu+6R cDFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Y1Dj/Fdc"; 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-168283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168283-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 l63-20020a639142000000b0061b531049desi2883938pge.263.2024.05.03.14.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168283-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="Y1Dj/Fdc"; 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-168283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168283-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 309FFB25824 for ; Fri, 3 May 2024 21:41:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CED41311A9; Fri, 3 May 2024 21:37:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Y1Dj/Fdc" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 9A9FE131184 for ; Fri, 3 May 2024 21:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772232; cv=none; b=Vf6d4p4bobTChIEARUwOFn9P6XM1nqtjuFEcJoKlvPn9KcTZ1U579wdmtZCwyBlBeFGcwLQ0G+EkuwZSqWpva6ODUMGf5/Wzm/Fsg8FWdjL96VAcZTowUesfnuDPzclGi+2n9H87PapMZAtcKraaTVeRQ8inG7CcCzAv41NJFwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772232; c=relaxed/simple; bh=fBAyG8ZF/YZRA5320CSXCbxyFfF3cr2FGMyGleTMfpk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oXSRZPRh3k2Ev2nPq+nfuqRHZSxncM5iCyGc5z32HiYztPp8JbF3JVJElopWV/6PC6qBg5N3mRAGhiX/PKXXbMRWa+jh3x444ZBkFOD0u9Dl1qOnKf6505y8OwS0K+qsB22vuqFeMJqOlo+R10F9Hi3OTAfOiVYZNVUswZDUpew= 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=Y1Dj/Fdc; arc=none smtp.client-ip=209.85.214.173 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-f173.google.com with SMTP id d9443c01a7336-1ed41eb3382so1029675ad.0 for ; Fri, 03 May 2024 14:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772229; x=1715377029; 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=jCEzmsJkNVqJjLKEek1G559OvdmwxBqijlKTr/wX13A=; b=Y1Dj/Fdcrt28zdpemderW4vfG5nQpv7mSO1+ItxkOZ3HcvBsR6gXIuduHB5OARerfv PiXygsxbhrS/AHoAlSUKjgPq9WBr5RA0UdIgWSsOUIBurJQi+FtCoAJbE4aKFc5aljK4 eUYjzpaMmbiXyg5Yoky7KdwNsRyCsRnUURfD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772229; x=1715377029; 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=jCEzmsJkNVqJjLKEek1G559OvdmwxBqijlKTr/wX13A=; b=oMEOucyma9O9seRpJlhGVzmlwdr7mcWxIuuukBqKtAam2ke9Pj4ppiwWWoGFSmSJBt mAKDJNoJ6g8fu4taVElRF77QxG/naN4NjRRtWdO7T9p4YtIh+avArGi4FGiaV4lb9yQp yzzaq/ABv0dv8XfBp+Zd8mFFuN4o+Fz6Tt9N/ZeCeR/K6mjLIzTD4ntXvY1GAzqsLQ6R 0ANoz9qDMFzhwalMQ3IjeE6qzhXjGEgLyxheWf+tTTbzdQnqe8JZsMLTCmQ83NXkT8fV ZcQevV8FYEvecmeGlPCPNUquyHl1cr5PpJFnEvrAe6LvFCJMzcyYcnmsXkDFGxdhIBUm 2SVQ== X-Forwarded-Encrypted: i=1; AJvYcCV1Piu9I9m0er2t2DZ1vA4D/X0delcMiUmpYsJN+/WfLSiA7Wj7oxAzLSEFq+Qx8nx23r+q7yaw/dhEW65fj8B9zFMuqFECouXj3d5t X-Gm-Message-State: AOJu0YzXcC22ETvFZsV/OZ1TcHNp+1hiOoLBK3SSbftbrDaJLHMkO6Wx 5OQHk6kKrGtXfP1OQrtPLX05j76mztopzI/lwwyJZ/8W1CoeebMvolVaH1lqWQ== X-Received: by 2002:a17:902:bb17:b0:1ec:7b0d:9eb9 with SMTP id im23-20020a170902bb1700b001ec7b0d9eb9mr3415331plb.64.1714772229039; Fri, 03 May 2024 14:37:09 -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.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:08 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Sumit Semwal , Benni Steini , Joel Selvaraj , Marijn Suijten , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 19/48] drm/panel: novatek-nt36672a: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:33:00 -0700 Message-ID: <20240503143327.RFT.v2.19.I67819ba5513d4ef85f254a68b22a3402b4cdf30f@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 Qualcomm boards. The Qualcomm 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: Sumit Semwal Cc: Benni Steini Cc: Joel Selvaraj Cc: Marijn Suijten 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-novatek-nt36672a.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c index 35aace79613a..c2abd20e0734 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c @@ -656,14 +656,6 @@ static void nt36672a_panel_remove(struct mipi_dsi_device *dsi) struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi); int err; - err = drm_panel_unprepare(&pinfo->base); - if (err < 0) - dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err); - - err = drm_panel_disable(&pinfo->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); @@ -671,14 +663,6 @@ static void nt36672a_panel_remove(struct mipi_dsi_device *dsi) drm_panel_remove(&pinfo->base); } -static void nt36672a_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&pinfo->base); - drm_panel_unprepare(&pinfo->base); -} - static const struct of_device_id tianma_fhd_video_of_match[] = { { .compatible = "tianma,fhd-video", .data = &tianma_fhd_video_panel_desc }, { }, @@ -692,7 +676,6 @@ static struct mipi_dsi_driver nt36672a_panel_driver = { }, .probe = nt36672a_panel_probe, .remove = nt36672a_panel_remove, - .shutdown = nt36672a_panel_shutdown, }; module_mipi_dsi_driver(nt36672a_panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog