mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikko Perttunen <cyndis@kapsi.fi>
To: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>,
	Thierry Reding <thierry.reding@gmail.com>,
	Mikko Perttunen <mperttunen@nvidia.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-tegra@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/3] drm/tegra: Add NVJPG driver
Date: Mon, 30 Jun 2025 15:11:34 +0900	[thread overview]
Message-ID: <0bed2152-8bf7-4091-8c2d-126f1ec3be5b@kapsi.fi> (raw)
In-Reply-To: <20250611-diogo-nvjpg-v2-1-01f8c76ea90f@tecnico.ulisboa.pt>

On 6/11/25 9:18 PM, Diogo Ivo wrote:
> ...
> +static int nvjpg_load_falcon_firmware(struct nvjpg *nvjpg)
> +{
> +	struct host1x_client *client = &nvjpg->client.base;
> +	struct tegra_drm *tegra = nvjpg->client.drm;
> +	dma_addr_t iova;
> +	size_t size;
> +	void *virt;
> +	int err;
> +
> +	if (nvjpg->falcon.firmware.virt)
> +		return 0;
> +
> +	err = falcon_read_firmware(&nvjpg->falcon, nvjpg->config->firmware);
> +	if (err < 0)
> +		return err;
> +
> +	size = nvjpg->falcon.firmware.size;
> +
> +	if (!client->group) {
> +		virt = dma_alloc_coherent(nvjpg->dev, size, &iova, GFP_KERNEL);
> +
> +		err = dma_mapping_error(nvjpg->dev, iova);
> +		if (err < 0)
> +			return err;

This needs to check the return value of dma_alloc_coherent. Looks like 
this was fixed in vic.c by Robin 
(5566174cb10a5167d59b0793871cab7990b149b8) but the issue persisted into 
nvdec.c in parallel, so it needs to be fixed there as well. I can send 
out the fix for nvdec.c.

With that fixed,

Acked-by: Mikko Perttunen <mperttunen@nvidia.com>

Thanks!
Mikko


  reply	other threads:[~2025-06-30  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 12:18 [PATCH v2 0/3] NVIDIA Tegra210 NVJPG support Diogo Ivo
2025-06-11 12:18 ` [PATCH v2 1/3] drm/tegra: Add NVJPG driver Diogo Ivo
2025-06-30  6:11   ` Mikko Perttunen [this message]
2025-06-11 12:18 ` [PATCH v2 2/3] arm64: tegra: Add Tegra210 NVJPG power-domain node Diogo Ivo
2025-06-11 12:18 ` [PATCH v2 3/3] arm64: tegra: Add NVJPG node for Tegra210 platforms Diogo Ivo

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=0bed2152-8bf7-4091-8c2d-126f1ec3be5b@kapsi.fi \
    --to=cyndis@kapsi.fi \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@tecnico.ulisboa.pt \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.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

all inboxes | Powered by JetHome®