diff mbox series

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

Message ID 20191204133435.17462-1-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm/mgag200: Debug-print unique revisions id on G200 SE | expand

Commit Message

Thomas Zimmermann Dec. 4, 2019, 1:34 p.m. UTC
The behavior of MGA G200 SE depends on the rev id. Print the id when
debugging is enabled.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Gerd Hoffmann Dec. 5, 2019, 8:03 a.m. UTC | #1
On Wed, Dec 04, 2019 at 02:34:35PM +0100, Thomas Zimmermann wrote:
> 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?

> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
> index e1bc5b0aa774..aeb7c10ded0d 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_main.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_main.c
> @@ -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).

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd
Thomas Zimmermann Dec. 5, 2019, 8:05 a.m. UTC | #2
Hi

Am 05.12.19 um 09:03 schrieb Gerd Hoffmann:
> On Wed, Dec 04, 2019 at 02:34:35PM +0100, Thomas Zimmermann wrote:
>> 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.

> 
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>  drivers/gpu/drm/mgag200/mgag200_main.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
>> index e1bc5b0aa774..aeb7c10ded0d 100644
>> --- a/drivers/gpu/drm/mgag200/mgag200_main.c
>> +++ b/drivers/gpu/drm/mgag200/mgag200_main.c
>> @@ -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).
> 
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>

Thanks.

Best regards
Thomas

> 
> cheers,
>   Gerd
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index e1bc5b0aa774..aeb7c10ded0d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -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)