2021-01-28 17:19:30

by Steve French

[permalink] [raw]
Subject: regression in drm_blank.c?

For the last month my logs have been flooded many times a second with:

"nouveau 0000:01:00.0: [drm] *ERROR* crtc 50: Can't calculate
constants, dotclock = 0!"

(see line 641 of drm_vblank.c) which is distracting for debugging all
other kernel problems (since dmesg entries on this system are 99+%
this message).

Am running current kernel ie 5.11-rc5 (although it also was very very
noisty in 5.10), Ubuntu mainline kernel builds, Lenovo P52 Thinkpad
laptop. Could it be due to one of the more recent changes to
drivers/gpu/drm/drm_vblank.c?

Ideas how to workaround this?

--
Thanks,

Steve


2021-01-28 19:02:22

by Ville Syrjälä

[permalink] [raw]
Subject: Re: regression in drm_blank.c?

On Thu, Jan 28, 2021 at 11:12:50AM -0600, Steve French wrote:
> For the last month my logs have been flooded many times a second with:
>
> "nouveau 0000:01:00.0: [drm] *ERROR* crtc 50: Can't calculate
> constants, dotclock = 0!"

Would indicate someone has a bogus adjusted_mode in their state struct.
Assuming this is one of those atomic nouveaus of course. No idea what
goes on with any of the older(?) stuff.

Sadly it's an error and not a WARN so we don't get a backtrace to
see who is calling it.

The only related changes around the atomic helpers I remember were
commit 441959ebc905 ("drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state()")
commit 4b31a9c77bf8 ("drm/atomic-helper: Extract drm_atomic_helper_calc_timestamping_constants()")
but those should be a nop for nouveau.

So no idea really. I'd suggest changing it to a WARN to see where it's
coming from and then adding more debugs to figure out why the mode
is garbage.

>
> (see line 641 of drm_vblank.c) which is distracting for debugging all
> other kernel problems (since dmesg entries on this system are 99+%
> this message).
>
> Am running current kernel ie 5.11-rc5 (although it also was very very
> noisty in 5.10), Ubuntu mainline kernel builds, Lenovo P52 Thinkpad
> laptop. Could it be due to one of the more recent changes to
> drivers/gpu/drm/drm_vblank.c?
>
> Ideas how to workaround this?
>
> --
> Thanks,
>
> Steve

--
Ville Syrj?l?
Intel