From patchwork Tue Sep 24 03:51:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13810066 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 6252BCF9C72 for ; Tue, 24 Sep 2024 03:53:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF2A210E4C6; Tue, 24 Sep 2024 03:53:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f+sRnSFO"; dkim-atps=neutral Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6968610E4C6 for ; Tue, 24 Sep 2024 03:53:20 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-208e0a021cfso24710955ad.0 for ; Mon, 23 Sep 2024 20:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727150000; x=1727754800; darn=lists.freedesktop.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=K4JDPhYLX8gOFX6qvDK3s7d/UNCPkxhxheW4+MaLpxU=; b=f+sRnSFOKTayCtdsqVre07HL49iOAHG5s4Si7YgAAPE1vUTQiz51jkgrWPYhjqVtjz rbh0v4bN9MbwLwvbY/SVMb1pZlxnxBIN9DyuzIMB0xOmigJ5cGh9Y3k5RMgWUB/SvZEo pgWA0q1eryyzrEQ+zxgDmwwSNq9yKKLra4+7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727150000; x=1727754800; 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=K4JDPhYLX8gOFX6qvDK3s7d/UNCPkxhxheW4+MaLpxU=; b=bv6LgigWt17rrxDn52Snq+MG0FQRr3milIC3UjqXN1/YAi70aAiB/3zktH2+P0dXY9 R70/+2GxLLz+frzYV6+MTHcAl1Xe60ND/vW5ro1Rxn6Uki1EQkOl4wdHjNyAPqv9q3zj 3jvcD3qXVta7ljKF6/kIkbUqH3WJgQdmrtLObwmYYfTxloASH0giA2IDZ5ikzUuTTwnC PgGRRX/ofkLdCjjbTeNZUajgYbMhOaGhKr9z9QcyJmkG+1mVNo5+GoVe5oA1NVWvv2m0 lub0oo/PzKBO1SdBcUtKS2XJWx/PzOgOW6VtmtySyGRpqqhWYhjLz4J4samy+kHB2Zda oVjA== X-Forwarded-Encrypted: i=1; AJvYcCUtQF1FWyESxdBkqvmLOPa0vSADh0XUT28Uq8wZQYCWVo+fi9UfeYpM7koiRKuEeg/anCiY+e/MU3E=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzRctybCJYb4ttjmUxmKql8m1o5MhXKmkBuUl7IpYVWI+0UjyHN QTlvKUIllIuXdqZ3EWXcI4qyMXq3O0lpBKeJ6wAeJw7s4+9zG5cjCLBo6N9er+jZnH5oyFT+ozs = X-Google-Smtp-Source: AGHT+IFLuTTEL04yCULpYt8EVG3MEuP3tIFneXOCV6K0qCW5+TTc6vxsM21BR/5fxrk7lOFKauUFCg== X-Received: by 2002:a17:902:ec88:b0:206:91e7:ba98 with SMTP id d9443c01a7336-208d8408162mr193275135ad.50.1727149999914; Mon, 23 Sep 2024 20:53:19 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:727c:308e:bfa8:9ccb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af1869000sm2555335ad.307.2024.09.23.20.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 20:53:19 -0700 (PDT) From: Pin-yen Lin To: Xin Ji , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: linux-kernel@vger.kernel.org, Sam Ravnborg , dri-devel@lists.freedesktop.org, Pin-yen Lin , Douglas Anderson Subject: [PATCH 1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off Date: Tue, 24 Sep 2024 11:51:46 +0800 Message-ID: <20240924035231.1163670-2-treapking@chromium.org> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog In-Reply-To: <20240924035231.1163670-1-treapking@chromium.org> References: <20240924035231.1163670-1-treapking@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The bridge might miss the display change events when it's powered off. This happens when a user changes the external monitor when the system is suspended and the embedded controller doesn't not wake AP up. It's also observed that one DP-to-HDMI bridge doesn't work correctly when there is no EDID read after it is powered on. Drop the cache to force an EDID read after system resume to fix this. Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Signed-off-by: Pin-yen Lin Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 88e4aa5830f3..b4c1f00f1c3d 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2561,6 +2561,7 @@ static int __maybe_unused anx7625_runtime_pm_suspend(struct device *dev) mutex_lock(&ctx->lock); anx7625_stop_dp_work(ctx); + anx7625_remove_edid(ctx); anx7625_power_standby(ctx); mutex_unlock(&ctx->lock); From patchwork Tue Sep 24 03:51:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13810067 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 926FACF9C6B for ; Tue, 24 Sep 2024 03:53:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F65010E4C7; Tue, 24 Sep 2024 03:53:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Sk8ivh6h"; dkim-atps=neutral Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 232D010E4C7 for ; Tue, 24 Sep 2024 03:53:24 +0000 (UTC) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7d666fb3fb9so2427339a12.0 for ; Mon, 23 Sep 2024 20:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727150003; x=1727754803; darn=lists.freedesktop.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=+zn7NLLo5vu43wPcgUUT5FAE6ycLFHPC4WAcceh7PLg=; b=Sk8ivh6hW0Cnp854sc55aLAlzQ1tEPtFxqDsxusDv2XzDLkQxfhTXV0yOngPgx5ECk MRQ2LcUkmzfDE0Spg6vGO0ZAnnH7M51Dfjh1Wy7tKYAQtRRhirl26kG4H1O8oW1GzVCU zIyU01F07tY9D2ufWMD5JK9mYEV2CILtGXVHc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727150003; x=1727754803; 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=+zn7NLLo5vu43wPcgUUT5FAE6ycLFHPC4WAcceh7PLg=; b=g6kXsgUvxloJHg2SHYKmwSIGOdvXqW0AkvzU8jR1TkuvLzyjS/Pnhey3I7je+bngBU sx13iGea4GGsnbxA8r0cMZ0PE+vz+bq7IAZhR0t8cxzlzqJSwQTmq8T6uplfjT4IdmiG 1a1RVGam+DmMlHPiHvmtweoQevAZ/ndCw1qz1zol8mvX6G1zDoEXZdOrPBL3/Up5SosG b9lhluaYSB3y7Ga/P2xrDYDvbvqjrG7RfC+cmFnK8sPCXAH6z86e2D65lNbVyPRlwQLa cD/Mq03H9jXawTwtdQOmqX0mZSzIA0YFKjZISP2uiRCmPyNQ1SZwIOE+S2QdO38q8Y2+ CbSQ== X-Forwarded-Encrypted: i=1; AJvYcCXtJs5CtQJWyv85d+qZvkrkEjbazMQ4En77eH7QyC8yJX9ECJB/CmtYJ1t5FD6xl72xVaIVT44vNzg=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyxNIXuL/J8mKUaHhLavKlbjfyWffKx8ncOhyvYVXxxgDwzYs2S iAk1WJchwtMzNIOnJWZMrRs/ccUnHesgkgiU3c+Zo0iu+pedXC2X5UtQB3d1dw== X-Google-Smtp-Source: AGHT+IFX6kIi8aI27QC+U0PJmuzc8q6Ze0ZE/jdApjgn9l0PmrsjgyTyMjAA5F8RaDDP42xYMp4DKA== X-Received: by 2002:a17:903:1ca:b0:205:753e:e2e6 with SMTP id d9443c01a7336-20aed0c3544mr23884325ad.16.1727150003606; Mon, 23 Sep 2024 20:53:23 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:727c:308e:bfa8:9ccb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af1869000sm2555335ad.307.2024.09.23.20.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 20:53:23 -0700 (PDT) From: Pin-yen Lin To: Xin Ji , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: linux-kernel@vger.kernel.org, Sam Ravnborg , dri-devel@lists.freedesktop.org, Pin-yen Lin , Douglas Anderson Subject: [PATCH 2/2] drm/bridge: it6505: Drop EDID cache on bridge power off Date: Tue, 24 Sep 2024 11:51:47 +0800 Message-ID: <20240924035231.1163670-3-treapking@chromium.org> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog In-Reply-To: <20240924035231.1163670-1-treapking@chromium.org> References: <20240924035231.1163670-1-treapking@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The bridge might miss the display change events when it's powered off. This happens when a user changes the external monitor when the system is suspended and the embedded controller doesn't not wake AP up. It's also observed that one DP-to-HDMI bridge doesn't work correctly when there is no EDID read after it is powered on. Drop the cache to force an EDID read after system resume to fix this. Fixes: 11feaef69d0c ("drm/bridge: it6505: Add caching for EDID") Signed-off-by: Pin-yen Lin Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson --- drivers/gpu/drm/bridge/ite-it6505.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index 1e1c06fdf206..bb449efac2f4 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -3101,6 +3101,8 @@ static __maybe_unused int it6505_bridge_suspend(struct device *dev) { struct it6505 *it6505 = dev_get_drvdata(dev); + it6505_remove_edid(it6505); + return it6505_poweroff(it6505); }