[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240314-thundering-steadfast-goat-a685cc@houat>
Date: Thu, 14 Mar 2024 16:04:29 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: David Laight <David.Laight@...lab.com>, Arnd Bergmann <arnd@...db.de>,
Naresh Kamboju <naresh.kamboju@...aro.org>, open list <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>, "linux-sunxi@...ts.linux.dev" <linux-sunxi@...ts.linux.dev>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>, "lkft-triage@...ts.linaro.org" <lkft-triage@...ts.linaro.org>,
Dave Airlie <airlied@...hat.com>, Dan Carpenter <dan.carpenter@...aro.org>,
Ard Biesheuvel <ardb@...nel.org>
Subject: Re: arm: ERROR: modpost: "__aeabi_uldivmod"
[drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined!
On Thu, Mar 14, 2024 at 10:27:23AM +0100, Geert Uytterhoeven wrote:
> On Sat, Mar 9, 2024 at 3:34 PM David Laight <David.Laight@...lab.com> wrote:
> > From: Maxime Ripard
> > > Sent: 04 March 2024 11:46
> > >
> > > On Mon, Mar 04, 2024 at 12:11:36PM +0100, Arnd Bergmann wrote:
> > > > On Mon, Mar 4, 2024, at 09:07, Naresh Kamboju wrote:
> > > > > The arm defconfig builds failed on today's Linux next tag next-20240304.
> > > > >
> > > > > Build log:
> > > > > ---------
> > > > > ERROR: modpost: "__aeabi_uldivmod"
> > > > > [drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined!
> > > > >
> > > >
> > > > Apparently caused by the 64-bit division in 358e76fd613a
> > > > ("drm/sun4i: hdmi: Consolidate atomic_check and mode_valid"):
> > > >
> > > >
> > > > +static enum drm_mode_status
> > > > +sun4i_hdmi_connector_clock_valid(const struct drm_connector *connector,
> > > > + const struct drm_display_mode *mode,
> > > > + unsigned long long clock)
> > > > {
> > > > - struct sun4i_hdmi *hdmi = drm_encoder_to_sun4i_hdmi(encoder);
> > > > - unsigned long rate = mode->clock * 1000;
> > > > - unsigned long diff = rate / 200; /* +-0.5% allowed by HDMI spec */
> > > > + const struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector);
> > > > + unsigned long diff = clock / 200; /* +-0.5% allowed by HDMI spec */
> > > > long rounded_rate;
> > > >
> > > > This used to be a 32-bit division. If the rate is never more than
> > > > 4.2GHz, clock could be turned back into 'unsigned long' to avoid
> > > > the expensive div_u64().
> > >
> > > I sent a fix for it this morning:
> > > https://lore.kernel.org/r/20240304091225.366325-1-mripard@kernel.org
> > >
> > > The framework will pass an unsigned long long because HDMI character
> > > rates can go up to 5.9GHz.
> >
> > You could do:
> > /* The max clock is 5.9GHz, split the divide */
> > u32 diff = (u32)(clock / 8) / (200/8);
>
> +1, as the issue is still present in current next, as per the recent
> nagging from the build bots.
A patch to fix it has been merged today and will show up tomorrow in next.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists