From: sashiko-bot@kernel.org
To: "Mahadevan P" <mahadevan.p@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 2/6] drm/msm/dpu: do not assume a merged datapath when validating mode clock
Date: Thu, 08 Oct 2026 17:31:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-164414@kernel.org> (raw)
In-Reply-To: <20261008-lm_fixes_final-v4-2-fa986071c3c1@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/msm: 64-bit division causes build failure on 32-bit architectures
--
commit a2eae50c59c6c00875971ea5d298ddc98b93dc84
Author: Mahadevan P <mahadevan.p@oss.qualcomm.com>
drm/msm/dpu: do not assume a merged datapath when validating mode clock
This commit changes the mode clock validation logic in dpu_crtc_mode_valid()
to divide by the actual number of layer mixers used, rather than always
halving it when 3d_mux is present.
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 0b51a4c5db577..209b25dbeb6c8 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -1631,8 +1631,7 @@ static enum drm_mode_status dpu_crtc_mode_valid(struct drm_crtc *crtc,
> adjusted_mode_clk = dpu_core_perf_adjusted_mode_clk(mode->clock,
> dpu_kms->perf.perf_cfg);
>
> - if (dpu_kms->catalog->caps->has_3d_merge)
> - adjusted_mode_clk /= 2;
> + adjusted_mode_clk /= dpu_crtc_num_lm_for_mode(dpu_kms, mode);
[Severity: Low]
Does this code introduce a linker error on 32-bit architectures?
The variable adjusted_mode_clk is declared as a u64, and it is being divided
by the u32 result of dpu_crtc_num_lm_for_mode(). In the kernel, using the
direct division operator with a non-constant on a 64-bit variable emits
compiler built-in functions that are not linked on 32-bit architectures
like ARM32, leading to a build failure.
Could this be changed to perform the division using kernel macros like
do_div() or div_u64() instead?
>
> /*
> * The given mode, adjusted for the perf clock factor, should not exceed
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-lm_fixes_final-v4-0-fa986071c3c1@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-10-08 17:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 17:23 [PATCH v4 0/6] drm/msm/dpu: rework layer mixer allocation and mode limits Mahadevan P
2026-10-08 17:23 ` [PATCH v4 1/6] drm/msm/dpu: split modes a single layer mixer cannot clock Mahadevan P
2026-10-08 17:23 ` [PATCH v4 2/6] drm/msm/dpu: do not assume a merged datapath when validating mode clock Mahadevan P
2026-10-08 17:31 ` sashiko-bot [this message]
2026-10-12 12:09 ` Dmitry Baryshkov
2026-10-12 18:13 ` Mahadevan P
2026-10-08 17:23 ` [PATCH v4 3/6] drm/msm/dpu: check mode against PINGPONG or DSC max width Mahadevan P
2026-10-08 17:33 ` sashiko-bot
2026-10-12 12:14 ` Dmitry Baryshkov
2026-10-12 18:38 ` Mahadevan P
2026-10-08 17:23 ` [PATCH v4 4/6] drm/msm/dpu: filter writeback modes using writeback maxlinewidth Mahadevan P
2026-10-12 12:15 ` Dmitry Baryshkov
2026-10-08 17:23 ` [PATCH v4 5/6] drm/msm/dpu: remove max_mixer_width from catalog Mahadevan P
2026-10-08 17:23 ` [PATCH v4 6/6] drm/msm/dpu: limit the mode width to a pipe if the LM has no source split Mahadevan P
2026-10-12 12:21 ` Dmitry Baryshkov
2026-10-10 19:52 ` [PATCH v4 0/6] drm/msm/dpu: rework layer mixer allocation and mode limits Mahadevan P
2026-10-12 12:05 ` Dmitry Baryshkov
2026-10-13 7:33 ` Mahadevan P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-164414@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=mahadevan.p@oss.qualcomm.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.