Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp457059lqb; Tue, 4 Jun 2024 17:27:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJLgohz76c10Rjdg1nPJ4q5VNOksjPHLL0El/D/n85B8j6Jq9wzNmXTrPcccz3kH7QL5lhPqqYbxRc96aOgprRa7Khqy7wFpjAoLOYzg== X-Google-Smtp-Source: AGHT+IF409x8Z3kWKslqCm55rO2kLxeO5aosjZH2xOXsMx+eF1mRRG7wkzob3pcD/q2o4xzzQi6u X-Received: by 2002:a05:622a:20d:b0:43d:fa59:6461 with SMTP id d75a77b69052e-4402b61efdfmr12172511cf.39.1717547236432; Tue, 04 Jun 2024 17:27:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717547236; cv=pass; d=google.com; s=arc-20160816; b=1LW5h5YwVbQ9XYNjwo3Pk0HmsnpC6uhCzbvLi6IGz7Ogrz4HR6/dgHutp+kesDe682 4ZJnwIanrvE4zMTdThX19beGgU/JKeSpI5hjcSSW7GyBonTUDbFR54Ce88tuEmyoLwGp 9GImEKCpPyh1sczKOpbKnp+hZP1DhIgD4BLJkR8rF2CbGUWmricsFmjf7uNU2VwNwAdw 6qIxJ9swhy9JzlEua7tKGEu26S1be+PPIDEs+6VY2sTB+O38GpUDPGXflsOkrz+yeh08 cd+wkswUsJurnbaH+y1FQlZ+aRZZE7bRn/2y/zV3ApkJCtvYWM0e3Ewd3fNayfF3V3BT WPsQ== 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=IfrcD8JBjZkCaL7eZQ01Qcv1YJLZOCOi3SqrruG0MFA=; fh=rMH3VHl5WTA5QC+xVCl8WGwjLpKEFvlz0N7Jp4kYPSo=; b=xA+v4cLOjFmitgD8ZZp4KNgB1dkQlG0VYVzIFnMgwBm1gTtYYBqnfmVbYb+owyAyE2 MEnZHsLkLhjmfafyBQawO08pUYBI3fJIB35Pur1BA+wfQouG4NpkzZlu1zdihXcvJuHz ww/mdSHTzknv+Q9HnZZ1ok9YHRasTOJiyTcSWV5dqlh9dqj87PZ/YnVQ+jnKVjEo9jS6 rNBkRyeB7/srZ0nBZ4gvOCjDrqXWF9FSpNSX7arf3fX2f4Ctgd1ufhEaPCmXL9zVhTfa Qqag39IOQS2xPhrpe2pWDnnTzLkhuN71uI21h5y8AWEKEUamdJTapF20erleHCbCoJcF ZcKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F6o4GX34; 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-201596-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201596-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 d75a77b69052e-43ff25b2cf5si115736761cf.721.2024.06.04.17.27.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201596-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=F6o4GX34; 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-201596-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201596-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 1DAFD1C22607 for ; Wed, 5 Jun 2024 00:27:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2396F6FCB; Wed, 5 Jun 2024 00:24:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="F6o4GX34" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 E42F82837A for ; Wed, 5 Jun 2024 00:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547081; cv=none; b=fFpLMVBjKRbvGSi6beiV++df3cwdw5Fn0lLzt/Pmg9obHDhF4YSIfp3R0351nzclc4Kj6Egc/wrfkkYWvCxmII7fvp4T6wbrzWlofvrpSFLhQ/IJcRufgh+MDIE4RwBEenBLJJQyx0ys1Umr7yfOHxng7+v/nbeK24r5aJerwSg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547081; c=relaxed/simple; bh=y5P6GSVJaqX9fygi7NCZQL6iQCjLJjz3fWYqF7675rY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KwDDpJj8ecpOlsT4YF/vQQzhMCVhIdyG0ZwmCWGnJdTkDdfa2NFEYpkuZP6bCplVt1pPWHtzMJ37xC5pcxNBmgPJEwL8nzdNHNk2LHY8t7eU4zSbyT/pMn5O0JDhgRE2Vi8jX35IqCQDnzBq15IM5lxHnFKVGrb806zMIkD6L3E= 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=F6o4GX34; arc=none smtp.client-ip=209.85.214.171 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-f171.google.com with SMTP id d9443c01a7336-1f44b5d0c50so46523255ad.2 for ; Tue, 04 Jun 2024 17:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717547079; x=1718151879; 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=IfrcD8JBjZkCaL7eZQ01Qcv1YJLZOCOi3SqrruG0MFA=; b=F6o4GX34sbSECfeX7qcanzjWX+hKofI0P+WFAOnHx0IltLkTYcxR/dcy9XSULJ5K6H YOoQgyZ7f+5gE1+LtU7l0WwCDLXFFZrxZI7i1UhLh2AScKbeb4nCTwTthPuqZbSngNRY m/Xcuh5tXEWCocA1F0n7sqCgu5Z4FF7E8DuOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717547079; x=1718151879; 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=IfrcD8JBjZkCaL7eZQ01Qcv1YJLZOCOi3SqrruG0MFA=; b=YA82t052EkAc2XvFB4ezEI6RXObz0WprdrpsNeHwGQF9qHhlEOyuSN5c6qYV/UmmjV EDlOMmo1V6K8KFI9tBtlLBTcIimHBbzVdwt+EYTqCmaZdCV86s80p4Ng9FxhpB4eeCiW DKQ2VK0gpKDKJd4UsI2iI80u2o4lb/q54wfjT4yunr5MJFvru7PpLV57pm6u7FgjPgdI khrkYNjZTicxV/Yq0PukUkDGzRAxhmFSpA2COb1j9CZIzgJ0FA5YjyRo3i2znWe1dF6i 9l+UnjSI087b/att4vzKed5v+suYB08YqT+Vy8elBpg2/ZmyLu/6y6UwZDf2XRbzgnrV IvcQ== X-Forwarded-Encrypted: i=1; AJvYcCWo+SWfhtzaq7h9Hj7CjWlMYHXPjZ3zV84JljH3tJ5KHvolG8pIucRh0+e607ajzodlRPsniLqbs4tWJU7+GLTXqvkg15Y+UHpPvhjW X-Gm-Message-State: AOJu0YwAQsJS9+fTSPB/eFwf7e3WcFOc8s3RHD/tBb8KG7OltvVTEWKY p4d9BHXfP/joHPsmTCKgnRT8ZcSn39FTall8G+sfa+7M4yvPwrWI00w38/tyfA== X-Received: by 2002:a17:903:2289:b0:1f6:6c64:a7b6 with SMTP id d9443c01a7336-1f6a5a24e16mr13838715ad.37.1717547078652; Tue, 04 Jun 2024 17:24:38 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:3609:ff79:4625:8a71]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323dd862sm89032025ad.147.2024.06.04.17.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:24:37 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Neil Armstrong , Yuran Pereira , Douglas Anderson , Vinay Simha BN , Sumit Semwal , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v3 12/24] drm/panel: jdi-lt070me05000: Don't call disable at shutdown/remove Date: Tue, 4 Jun 2024 17:22:58 -0700 Message-ID: <20240604172305.v3.12.I5f3426e511e77b93c247e0aac114bd12b2b2a933@changeid> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog In-Reply-To: <20240605002401.2848541-1-dianders@chromium.org> References: <20240605002401.2848541-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: Vinay Simha BN Cc: Sumit Semwal Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson --- (no changes since v2) Changes in v2: - Only handle 1 panel per patch. - Split removal of prepared/enabled from handling of remove/shutdown. drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c index 4ddddee6fa1e..b1ce186de261 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -452,10 +452,6 @@ static void jdi_panel_remove(struct mipi_dsi_device *dsi) struct jdi_panel *jdi = mipi_dsi_get_drvdata(dsi); int ret; - ret = drm_panel_disable(&jdi->base); - if (ret < 0) - dev_err(&dsi->dev, "failed to disable panel: %d\n", ret); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", @@ -464,13 +460,6 @@ static void jdi_panel_remove(struct mipi_dsi_device *dsi) jdi_panel_del(jdi); } -static void jdi_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct jdi_panel *jdi = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&jdi->base); -} - static struct mipi_dsi_driver jdi_panel_driver = { .driver = { .name = "panel-jdi-lt070me05000", @@ -478,7 +467,6 @@ static struct mipi_dsi_driver jdi_panel_driver = { }, .probe = jdi_panel_probe, .remove = jdi_panel_remove, - .shutdown = jdi_panel_shutdown, }; module_mipi_dsi_driver(jdi_panel_driver); -- 2.45.1.288.g0e0cd299f1-goog