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 <[email protected]> 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/[email protected]?part=2
