Skip to contentSkip to conversation

drm/nouveau: Small CRC fixes for 5.9

PATCH In review Lyude Paul 3 participants 4 messages Aug 10, 2020 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Lyude Paul

author
#0 lore raw

cover drm/nouveau: Small CRC fixes for 5.9

Just two CRC related fixes for the new CRC functionality in 5.9. One of these unbreaks CRC reporting on volta+, which accidentally got broken when converting over to nvidia's class headers. The other simply removes an unneeded CRC method call that's been hiding in head907d_mode() for quite a while now.

Lyude Paul (2):
drm/nouveau/kms/nv140-: Include correct push header in crcc37d.c drm/nouveau/kms/nv50-: Don't call HEAD_SET_CRC_CONTROL in

    head907d_mode()
 drivers/gpu/drm/nouveau/dispnv50/crcc37d.c  |  2 +-
 drivers/gpu/drm/nouveau/dispnv50/head907d.c | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)
Signature · 1 line
2.26.2
maintainer
#1 lore raw

PATCH 1/2 drm/nouveau/kms/nv140-: Include correct push header in crcc37d.c

Looks like when we converted everything over to Nvidia's class headers, we mistakenly included the nvif/push507b.h instead of nvif/pushc37b.h, which resulted in breaking CRC reporting for volta+:

nouveau 0000:1f:00.0: disp: chid 0 stat 10003361 reason 3 [RESERVED_METHOD] mthd 0d84 data 00000000 code 00000000 nouveau 0000:1f:00.0: disp: chid 0 stat 10003360 reason 3 [RESERVED_METHOD] mthd 0d80 data 00000000 code 00000000 nouveau 0000:1f:00.0: DRM: CRC notifier ctx for head 3 not finished after 50ms

So, fix that.

Fixes c4b27bc8682c ("drm/nouveau/kms/nv50-: convert core crc_set_src() to new push macros")
---
 drivers/gpu/drm/nouveau/dispnv50/crcc37d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/dispnv50/crcc37d.c +1 -1
index 9afe9a87bde0c..814e5bd974460 100644
@@ -6,7 +6,7 @@
 #include "disp.h"
 #include "head.h"
 
-#include <nvif/push507c.h>
+#include <nvif/pushc37b.h>
 
 #include <nvhw/class/clc37d.h>
 
Signature · 1 line
2.26.2
maintainer
#2 lore raw

PATCH 2/2 drm/nouveau/kms/nv50-: Don't call HEAD_SET_CRC_CONTROL in head907d_mode()

In reply to Lyude Paul

This was a mistake that was present before, but never got noticed until we converted over to using nvidia's class headers for display programming. Luckily though it never caused any problems, since we always end up calling crc907d_set_src() after head907d_mode().

So, let's get rid of this.

---
 drivers/gpu/drm/nouveau/dispnv50/head907d.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/head907d.c +2 -9
index 8f860e9c52247..85648d790743f 100644
@@ -322,7 +322,7 @@ head907d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
 	const int i = head->base.index;
 	int ret;
 
-	if ((ret = PUSH_WAIT(push, 14)))
+	if ((ret = PUSH_WAIT(push, 13)))
 		return ret;
 
 	PUSH_MTHD(push, NV907D, HEAD_SET_OVERSCAN_COLOR(i),
@@ -353,14 +353,7 @@ head907d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
 	PUSH_MTHD(push, NV907D, HEAD_SET_DEFAULT_BASE_COLOR(i),
 		  NVVAL(NV907D, HEAD_SET_DEFAULT_BASE_COLOR, RED, 0) |
 		  NVVAL(NV907D, HEAD_SET_DEFAULT_BASE_COLOR, GREEN, 0) |
-		  NVVAL(NV907D, HEAD_SET_DEFAULT_BASE_COLOR, BLUE, 0),
-
-				HEAD_SET_CRC_CONTROL(i),
-		  NVDEF(NV907D, HEAD_SET_CRC_CONTROL, CONTROLLING_CHANNEL, CORE) |
-		  NVDEF(NV907D, HEAD_SET_CRC_CONTROL, EXPECT_BUFFER_COLLAPSE, FALSE) |
-		  NVDEF(NV907D, HEAD_SET_CRC_CONTROL, TIMESTAMP_MODE, FALSE) |
-		  NVDEF(NV907D, HEAD_SET_CRC_CONTROL, PRIMARY_OUTPUT, NONE) |
-		  NVDEF(NV907D, HEAD_SET_CRC_CONTROL, SECONDARY_OUTPUT, NONE));
+		  NVVAL(NV907D, HEAD_SET_DEFAULT_BASE_COLOR, BLUE, 0));
 
 	PUSH_MTHD(push, NV907D, HEAD_SET_PIXEL_CLOCK_FREQUENCY(i),
 		  NVVAL(NV907D, HEAD_SET_PIXEL_CLOCK_FREQUENCY, HERTZ, m->clock * 1000) |
Signature · 1 line
2.26.2

A message that is not in the archive (sent off-list or not yet received): 20200810211838.37862-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#4 lore raw
Quoted 9 lines · Lyude Paul

Just two CRC related fixes for the new CRC functionality in 5.9. One of these unbreaks CRC reporting on volta+, which accidentally got broken when converting over to nvidia's class headers. The other simply removes an unneeded CRC method call that's been hiding in head907d_mode() for quite a while now.

Lyude Paul (2):
drm/nouveau/kms/nv140-: Include correct push header in crcc37d.c

Got them both. I already had this first one in my tree, but your description was better, so I took yours.

Thanks,
Ben.

Quoted 14 lines

drm/nouveau/kms/nv50-: Don't call HEAD_SET_CRC_CONTROL in

    head907d_mode()
 drivers/gpu/drm/nouveau/dispnv50/crcc37d.c  |  2 +-
 drivers/gpu/drm/nouveau/dispnv50/head907d.c | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)

--
2.26.2

_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau