Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay
       [not found] <20230227020045.1045105-1-sashal@kernel.org>
@ 2023-02-27  2:00 ` Sasha Levin
  2023-02-27  9:12   ` Johan Hovold
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 24/60] drm/msm/dsi: Add missing check for alloc_ordered_workqueue Sasha Levin
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 33/60] drm/msm/dpu: Add DSC hardware blocks to register snapshot Sasha Levin
  2 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2023-02-27  2:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Bjorn Andersson, Kuogee Hsieh, Dmitry Baryshkov, Sasha Levin,
	robdclark, quic_abhinavk, airlied, daniel, swboyd, johan+linaro,
	quic_sbillaka, linux-arm-msm, dri-devel, freedreno

From: Bjorn Andersson <quic_bjorande@quicinc.com>

[ Upstream commit e17af1c9d861dc177e5b56009bd4f71ace688d97 ]

During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP
event is generated, but with a delay of 100 units. This delay existed to
circumvent bug in the QMP combo PHY driver, where if the DP part was
powered up before USB, the common properties would not be properly
initialized - and USB wouldn't work.

This issue was resolved in the recent refactoring of the QMP driver,
so it's now possible to remove this delay.

While there is still a timing dependency in the current implementation,
test indicates that it's now possible to boot with an external display
on USB Type-C and have the display power up, without disconnecting and
reconnecting the cable.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/518729/
Link: https://lore.kernel.org/r/20230117172951.2748456-1-quic_bjorande@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 7ff60e5ff3258..ed4159f6d344e 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1497,7 +1497,7 @@ void msm_dp_irq_postinstall(struct msm_dp *dp_display)
 	dp = container_of(dp_display, struct dp_display_private, dp_display);
 
 	if (!dp_display->is_edp)
-		dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 100);
+		dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 0);
 }
 
 bool msm_dp_wide_bus_available(const struct msm_dp *dp_display)
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.2 24/60] drm/msm/dsi: Add missing check for alloc_ordered_workqueue
       [not found] <20230227020045.1045105-1-sashal@kernel.org>
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay Sasha Levin
@ 2023-02-27  2:00 ` Sasha Levin
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 33/60] drm/msm/dpu: Add DSC hardware blocks to register snapshot Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-02-27  2:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jiasheng Jiang, Abhinav Kumar, Dmitry Baryshkov, Sasha Levin,
	robdclark, airlied, daniel, marijn.suijten, vkoul, dianders,
	vladimir.lypak, linux-arm-msm, dri-devel, freedreno

From: Jiasheng Jiang <jiasheng@iscas.ac.cn>

[ Upstream commit 115906ca7b535afb1fe7b5406c566ccd3873f82b ]

Add check for the return value of alloc_ordered_workqueue as it may return
NULL pointer and cause NULL pointer dereference.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/517646/
Link: https://lore.kernel.org/r/20230110021651.12770-1-jiasheng@iscas.ac.cn
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 89aadd3b3202b..f167a45f1fbdd 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1977,6 +1977,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	/* setup workqueue */
 	msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0);
+	if (!msm_host->workqueue)
+		return -ENOMEM;
+
 	INIT_WORK(&msm_host->err_work, dsi_err_worker);
 
 	msm_dsi->id = msm_host->id;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.2 33/60] drm/msm/dpu: Add DSC hardware blocks to register snapshot
       [not found] <20230227020045.1045105-1-sashal@kernel.org>
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay Sasha Levin
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 24/60] drm/msm/dsi: Add missing check for alloc_ordered_workqueue Sasha Levin
@ 2023-02-27  2:00 ` Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-02-27  2:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Marijn Suijten, Neil Armstrong, Abhinav Kumar, Dmitry Baryshkov,
	Sasha Levin, robdclark, airlied, daniel, swboyd, dianders,
	quic_vpolimer, liushixin2, linux-arm-msm, dri-devel, freedreno

From: Marijn Suijten <marijn.suijten@somainline.org>

[ Upstream commit a7efe60e36b9c0e966d7f82ac90a89b591d984e9 ]

Add missing DSC hardware block register ranges to the snapshot utility
to include them in dmesg (on MSM_DISP_SNAPSHOT_DUMP_IN_CONSOLE) and the
kms debugfs file.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/520175/
Link: https://lore.kernel.org/r/20230125101412.216924-1-marijn.suijten@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index b71199511a52d..09757166a064a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -930,6 +930,11 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
 	msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
 			dpu_kms->mmio + cat->mdp[0].base, "top");
 
+	/* dump DSC sub-blocks HW regs info */
+	for (i = 0; i < cat->dsc_count; i++)
+		msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len,
+				dpu_kms->mmio + cat->dsc[i].base, "dsc_%d", i);
+
 	pm_runtime_put_sync(&dpu_kms->pdev->dev);
 }
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay
  2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay Sasha Levin
@ 2023-02-27  9:12   ` Johan Hovold
  2023-03-01 14:15     ` Sasha Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2023-02-27  9:12 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Bjorn Andersson, Kuogee Hsieh,
	Dmitry Baryshkov, robdclark, quic_abhinavk, airlied, daniel,
	swboyd, johan+linaro, quic_sbillaka, linux-arm-msm, dri-devel,
	freedreno

On Sun, Feb 26, 2023 at 09:00:03PM -0500, Sasha Levin wrote:
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
> 
> [ Upstream commit e17af1c9d861dc177e5b56009bd4f71ace688d97 ]
> 
> During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP
> event is generated, but with a delay of 100 units. This delay existed to
> circumvent bug in the QMP combo PHY driver, where if the DP part was
> powered up before USB, the common properties would not be properly
> initialized - and USB wouldn't work.
> 
> This issue was resolved in the recent refactoring of the QMP driver,
> so it's now possible to remove this delay.
> 
> While there is still a timing dependency in the current implementation,
> test indicates that it's now possible to boot with an external display
> on USB Type-C and have the display power up, without disconnecting and
> reconnecting the cable.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> Patchwork: https://patchwork.freedesktop.org/patch/518729/
> Link: https://lore.kernel.org/r/20230117172951.2748456-1-quic_bjorande@quicinc.com
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This is not a bug fix and should not be backported.

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay
  2023-02-27  9:12   ` Johan Hovold
@ 2023-03-01 14:15     ` Sasha Levin
  0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-03-01 14:15 UTC (permalink / raw)
  To: Johan Hovold
  Cc: linux-kernel, stable, Bjorn Andersson, Kuogee Hsieh,
	Dmitry Baryshkov, robdclark, quic_abhinavk, airlied, daniel,
	swboyd, johan+linaro, quic_sbillaka, linux-arm-msm, dri-devel,
	freedreno

On Mon, Feb 27, 2023 at 10:12:20AM +0100, Johan Hovold wrote:
>On Sun, Feb 26, 2023 at 09:00:03PM -0500, Sasha Levin wrote:
>> From: Bjorn Andersson <quic_bjorande@quicinc.com>
>>
>> [ Upstream commit e17af1c9d861dc177e5b56009bd4f71ace688d97 ]
>>
>> During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP
>> event is generated, but with a delay of 100 units. This delay existed to
>> circumvent bug in the QMP combo PHY driver, where if the DP part was
>> powered up before USB, the common properties would not be properly
>> initialized - and USB wouldn't work.
>>
>> This issue was resolved in the recent refactoring of the QMP driver,
>> so it's now possible to remove this delay.
>>
>> While there is still a timing dependency in the current implementation,
>> test indicates that it's now possible to boot with an external display
>> on USB Type-C and have the display power up, without disconnecting and
>> reconnecting the cable.
>>
>> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
>> Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
>> Patchwork: https://patchwork.freedesktop.org/patch/518729/
>> Link: https://lore.kernel.org/r/20230117172951.2748456-1-quic_bjorande@quicinc.com
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This is not a bug fix and should not be backported.

Ack, I'll drop all the INIT_SETUP patches. Thanks!

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-01 14:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230227020045.1045105-1-sashal@kernel.org>
2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay Sasha Levin
2023-02-27  9:12   ` Johan Hovold
2023-03-01 14:15     ` Sasha Levin
2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 24/60] drm/msm/dsi: Add missing check for alloc_ordered_workqueue Sasha Levin
2023-02-27  2:00 ` [PATCH AUTOSEL 6.2 33/60] drm/msm/dpu: Add DSC hardware blocks to register snapshot Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox