Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp96032lqh; Fri, 3 May 2024 14:43:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1xRIlAueblTrxJ+j+Qm3hd0PX4fH9jHIlR98YEJTZOmE3OWthCRS++LfVsRptzNVjXLG0nEmmcPqyyQC2MNl25tElN81b32J+NBLdRw== X-Google-Smtp-Source: AGHT+IGl7qWj81uw0pKRwYOSVGdp0amW7OWRjMhdK7V+Jh37lx3eBnFCOwUp1fFlcGF9bYMw0z2k X-Received: by 2002:a17:90a:a60c:b0:2b2:813e:a88 with SMTP id c12-20020a17090aa60c00b002b2813e0a88mr4029313pjq.7.1714772629285; Fri, 03 May 2024 14:43:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772629; cv=pass; d=google.com; s=arc-20160816; b=E261lMMe7CvJH/WP7xxm1zXKac0SEqNhFJTRoHwWugWwvdA4mRQjo/PzO0Fx5GlY/V LoeJo/Ogwrl4a1Tkh7hFnTHKTLEUMRE8fbPuEcJTiUHYbSlf8M6mfcXdawXGrp7qdH/j fb1trWwAVbTUQRes7PSr72LL816L+bFRsHVSjRrYHZVojr1YyswKJTIGq8Hl4jmyAInW xIpS8OysoEQvC62qujaUEIYgqMWk3pFdnAsHsg7UGKEEU02BRmIqmJ6flc/2qALzdt08 gNsMI8AyuYnm7zwECHFeuNTfDu2Go6jpWvGVL3VIsn3+Zll6e9CDeZWBPvvcTBhsiBnT nWzQ== 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=j0ij9ytrBMTlh/tBwBQfGeyqwsUC3qnXNREpsQEX2pQ=; fh=x8eFUXTvnlIv9TbAzRemNiYOrqcUHhiWdpk1HXdnQn0=; b=zC4bVeSfFM3w7l8gIusK6uH5H7QV1+T6zhd1S1qeM2SGO2fBwYfcM2njTDFC5PFWHI D0KqIWwffIlu34YDav9Gi5JDRLNfzvD16oC8/UMJWmy/iMyJNRp3/NmPUASDVk2XQzWg K1/1GDba5DnF/upLTpfnQllRGeqflHqN56HZez8wJ21kUKQMevB3ewBBjDSYvS17jo0u rxF5pJ1/3C/HqU8sEpNiqmjW2AheGiLFCyo0zjSHDmy1xi6nf/T/go235mSa9/4v+YpM zaORCAHCG1Ss+hG8xC5WUU3Twr9T7QOXY0dzAg8cjWp8THbWpP3llL78OyDtcaYvR9uf Zcaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PlEPWiBn; 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-168294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168294-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id pi13-20020a17090b1e4d00b002af726bdfb1si3913518pjb.147.2024.05.03.14.43.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PlEPWiBn; 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-168294-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168294-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8BB99286040 for ; Fri, 3 May 2024 21:43:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77529134400; Fri, 3 May 2024 21:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="PlEPWiBn" 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 3B86D1332BD for ; Fri, 3 May 2024 21:37:33 +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=1714772255; cv=none; b=o54tkPMAHwySmP8wNe2B6dl5Jk/ewi2iqmY5Sn0RZqKrP+LxsEAzg1dryiH6k8wkSfdEoEfuqjPsNKsH2+BHE9D1ldCHiuZz8IKL1lIVNZA9o/JwHKT/M/fjAR5VMiIMk5+oNr/lG2eibSIDtMrp9b2TjWOfUYRhharUxGg005s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772255; c=relaxed/simple; bh=B87t9irMwa1Woziqob9gKqOueiGVlqkiYIMNBao3tAo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n9tX9D3LPEB92WSxH9g/3tkl5Wz5u+yNVEJxV784Zfi0cWV3l7fJkXOmvAvE+zTTcGPfjqQXekdPSYX0P6auaH4Zq2rIm6IZRY0kOiFpRgqZEZkVnd6fvFafPszk2ME42dQEK4/QdX9PMW6U76UYFBxq53QgAGd4muHEoBFCerw= 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=PlEPWiBn; 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-1ec5387aed9so1020455ad.3 for ; Fri, 03 May 2024 14:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772253; x=1715377053; 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=j0ij9ytrBMTlh/tBwBQfGeyqwsUC3qnXNREpsQEX2pQ=; b=PlEPWiBnBDTDORmTMHlrEDOnDreTNMCRIcrBp/ThpsczWdBGDFsCfyRdYl7Gxyp9yC OAPYwYQy/bfGoChRuCbUQHdjcDefUW1KNJsUlMVXeL6tOwiI2z80DAep5yY9o6xpoLOg GHp/9TBDqT1hzha7HLN8vXSJ/u4vRZubi/6ao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772253; x=1715377053; 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=j0ij9ytrBMTlh/tBwBQfGeyqwsUC3qnXNREpsQEX2pQ=; b=Ob3t2PQHDFK5+reNwSkRz6FH+YeTrCXdTo8DSpQXsDtQ3XGbyabtUfPdtJVUwo4pow +Yat7g1rtlyp447rU5cXkxMeWUZyo7kvT6QWHjh2tOCOj7IBJCdBa96NCl7US4J85w1u lzwaW64lk/zEU7MsrYcl6YKonSxmKhjAGQwRqupHpmNIjjxhRGmVKZHwK/PjszGfmAuK H++X2DWEFXILQ5f9nBJ+hJbMCvrnGtF5s1PygqILlfZcrHj06XP3kavTkArwNJCktGrL STmVYAVNru6gRaK7U4zX4TR3pkdlVGb0WP4MMWBcwz1CSu7kXb8JY3wbQSCn9pB88NsG vfoQ== X-Forwarded-Encrypted: i=1; AJvYcCUuCFgMrU4q/JdFvcnfWmErLKOEoc+IJL1ZG65oEkxUJDZODMl1JGrJJPg3SWEhkgFS1ksNVFOKZYpcg2BxMac7eyDS/TR7JyKUP1ap X-Gm-Message-State: AOJu0YwH+R5w6ciRV1TDqL8cCtVe9S3sT72sef9p5MsUoX5bukWnD6IB MREaf7cDbZOUvzv4QTSFsSakZZalBmuQ4mTf4KlkethBqYYNCKYa1bgjUuJhnw== X-Received: by 2002:a17:902:ef8b:b0:1e2:c554:a93c with SMTP id iz11-20020a170902ef8b00b001e2c554a93cmr2868203plb.29.1714772253398; Fri, 03 May 2024 14:37:33 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:37:32 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 29/48] drm/panel: tdo-tl070wsh30: Don't call unprepare+disable at shutdown/remove Date: Fri, 3 May 2024 14:33:10 -0700 Message-ID: <20240503143327.RFT.v2.29.I46ff4e28c260bcd8e81205debd0994e76fd8aeac@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: Neil Armstrong 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-tdo-tl070wsh30.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c index 36f27c664b69..227f97f9b136 100644 --- a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c +++ b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c @@ -208,16 +208,6 @@ static void tdo_tl070wsh30_panel_remove(struct mipi_dsi_device *dsi) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); drm_panel_remove(&tdo_tl070wsh30->base); - drm_panel_disable(&tdo_tl070wsh30->base); - drm_panel_unprepare(&tdo_tl070wsh30->base); -} - -static void tdo_tl070wsh30_panel_shutdown(struct mipi_dsi_device *dsi) -{ - struct tdo_tl070wsh30_panel *tdo_tl070wsh30 = mipi_dsi_get_drvdata(dsi); - - drm_panel_disable(&tdo_tl070wsh30->base); - drm_panel_unprepare(&tdo_tl070wsh30->base); } static struct mipi_dsi_driver tdo_tl070wsh30_panel_driver = { @@ -227,7 +217,6 @@ static struct mipi_dsi_driver tdo_tl070wsh30_panel_driver = { }, .probe = tdo_tl070wsh30_panel_probe, .remove = tdo_tl070wsh30_panel_remove, - .shutdown = tdo_tl070wsh30_panel_shutdown, }; module_mipi_dsi_driver(tdo_tl070wsh30_panel_driver); -- 2.45.0.rc1.225.g2a3ae87e7f-goog