dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT 0/2] drm/vc4: Clear the display list on startup
@ 2021-01-12 13:47 Maxime Ripard
  2021-01-12 13:47 ` [PATCH RFT 1/2] ARM: dts: bcm2711: Fix the HVS size Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-01-12 13:47 UTC (permalink / raw)
  To: Lucas Nussbaum; +Cc: Maxime Ripard, dri-devel, Dave Stevenson

Hi Lucas,

Given that I'm not having a great success at reproducing the issue you
mentioned, could you test the following patches to see if it improves things?

Thanks!
Maxime

Maxime Ripard (2):
  ARM: dts: bcm2711: Fix the HVS size
  drm/vc4: hvs: Clear the HVS list at boot

 arch/arm/boot/dts/bcm2711.dtsi |  1 +
 drivers/gpu/drm/vc4/vc4_drv.c  |  1 +
 drivers/gpu/drm/vc4/vc4_drv.h  |  1 +
 drivers/gpu/drm/vc4/vc4_hvs.c  | 12 ++++++++++++
 4 files changed, 15 insertions(+)

-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH RFT 1/2] ARM: dts: bcm2711: Fix the HVS size
  2021-01-12 13:47 [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Maxime Ripard
@ 2021-01-12 13:47 ` Maxime Ripard
  2021-01-12 13:47 ` [PATCH RFT 2/2] drm/vc4: hvs: Clear the HVS list at boot Maxime Ripard
  2021-01-12 19:56 ` [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Lucas Nussbaum
  2 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-01-12 13:47 UTC (permalink / raw)
  To: Lucas Nussbaum; +Cc: Maxime Ripard, dri-devel, Dave Stevenson

The BCM2711 has a larger HVS size than the earlier SoCs.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 arch/arm/boot/dts/bcm2711.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 4847dd305317..5254c63fbf8f 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -290,6 +290,7 @@ pixelvalve4: pixelvalve@7e216000 {
 
 		hvs: hvs@7e400000 {
 			compatible = "brcm,bcm2711-hvs";
+			reg = <0x7e400000 0x8000>;
 			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH RFT 2/2] drm/vc4: hvs: Clear the HVS list at boot
  2021-01-12 13:47 [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Maxime Ripard
  2021-01-12 13:47 ` [PATCH RFT 1/2] ARM: dts: bcm2711: Fix the HVS size Maxime Ripard
@ 2021-01-12 13:47 ` Maxime Ripard
  2021-01-12 19:56 ` [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Lucas Nussbaum
  2 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-01-12 13:47 UTC (permalink / raw)
  To: Lucas Nussbaum; +Cc: Maxime Ripard, dri-devel, Dave Stevenson

The kernel boots with the display running and we make sure to shut down
the scan out engines properly but we keep the display list for now.
Let's make sure we start from a clean state.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_drv.c |  1 +
 drivers/gpu/drm/vc4/vc4_drv.h |  1 +
 drivers/gpu/drm/vc4/vc4_hvs.c | 12 ++++++++++++
 3 files changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 2cd97a39c286..9fbf03872b24 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -289,6 +289,7 @@ static int vc4_drm_bind(struct device *dev)
 
 	drm_for_each_crtc(crtc, drm)
 		vc4_crtc_disable_at_boot(crtc);
+	vc4_hvs_clear_dlist(drm);
 
 	ret = drm_dev_register(drm, 0);
 	if (ret < 0)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
index 051ad4e31e52..493a85c4d11a 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.h
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
@@ -911,6 +911,7 @@ void vc4_irq_reset(struct drm_device *dev);
 
 /* vc4_hvs.c */
 extern struct platform_driver vc4_hvs_driver;
+void vc4_hvs_clear_dlist(struct drm_device *dev);
 void vc4_hvs_stop_channel(struct drm_device *dev, unsigned int output);
 int vc4_hvs_get_fifo_from_output(struct drm_device *dev, unsigned int output);
 int vc4_hvs_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state);
diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index 2b3a597fa65f..1fe40f3cbcfb 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -326,6 +326,18 @@ void vc4_hvs_stop_channel(struct drm_device *dev, unsigned int chan)
 		     SCALER_DISPSTATX_EMPTY);
 }
 
+void vc4_hvs_clear_dlist(struct drm_device *dev)
+{
+	struct vc4_dev *vc4 = to_vc4_dev(dev);
+	void __iomem *dlist_start = vc4->hvs->dlist;
+	unsigned int i;
+
+	for (i = 0; i < 0x4000; i += 4)
+		writel(SCALER_CTL0_END, dlist_start + i);
+
+	vc4_hvs_dump_state(dev);
+}
+
 int vc4_hvs_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
 {
 	struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH RFT 0/2] drm/vc4: Clear the display list on startup
  2021-01-12 13:47 [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Maxime Ripard
  2021-01-12 13:47 ` [PATCH RFT 1/2] ARM: dts: bcm2711: Fix the HVS size Maxime Ripard
  2021-01-12 13:47 ` [PATCH RFT 2/2] drm/vc4: hvs: Clear the HVS list at boot Maxime Ripard
@ 2021-01-12 19:56 ` Lucas Nussbaum
  2021-01-13  0:51   ` Ryutaroh Matsumoto
  2 siblings, 1 reply; 6+ messages in thread
From: Lucas Nussbaum @ 2021-01-12 19:56 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Ryutaroh Matsumoto, dri-devel, Dave Stevenson

Hi Maxime,

On 12/01/21 at 14:47 +0100, Maxime Ripard wrote:
> Hi Lucas,
> 
> Given that I'm not having a great success at reproducing the issue you
> mentioned, could you test the following patches to see if it improves things?

Unfortunately I'm missing a cable and will only get it back during the
week-end, so I cannot test before early next week. However I'm Ccing
Ryutaroh Matsumoto who could also reproduce it. Maybe he is in a better
position to test this (@Ryutaroh: I bounced the patches to you).

Lucas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH RFT 0/2] drm/vc4: Clear the display list on startup
  2021-01-12 19:56 ` [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Lucas Nussbaum
@ 2021-01-13  0:51   ` Ryutaroh Matsumoto
  2021-01-13 16:11     ` Maxime Ripard
  0 siblings, 1 reply; 6+ messages in thread
From: Ryutaroh Matsumoto @ 2021-01-13  0:51 UTC (permalink / raw)
  To: lucas; +Cc: maxime, dri-devel, dave.stevenson

Hi Lucas,

> week-end, so I cannot test before early next week. However I'm Ccing
> Ryutaroh Matsumoto who could also reproduce it. Maybe he is in a better
> position to test this (@Ryutaroh: I bounced the patches to you).

Should I apply PATCH RFT 0--2/2 to
https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.7.tar.xz
or some branch of someone's git repo?

On my Raspberry Pi 4B 8GB model, all versioins up to upstream 5.10.6
fail to boot on USB MSD due to changes to the USB handling by raspi
introduced in 5.10 series, and failed to boot from an SD card up to 5.10.3
or so. No working WiFi connections neither on my raspi 4b.

I am unsure if I can test the patch reliably. But I will try it within a few days.

Best regards, Ryutaroh
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH RFT 0/2] drm/vc4: Clear the display list on startup
  2021-01-13  0:51   ` Ryutaroh Matsumoto
@ 2021-01-13 16:11     ` Maxime Ripard
  0 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-01-13 16:11 UTC (permalink / raw)
  To: Ryutaroh Matsumoto; +Cc: lucas, dri-devel, dave.stevenson


[-- Attachment #1.1: Type: text/plain, Size: 1036 bytes --]

Hi Ryutaroh, Lucas,

On Wed, Jan 13, 2021 at 09:51:59AM +0900, Ryutaroh Matsumoto wrote:
> Hi Lucas,
> 
> > week-end, so I cannot test before early next week. However I'm Ccing
> > Ryutaroh Matsumoto who could also reproduce it. Maybe he is in a better
> > position to test this (@Ryutaroh: I bounced the patches to you).
> 
> Should I apply PATCH RFT 0--2/2 to
> https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.7.tar.xz
> or some branch of someone's git repo?
> 
> On my Raspberry Pi 4B 8GB model, all versioins up to upstream 5.10.6
> fail to boot on USB MSD due to changes to the USB handling by raspi
> introduced in 5.10 series, and failed to boot from an SD card up to 5.10.3
> or so. No working WiFi connections neither on my raspi 4b.
> 
> I am unsure if I can test the patch reliably. But I will try it within a few days.

We just had another lead on this one and that patch doesn't seem to
prove useful to fix it, so it's probably better to hold off the testing
at this point

Thanks!
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2021-01-14  9:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 13:47 [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Maxime Ripard
2021-01-12 13:47 ` [PATCH RFT 1/2] ARM: dts: bcm2711: Fix the HVS size Maxime Ripard
2021-01-12 13:47 ` [PATCH RFT 2/2] drm/vc4: hvs: Clear the HVS list at boot Maxime Ripard
2021-01-12 19:56 ` [PATCH RFT 0/2] drm/vc4: Clear the display list on startup Lucas Nussbaum
2021-01-13  0:51   ` Ryutaroh Matsumoto
2021-01-13 16:11     ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).