Skip to contentSkip to conversation

drm/mgag200: Debug-print unique revisions id on G200 SE

PATCH In review Thomas Zimmermann 2 participants 3 messages Dec 4, 2019 – Dec 5, 2019

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/mgag200: Debug-print unique revisions id on G200 SE

The behavior of MGA G200 SE depends on the rev id. Print the id when debugging is enabled.

---
 drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_main.c +4 -1
index e1bc5b0aa774..aeb7c10ded0d 100644
@@ -118,8 +118,11 @@ static int mgag200_device_init(struct drm_device *dev,
 		return -ENOMEM;
 
 	/* stash G200 SE model number for later use */
-	if (IS_G200_SE(mdev))
+	if (IS_G200_SE(mdev)) {
 		mdev->unique_rev_id = RREG32(0x1e24);
+		DRM_DEBUG("G200 SE unique revision id is 0x%x\n",
+			  mdev->unique_rev_id);
+	}
 
 	ret = mga_vram_init(mdev);
 	if (ret)
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Thomas Zimmermann

The behavior of MGA G200 SE depends on the rev id. Print the id when debugging is enabled.

That is the one where some need a workaround, right?

Quoted 10 lines
---
 drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_main.c +0 -0
index e1bc5b0aa774..aeb7c10ded0d 100644

drivers/gpu/drm/mgag200/mgag200_main.c static int mgag200_device_init(struct drm_device *dev, · line 124

Quoted 8 lines
drivers/gpu/drm/mgag200/mgag200_main.c +3 -1
@@ -118,8 +118,11 @@ static int mgag200_device_init(struct drm_device *dev,
 		return -ENOMEM;
 
 	/* stash G200 SE model number for later use */
-	if (IS_G200_SE(mdev))
+	if (IS_G200_SE(mdev)) {
 		mdev->unique_rev_id = RREG32(0x1e24);
+		DRM_DEBUG("G200 SE unique revision id is 0x%x\n",
+			  mdev->unique_rev_id);

Maybe use DRM_INFO here? Temporarily for a few kernel revisions, until things are settled?

(just a suggestion, your choice).

cheers,
Gerd

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#2 lore raw

Hi

Am 05.12.19 um 09:03 schrieb Gerd Hoffmann:

Quoted 5 lines · Thomas Zimmermann
Quoted 2 lines

The behavior of MGA G200 SE depends on the rev id. Print the id when debugging is enabled.

That is the one where some need a workaround, right?

Yes. Hopefully this ID helps with figuring out the broken ones.

Quoted 23 lines
Quoted 11 lines
---
 drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_main.c +0 -0
index e1bc5b0aa774..aeb7c10ded0d 100644

drivers/gpu/drm/mgag200/mgag200_main.c static int mgag200_device_init(struct drm_device *dev, · line 124

Quoted 8 lines
drivers/gpu/drm/mgag200/mgag200_main.c +3 -1
@@ -118,8 +118,11 @@ static int mgag200_device_init(struct drm_device *dev,
 		return -ENOMEM;
 
 	/* stash G200 SE model number for later use */
-	if (IS_G200_SE(mdev))
+	if (IS_G200_SE(mdev)) {
 		mdev->unique_rev_id = RREG32(0x1e24);
+		DRM_DEBUG("G200 SE unique revision id is 0x%x\n",
+			  mdev->unique_rev_id);

Maybe use DRM_INFO here? Temporarily for a few kernel revisions, until things are settled?

Quoted 3 lines

(just a suggestion, your choice).

Thanks.

Best regards
Thomas

Quoted 4 lines

cheers,
Gerd

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel