public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Ioana Ciocoi-Radulescu" <ruxandra.radulescu@nxp.com>,
	"Oded Gabbay" <ogabbay@kernel.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>, "Frank Li" <Frank.Li@nxp.com>,
	"Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
	Jiwei Fu <jiwei.fu@nxp.com>, Forrest Shi <xuelin.shi@nxp.com>,
	Alexandru Taran <alexandru.taran@nxp.com>,
	Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [PATCH v2 4/9] accel/neutron: Add driver for NXP Neutron NPU
Date: Fri, 6 Mar 2026 15:21:38 +0100	[thread overview]
Message-ID: <110dace9-3ff9-4750-813f-93c6827b105c@kernel.org> (raw)
In-Reply-To: <20260306-neutron-v2-4-3019bd8c91ef@nxp.com>

On 06/03/2026 14:27, Ioana Ciocoi-Radulescu wrote:
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8a5b27b061da..f7a687eb6b54 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19191,6 +19191,16 @@ S:	Orphan
>  F:	Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
>  F:	drivers/nfc/nxp-nci
>  
> +NXP Neutron NPU DRIVER

s/Neutron/NEUTRON/ as everything here is in uppercase

> +M:	Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
> +M:	Jiwei Fu <jiwei.fu@nxp.com>
> +L:	dri-devel@lists.freedesktop.org
> +S:	Maintained
> +T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
> +F:	Documentation/accel/neutron/
> +F:	drivers/accel/neutron/
> +F:	include/uapi/drm/neutron_accel.h


>  
> diff --git a/drivers/accel/Makefile b/drivers/accel/Makefile
> index 1d3a7251b950..698136e12cce 100644
> --- a/drivers/accel/Makefile
> +++ b/drivers/accel/Makefile
> @@ -4,5 +4,6 @@ obj-$(CONFIG_DRM_ACCEL_AMDXDNA)		+= amdxdna/
>  obj-$(CONFIG_DRM_ACCEL_ARM_ETHOSU)	+= ethosu/
>  obj-$(CONFIG_DRM_ACCEL_HABANALABS)	+= habanalabs/
>  obj-$(CONFIG_DRM_ACCEL_IVPU)		+= ivpu/
> +obj-$(CONFIG_DRM_ACCEL_NXP_NEUTRON)	+= neutron/
>  obj-$(CONFIG_DRM_ACCEL_QAIC)		+= qaic/
> -obj-$(CONFIG_DRM_ACCEL_ROCKET)		+= rocket/
> \ No newline at end of file

You still have patch warnings.

> +obj-$(CONFIG_DRM_ACCEL_ROCKET)		+= rocket/
> diff --git a/drivers/accel/neutron/Kconfig b/drivers/accel/neutron/Kconfig
> new file mode 100644
> index 000000000000..37b8ecb49804
> --- /dev/null
> +++ b/drivers/accel/neutron/Kconfig
> @@ -0,0 +1,16 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +
> +config DRM_ACCEL_NXP_NEUTRON
> +	tristate "NXP Neutron NPU"
> +	depends on HAS_IOMEM
> +	depends on DRM_ACCEL
> +	depends on ARCH_MXC

Missing compile test

> +	select DRM_GEM_DMA_HELPER
> +	select DRM_SCHED
> +	help
> +	  Enables driver for NXP Neutron NPU.
> +
> +	  Select this if you have an NXP SoC with Neutron, like i.MX95,
> +	  and want to run machine learning applications.
> +
> +	  If built as module, the module is named neutron.

...

> +
> +	ret = devm_request_threaded_irq(dev, ndev->irq, NULL,
> +					neutron_irq_handler_thread,
> +					IRQF_ONESHOT, KBUILD_MODNAME, ndev);
> +	if (ret) {
> +		dev_err(dev, "Failed to request irq %d\n", ndev->irq);

Drop, not needed.

> +		return ret;
> +	}
> +
> +	ret = of_reserved_mem_device_init(&pdev->dev);
> +	if (ret) {
> +		dev_err(dev, "Failed to initialize reserved memory\n");
> +		return ret;
> +	}
> +
> +	ret = devm_pm_runtime_enable(dev);
> +	if (ret)
> +		goto free_reserved;
> +
> +	pm_runtime_set_autosuspend_delay(dev, NEUTRON_SUSPEND_DELAY_MS);
> +	pm_runtime_use_autosuspend(dev);
> +
> +	ret = drm_dev_register(&ndev->base, 0);
> +	if (ret)
> +		goto free_reserved;
> +
> +	return 0;
> +
> +free_reserved:
> +	of_reserved_mem_device_release(&pdev->dev);
> +
> +	return ret;
> +}
> +
> +static void neutron_remove(struct platform_device *pdev)
> +{
> +	struct neutron_device *ndev = platform_get_drvdata(pdev);
> +
> +	drm_dev_unregister(&ndev->base);
> +	of_reserved_mem_device_release(&pdev->dev);
> +}
> +
> +static int neutron_runtime_suspend(struct device *dev)
> +{
> +	struct neutron_device *ndev = dev_get_drvdata(dev);
> +
> +	neutron_disable_irq(ndev);
> +	neutron_shutdown(ndev);
> +
> +	clk_bulk_disable_unprepare(ndev->num_clks, ndev->clks);
> +
> +	return 0;
> +}
> +
> +static int neutron_runtime_resume(struct device *dev)
> +{
> +	struct neutron_device *ndev = dev_get_drvdata(dev);
> +	int ret;
> +
> +	ret = clk_bulk_prepare_enable(ndev->num_clks, ndev->clks);
> +	if (ret)
> +		return ret;
> +
> +	ret = neutron_boot(ndev);
> +	if (ret) {
> +		clk_bulk_disable_unprepare(ndev->num_clks, ndev->clks);
> +		return ret;
> +	}
> +
> +	neutron_enable_irq(ndev);
> +
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops neutron_pm_ops = {
> +	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
> +	RUNTIME_PM_OPS(neutron_runtime_suspend, neutron_runtime_resume, NULL)
> +};
> +
> +static const struct of_device_id neutron_match_table[] = {
> +	{ .compatible = "nxp,imx95-neutron" },
> +	{}
> +};
> +
> +MODULE_DEVICE_TABLE(of, neutron_match_table);
> +
> +static struct platform_driver neutron_driver = {
> +	.probe	= &neutron_probe,
> +	.remove	= &neutron_remove,
> +	.driver	= {
> +		.name		= "neutron",
> +		.of_match_table	= of_match_ptr(neutron_match_table),

Drop of_match_ptr. You will have (or you have already same as v1) here
warning.

> +		.pm		= pm_ptr(&neutron_pm_ops),
> +	},
> +};
Best regards,
Krzysztof

  reply	other threads:[~2026-03-06 14:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 13:27 [PATCH v2 0/9] accel: New driver for NXP's Neutron NPU Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 1/9] drm/gem-dma: Add flag for bidirectional mapping of non-coherent GEM DMA buffers Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 2/9] accel/neutron: Add documentation for NXP Neutron accelerator driver Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 3/9] dt-bindings: npu: Add NXP Neutron Ioana Ciocoi-Radulescu
2026-03-06 14:17   ` Krzysztof Kozlowski
2026-03-06 13:27 ` [PATCH v2 4/9] accel/neutron: Add driver for NXP Neutron NPU Ioana Ciocoi-Radulescu
2026-03-06 14:21   ` Krzysztof Kozlowski [this message]
2026-03-24 13:36     ` Ioana Ciocoi Radulescu
2026-03-06 13:27 ` [PATCH v2 5/9] accel/neutron: Add GEM buffer object support Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 6/9] accel/neutron: Add mailbox support Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 7/9] accel/neutron: Add job submission IOCTL Ioana Ciocoi-Radulescu
2026-03-06 17:02   ` Frank Li
2026-03-24 13:38     ` Ioana Ciocoi Radulescu
2026-03-06 13:27 ` [PATCH v2 8/9] accel/neutron: Add logging support Ioana Ciocoi-Radulescu
2026-03-06 13:27 ` [PATCH v2 9/9] arm64: dts: imx95: Add Neutron node Ioana Ciocoi-Radulescu
2026-03-21 17:19 ` [PATCH v2 0/9] accel: New driver for NXP's Neutron NPU Tomeu Vizoso
2026-03-24 12:12   ` Ioana Ciocoi Radulescu
     [not found]     ` <CAPsqS2QXcgbi9_e4QmCn1Cgkr-bOVsY-E9qpZsFw3WYWWLugEw@mail.gmail.com>
2026-03-26  7:18       ` Ioana Ciocoi Radulescu

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=110dace9-3ff9-4750-813f-93c6827b105c@kernel.org \
    --to=krzk@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=airlied@gmail.com \
    --cc=alexandru.taran@nxp.com \
    --cc=christian.koenig@amd.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=jiwei.fu@nxp.com \
    --cc=krzk+dt@kernel.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=robh@kernel.org \
    --cc=ruxandra.radulescu@nxp.com \
    --cc=shawnguo@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    --cc=xuelin.shi@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox