Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp93688lqh; Fri, 3 May 2024 14:37:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXD+RDayvNv78qJucJA0kTs2jUMwL9XzQ7LKLIbsLvYMqifzzZGWgff8Pjv+67i/fyHFGz0mu19Ilyga7InteWN+vLftQQUkTMrzDlZYA== X-Google-Smtp-Source: AGHT+IHXqCY/PafqkXJopr/uMKglgv+i/98u2BA2r6Zt+hdoTZ2TkCOaArF2nIcMvsq02epbmBCi X-Received: by 2002:a50:99d4:0:b0:56f:e71b:74e3 with SMTP id n20-20020a5099d4000000b0056fe71b74e3mr2512620edb.39.1714772277300; Fri, 03 May 2024 14:37:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772277; cv=pass; d=google.com; s=arc-20160816; b=cLIfxx1F86iB1EBo3HOSD9qa2bzYNegf4loLCtKsBW62hHcbvMY2ze1yBLokRo+Fw3 FR2K+DNpq7XZ35toXDJe03Dq2WvIoLWcQcN6eVTFB5wGSz19zfr4Er6TlEzZFVq/CL5T rHQgiXSnbr8VyNvcKNU+qtqEF009A+4C3iOHyLhU5Rflz47ry9AaF21gU3kihAPkQPFH yHzpas5yRBZtZzQZrAvlAawFHDcuFUX8co9mLjzSzjcfuTCQGBPVFv2eWIXtYsNmBDN9 nuVm/RYxTP5vFx/wQHoSzJFLIBvrWRt1i7HLbx4UfH7Kxk1buKCfot/uiXvYwhFxBwHx mkpQ== 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=ivwzpk8LV8o9VOgpaEI0wSikxdx7Ris0rIA4UDrHOxM=; fh=Rzbivv0yLKiV0Rx1WMUyvXQns7Fzx8LzQxNXcry8DnU=; b=iBc9qb9rPZS5uHJqGjz8QRLUZLig1AjZsFAK7CzgsJMZNToBQcMDbvWsC6I002qLoN 05Lzxe/+MJ1VeTrmooJsQ8hF4KyamT4X3VOq5Wob7JnJmDSBXiOv/yEwtrfr4RLaIF96 s1JhtG1xavcnzVn80HR3fhzEq1K9ZcJ81WxwEHhyGE/PGYmc5QZCbhOZUqm26Cj//DrJ iO/au3QQvIzdLXXAg62cFqSmOOLj6ZYSK7eYZqvRdftoKmQO4ZDRayy5skW7KQdNiLOR Ytw4zPuTrZz+HJNo00WxU5zC7iFgW4/SVgxh/yeSUEvdWq0FtJQ/1RFgpzbRRIo90o4Y BgDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iul2cwdk; 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-168266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h21-20020aa7c615000000b0056e71418614si1839736edq.505.2024.05.03.14.37.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iul2cwdk; 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-168266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168266-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4F4221F2521A for ; Fri, 3 May 2024 21:37:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10AE6824B7; Fri, 3 May 2024 21:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="iul2cwdk" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 9D1EE4CDE0 for ; Fri, 3 May 2024 21:36:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772193; cv=none; b=USU+nUGyWBwU+/VX80Vu/34Aq4r43RcLVexkJGRl9rY87Jdr4BfTcRk42C3WatUw3iSJnfoymwU+eFvZZFZNzgkGpzxUySbOKhKo3rOWle7AYhiHExPUQZKPz6ppf/N1/oTwX3dUpNZJ21BTNB4yVMbQIfl4kuj0TH9MiABMvpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772193; c=relaxed/simple; bh=Q15hSl0ME/9Le3lQp5qt508gFauIS2SVi1eec97Q8Dc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gQnWgifxO0AzEiL4ccM7MzHc1Sh5cSpPcrte7WePg4WvUEjMVlggTyGjp9AkZY9cIvsOURoPMKwFEjZnqhjrFO/VzdFwbZKpRVydwXMfPFK6ZvVf+ESFaEBYtQiu+b2vSmekUh+wE6eUHm5s5aIxPtnEC6tulNrR+THrYCxbdJ4= 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=iul2cwdk; arc=none smtp.client-ip=209.85.214.182 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-f182.google.com with SMTP id d9443c01a7336-1ecd9a81966so16285035ad.0 for ; Fri, 03 May 2024 14:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772191; x=1715376991; 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=ivwzpk8LV8o9VOgpaEI0wSikxdx7Ris0rIA4UDrHOxM=; b=iul2cwdk5cKHvoCx0SxDgSHT1w/ZgAsGpy/V6uL4ePriVeseLMuXrjyLvKbEJeBZ6y 8qwOXzi8NeHpf7brGwzGn3JS+84yh90ko1PIHbEgg7SdPm7JK0R4BU1urH+OHFfLDHDB +mZ+UIrNccLZ86hfOejHAJl/Z1ZAWuKLR5vx0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772191; x=1715376991; 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=ivwzpk8LV8o9VOgpaEI0wSikxdx7Ris0rIA4UDrHOxM=; b=SRwzMDxqqjBJ3Mcn/66E/6Hnf78QBlm94F46ZinXxv5cAprNFVk7upVpBb8FdzEn/Y dox0RyZbs+cWhQ4yjkGUszPTRIUpMCcDz806X9MOBt7p4Q9swnsYGjmWmrJHnw9W5XJO y4RJw8OkjOJmJOZDnHS9nYn1obsfiZ+UIg8lesl7w4LD+BBqohJspiahYRS172Mu859t pN8JDXzN8Gl6zLB6+YcbNLjVc0ms4/Gu+U0/tQjPmpJW0otvS5ORmoC7uWU+FPjzck49 UzZKUvlSFQmhqBW8uMIuOGNQ4C9eZGNBImjfAvQgBcQPb/jF4VpKV9GocRfxh6elWFda JrLg== X-Forwarded-Encrypted: i=1; AJvYcCXaVsqUN7IsCtlCM0bKlC5lokB6+TWCK+YcycxW+NO58wyymfip8Of1x997Q0zM6pNDIQEAY4SK+aot96V14me2crYp5n9DaI4qMwbm X-Gm-Message-State: AOJu0YxjjuE1BBBKxKVCaiCRBmOjfnzjhmzn6mequqlvqRLksYCSAp6a fFwJtymcUWIL/xyyuZkArZHyVgD08uwafYKxXueh5dir/eJKBj9Otl3FyGoyYA== X-Received: by 2002:a17:902:d093:b0:1e0:a2cf:62e8 with SMTP id v19-20020a170902d09300b001e0a2cf62e8mr6761839plv.10.1714772190912; Fri, 03 May 2024 14:36:30 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:36:30 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Jerry Han , Jitao Shi , Rock Wang , AngeloGioacchino Del Regno , Daniel Vetter , David Airlie , Jerry Han , 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 03/48] drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:32:44 -0700 Message-ID: <20240503143327.RFT.v2.3.I19086c524d38f28f746befe85cb39ffda9d2f666@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. 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: Jerry Han Cc: Jitao Shi Cc: Rock Wang 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-himax8279d.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 12e14615298b..df746baae301 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -894,14 +894,6 @@ static void panel_remove(struct mipi_dsi_device *dsi) struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); int err; - err = drm_panel_disable(&pinfo->base); - if (err < 0) - dev_err(&dsi->dev, "failed to disable panel: %d\n", err); - - err = drm_panel_unprepare(&pinfo->base); - if (err < 0) - dev_err(&dsi->dev, "failed to unprepare 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); @@ -909,14 +901,6 @@ static void panel_remove(struct mipi_dsi_device *dsi) drm_panel_remove(&pinfo->base); } -static void panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&pinfo->base); - drm_panel_unprepare(&pinfo->base); -} - static struct mipi_dsi_driver panel_driver = { .driver = { .name = "panel-boe-himax8279d", @@ -924,7 +908,6 @@ static struct mipi_dsi_driver panel_driver = { }, .probe = panel_probe, .remove = panel_remove, - .shutdown = panel_shutdown, }; module_mipi_dsi_driver(panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog