From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F25FA4C6E; Mon, 23 Jun 2025 13:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685418; cv=none; b=CLtdR/kKF6fz/BQmgHYIhQRWOZplSJiKyRFNrLViQ/A94TaGxAwg4OKTseodREGm+zZXgDm3ocOzGoi7jvkg+jCDTpASCjgnO9iLe14oRIOdLbj39PO67MJAtNQaf2iLAMEh/7VnWFCtq4+7wPRCnFMMBqEzeID71F1G7MtLZLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685418; c=relaxed/simple; bh=IOdO3DcOx5wJxwpo7PAW7YZ+a5IR0IClLWeepWaf3LY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mfCkDWRi/ROpF1Y9IpNszuMwwx37lo2Znt29dmlY1eYKTLZyHwI/LVFhteqSe8CvR3DCpojUfJBDTAMz6ACv3NBXeK6xqy+465UdoNrx7WN4Xq/Kgd7IALcIVJdP5kokJ2uvMuEFC/nTzXiOvCkYquC6T0L4FRPbO5zp4F0aHyo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rxDQ5Y9E; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rxDQ5Y9E" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7ACA1C4CEEA; Mon, 23 Jun 2025 13:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750685417; bh=IOdO3DcOx5wJxwpo7PAW7YZ+a5IR0IClLWeepWaf3LY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rxDQ5Y9E5UQsBsEBgiOxc8YsEw8hDofVMX5NPVxv7RN+p/ecxF/7Ge/jAKPbuRthB 5ZesYSbGo+CzGr+4Yqk/txauSnOgdtCW42dJ9PXnUMNQPHiS7l8UC1Fk3AdgV0pB9I Lci1mmifH+4VGZr8a29+YaPGL7KeBpy5TF6Plmb0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jessica Zhang , Dmitry Baryshkov , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 6.15 259/592] drm/msm/hdmi: add runtime PM calls to DDC transfer function Date: Mon, 23 Jun 2025 15:03:37 +0200 Message-ID: <20250623130706.462794249@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130700.210182694@linuxfoundation.org> References: <20250623130700.210182694@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Baryshkov [ Upstream commit 531b4e2c206e5f7dead04d9da84dfa693ac57481 ] We must be sure that the HDMI controller is powered on, while performing the DDC transfer. Add corresponding runtime PM calls to msm_hdmi_i2c_xfer(). Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651727/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-8-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c index 7aa500d24240f..ebefea4fb4085 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c @@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, if (num == 0) return num; + ret = pm_runtime_resume_and_get(&hdmi->pdev->dev); + if (ret) + return ret; + init_ddc(hdmi_i2c); ret = ddc_clear_irq(hdmi_i2c); if (ret) - return ret; + goto fail; for (i = 0; i < num; i++) { struct i2c_msg *p = &msgs[i]; @@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS), hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS), hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL)); - return ret; + goto fail; } ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS); @@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, } } + pm_runtime_put(&hdmi->pdev->dev); + return i; + +fail: + pm_runtime_put(&hdmi->pdev->dev); + return ret; } static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter) -- 2.39.5