Skip to contentSkip to conversation

RFC: Convert dev_* logging to drm_*() for multi-instance GUD devices?

drm/gud Hardik Phalet 3 participants 5 messages Feb 23 – Feb 26

lore
Share & tools
lore
#0 lore raw

Hi Ruben,

I am looking to work on a small starter task in DRM and was considering converting logging in drivers/gpu/drm/gud from dev_info/dev_warn/dev_err to the drm_*() helpers where a struct drm_device is already (or readily) available.

Since GUD is a USB-backed DRM driver and can have multiple active instances, using drm_*() would make log messages instance-aware and consistent with DRM drivers.

Before preparing a patch series, I wanted to check whether this kind of conversion is welcome for GUD, and whether there are any parts of the driver you would prefer to keep using dev_*() instead of drm_*().

If this is fine, I plan to keep the changes mechanical and scoped only to call sites where drm_device is already in scope, preserving logging semantics.

Thanks,
Hardik

#1 lore raw

Hi

Am 22.02.26 um 07:45 schrieb Hardik Phalet:

Quoted 11 lines

Hi Ruben,

I am looking to work on a small starter task in DRM and was considering converting logging in drivers/gpu/drm/gud from dev_info/dev_warn/dev_err to the drm_*() helpers where a struct drm_device is already (or readily) available.

Since GUD is a USB-backed DRM driver and can have multiple active instances, using drm_*() would make log messages instance-aware and consistent with DRM drivers.

Quoted 7 lines

Before preparing a patch series, I wanted to check whether this kind of conversion is welcome for GUD, and whether there are any parts of the driver you would prefer to keep using dev_*() instead of drm_*().

If this is fine, I plan to keep the changes mechanical and scoped only to call sites where drm_device is already in scope, preserving logging semantics.

I'm not Ruben, but generally speaking that conversion of the logging is ok. But there's not much in gud to convert and the early calls in gud_probe() should rather not be converted.

If you're looking for an easy task, maybe try open-coding drm_simple_encoder_init(). There's an upcoming TODO item at [1].

Best regards
Thomas

[1] https://lore.kernel.org/dri-devel/[email protected]/T/#Z2e.:..:20260224153656.261351-17-tzimmermann::40suse.de:1Documentation:gpu:todo.rst

Quoted 4 lines

Thanks,
Hardik

Signature · 6 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
#2 lore raw

Hi

Quoted 9 lines · Thomas Zimmermann

Hi

Am 22.02.26 um 07:45 schrieb Hardik Phalet:

Quoted 6 lines

Hi Ruben,

I am looking to work on a small starter task in DRM and was considering converting logging in drivers/gpu/drm/gud from dev_info/dev_warn/dev_err to the drm_*() helpers where a struct drm_device is already (or readily) available.

My apologies, I seem to have missed this message in the first place, I think this is mainly fine.

Quoted 8 lines
Quoted 8 lines

Since GUD is a USB-backed DRM driver and can have multiple active instances, using drm_*() would make log messages instance-aware and consistent with DRM drivers.

Before preparing a patch series, I wanted to check whether this kind of conversion is welcome for GUD, and whether there are any parts of the driver you would prefer to keep using dev_*() instead of drm_*().

In my opinion, logging that relates specifically to USB should use dev rather than logging that relates to drm, if it does relate to drm then it should be fine to convert them. I'm happy to accept a patch.

Quoted 8 lines
Quoted 4 lines

If this is fine, I plan to keep the changes mechanical and scoped only to call sites where drm_device is already in scope, preserving logging semantics.

I'm not Ruben, but generally speaking that conversion of the logging is ok. But there's not much in gud to convert and the early calls in gud_probe() should rather not be converted.

I agree with Thomas here, gud_probe() as a function is still a bit of a mess, but since it relates to early init, and the early parts are mainly to do with USB and capabilities assessment, they should remain dev

Quoted 3 lines

If you're looking for an easy task, maybe try open-coding drm_simple_encoder_init(). There's an upcoming TODO item at [1].

I'm happy for you to do conversions if you want, but this also seems to be a good task to do. If not I probably will end up looking at it myself eventually.

Ruben

Quoted 11 lines

Best regards
Thomas

[1]
https://lore.kernel.org/dri-devel/[email protected]/T/#Z2e.:..:20260224153656.261351-17-tzimmermann::40suse.de:1Documentation:gpu:todo.rst

Quoted 4 lines

Thanks,
Hardik

#3 lore raw

Hi Ruben, hi Thomas,

I’ll pick up the drm_simple_encoder_init() TODO first. Once that’s in a good shape, I can look into the logging conversion in GUD as a follow-up.

I’ll send a patch for the encoder cleanup once I have something ready.

Thanks for the pointers!

regards,
Hardik

Quoted 61 lines · Ruben Wauters

Hi

Quoted 9 lines · Thomas Zimmermann

Hi

Am 22.02.26 um 07:45 schrieb Hardik Phalet:

Quoted 6 lines

Hi Ruben,

I am looking to work on a small starter task in DRM and was considering converting logging in drivers/gpu/drm/gud from dev_info/dev_warn/dev_err to the drm_*() helpers where a struct drm_device is already (or readily) available.

My apologies, I seem to have missed this message in the first place, I think this is mainly fine.

Quoted 8 lines
Quoted 8 lines

Since GUD is a USB-backed DRM driver and can have multiple active instances, using drm_*() would make log messages instance-aware and consistent with DRM drivers.

Before preparing a patch series, I wanted to check whether this kind of conversion is welcome for GUD, and whether there are any parts of the driver you would prefer to keep using dev_*() instead of drm_*().

In my opinion, logging that relates specifically to USB should use dev rather than logging that relates to drm, if it does relate to drm then it should be fine to convert them. I'm happy to accept a patch.

Quoted 8 lines
Quoted 4 lines

If this is fine, I plan to keep the changes mechanical and scoped only to call sites where drm_device is already in scope, preserving logging semantics.

I'm not Ruben, but generally speaking that conversion of the logging is ok. But there's not much in gud to convert and the early calls in gud_probe() should rather not be converted.

I agree with Thomas here, gud_probe() as a function is still a bit of a mess, but since it relates to early init, and the early parts are mainly to do with USB and capabilities assessment, they should remain dev

Quoted 3 lines

If you're looking for an easy task, maybe try open-coding drm_simple_encoder_init(). There's an upcoming TODO item at [1].

I'm happy for you to do conversions if you want, but this also seems to be a good task to do. If not I probably will end up looking at it myself eventually.

Ruben

Quoted 11 lines

Best regards
Thomas

[1]
https://lore.kernel.org/dri-devel/[email protected]/T/#Z2e.:..:20260224153656.261351-17-tzimmermann::40suse.de:1Documentation:gpu:todo.rst

Quoted 4 lines

Thanks,
Hardik

#4 lore raw

Hi

Am 25.02.26 um 15:27 schrieb hardik.phalet:

Quoted 3 lines

Hi Ruben, hi Thomas,

I’ll pick up the drm_simple_encoder_init() TODO first. Once that’s in a good shape, I can look into the logging conversion in GUD as a follow-up.

There are a lot of them. I strongly suggest to send one patch at a time.

Best regards
Thomas

Quoted 60 lines

I’ll send a patch for the encoder cleanup once I have something ready.

Thanks for the pointers!

regards,
Hardik

Quoted 49 lines · Ruben Wauters

Hi

Quoted 9 lines · Thomas Zimmermann

Hi

Am 22.02.26 um 07:45 schrieb Hardik Phalet:

Quoted 6 lines

Hi Ruben,

I am looking to work on a small starter task in DRM and was considering converting logging in drivers/gpu/drm/gud from dev_info/dev_warn/dev_err to the drm_*() helpers where a struct drm_device is already (or readily) available.

My apologies, I seem to have missed this message in the first place, I think this is mainly fine.

Quoted 7 lines
Quoted 7 lines

Since GUD is a USB-backed DRM driver and can have multiple active instances, using drm_*() would make log messages instance-aware and consistent with DRM drivers.

Before preparing a patch series, I wanted to check whether this kind of conversion is welcome for GUD, and whether there are any parts of the driver you would prefer to keep using dev_*() instead of drm_*().

In my opinion, logging that relates specifically to USB should use dev rather than logging that relates to drm, if it does relate to drm then it should be fine to convert them. I'm happy to accept a patch.

Quoted 6 lines
Quoted 3 lines

If this is fine, I plan to keep the changes mechanical and scoped only to call sites where drm_device is already in scope, preserving logging semantics.

I'm not Ruben, but generally speaking that conversion of the logging is ok. But there's not much in gud to convert and the early calls in gud_probe() should rather not be converted.

I agree with Thomas here, gud_probe() as a function is still a bit of a mess, but since it relates to early init, and the early parts are mainly to do with USB and capabilities assessment, they should remain dev

Quoted 2 lines

If you're looking for an easy task, maybe try open-coding drm_simple_encoder_init(). There's an upcoming TODO item at [1].

I'm happy for you to do conversions if you want, but this also seems to be a good task to do. If not I probably will end up looking at it myself eventually.

Ruben

Quoted 8 lines

Best regards
Thomas

[1]
https://lore.kernel.org/dri-devel/[email protected]/T/#Z2e.:..:20260224153656.261351-17-tzimmermann::40suse.de:1Documentation:gpu:todo.rst

Quoted 3 lines

Thanks,
Hardik

Signature · 6 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)