From: sashiko-bot@kernel.org
To: "Yongbang Shi" <shiyongbang@huawei.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH for drm-misc-fixes v6 2/2] drm/hisilicon/hibmc: Add a flag to indicate whether the OS-side driver has been loaded
Date: Thu, 26 Nov 2026 03:25:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-234696@kernel.org> (raw)
In-Reply-To: <20261126030648.3231196-3-shiyongbang@huawei.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/hisilicon/hibmc: missing DP IRQ in hibmc_msi_init() on
1-MSI fallback
--
commit 69a03a5b7c8791a711817f3c15bf41b6de54192a
Author: Lin He <helin52@huawei.com>
drm/hisilicon/hibmc: Add a flag to indicate whether the OS-side driver has been loaded
This commit tracks DisplayPort initialization with a flag, only requests
the DP MSI vector when DP is initialized, and updates HIBMC_ENABLE_FLAG
under a spinlock to tell the BMC when the driver is ready.
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index a110b5e15e596..1e01a210b047d 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
[ ... ]
> @@ -347,12 +349,17 @@ static void hibmc_unload(struct drm_device *dev)
> static int hibmc_msi_init(struct drm_device *dev)
> {
> struct pci_dev *pdev = to_pci_dev(dev->dev);
> + struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
> + int max_vectors = HIBMC_MIN_VECTORS;
> int valid_irq_num;
> int irq;
> int ret;
>
> - ret = pci_alloc_irq_vectors(pdev, HIBMC_MIN_VECTORS,
> - HIBMC_MAX_VECTORS, PCI_IRQ_MSI);
> + if (priv->dp.initialized)
> + max_vectors = HIBMC_MAX_VECTORS;
> +
> + ret = pci_alloc_irq_vectors(pdev, HIBMC_MIN_VECTORS, max_vectors,
> + PCI_IRQ_MSI);
> if (ret < 0) {
> drm_err(dev, "enabling MSI failed: %d\n", ret);
> return ret;
[Severity: Medium]
Can pci_alloc_irq_vectors() succeed with only 1 MSI vector when
priv->dp.initialized is true?
Passing HIBMC_MIN_VECTORS (1) as min_vecs allows pci_alloc_irq_vectors()
to fall back to a single vector when multi-MSI is unavailable or vectors
are constrained. In that case the loop below only registers
hibmc_interrupt() on vector 0 and never installs hibmc_dp_interrupt(),
yet hibmc_set_enable_flag() still sets HIBMC_ENABLE_STATE and
hibmc_dp_late_register() unmasks DP interrupts, leaving DP HPD broken and
DP interrupts unhandled on vector 0.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126030648.3231196-1-shiyongbang@huawei.com?part=2
prev parent reply other threads:[~2026-11-26 3:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 3:06 [PATCH for drm-misc-fixes v6 0/2] Fix some bugs in the hibmc DP Yongbang Shi
2026-11-26 3:06 ` [PATCH for drm-misc-fixes v6 1/2] drm/hisilicon/hibmc: Modify the method of obtaining the hpd_status Yongbang Shi
2026-11-26 3:32 ` sashiko-bot
2026-11-26 3:06 ` [PATCH for drm-misc-fixes v6 2/2] drm/hisilicon/hibmc: Add a flag to indicate whether the OS-side driver has been loaded Yongbang Shi
2026-11-26 3:25 ` sashiko-bot [this message]
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-234696@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shiyongbang@huawei.com \
/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.