[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0bed2152-8bf7-4091-8c2d-126f1ec3be5b@kapsi.fi>
Date: Mon, 30 Jun 2025 15:11:34 +0900
From: Mikko Perttunen <cyndis@...si.fi>
To: Diogo Ivo <diogo.ivo@...nico.ulisboa.pt>,
Thierry Reding <thierry.reding@...il.com>,
Mikko Perttunen <mperttunen@...dia.com>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Jonathan Hunter <jonathanh@...dia.com>,
Philipp Zabel <p.zabel@...gutronix.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-tegra@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/3] drm/tegra: Add NVJPG driver
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@...dia.com>
Thanks!
Mikko
Powered by blists - more mailing lists