[PATCH 1/3] drm/tegra: Add NVJPG driver

Diogo Ivo diogo.ivo at tecnico.ulisboa.pt
Wed Jun 11 11:50:25 UTC 2025


Hi Thierry,

On 6/10/25 9:44 AM, Thierry Reding wrote:
> On Tue, Jun 10, 2025 at 12:26:07PM +0900, Mikko Perttunen wrote:
>> On 6/6/25 7:45 PM, Diogo Ivo wrote:
>>> Add support for booting and using NVJPG on Tegra210 to the Host1x
>>> and TegraDRM drivers. This driver only supports the new TegraDRM uAPI.
>>
>> Hello Diogo -- I'm happy to see this driver!
> 
> So am I, nice work!

Thank you Mikko and Thierry for the kind words :)

> [...]
>>> +	if (IS_ERR(nvjpg->regs))
>>> +		return PTR_ERR(nvjpg->regs);
>>> +
>>> +	nvjpg->rst = devm_reset_control_get_exclusive_released(&pdev->dev, "nvjpg");
>>> +	if (IS_ERR(nvjpg->rst)) {
>>> +		err = PTR_ERR(nvjpg->rst);
>>> +
>>> +		if (err != -EBUSY || WARN_ON(!pdev->dev.pm_domain)) {
>>> +			dev_err(&pdev->dev, "failed to get reset control: %d\n",
>>> +				err);
>>> +			return err;
>>> +		}
>>> +
>>> +		/*
>>> +		 * At this point, the reset control is most likely being used
>>> +		 * by the generic power domain implementation. With any luck
>>> +		 * the power domain will have taken care of resetting the SOR
>>> +		 * and we don't have to do anything.
>>> +		 */
>>> +		nvjpg->rst = NULL;
>>> +	}
>>
>> I see you've taken this from sor.c, but I think it should be unnecessary. I
>> imagine the code in sor.c is overcomplicated as well, maybe because we used
>> not to have the power domain implementation.
> 
> Agreed. SOR is also slightly older than NVJPG and used on Tegra124 where
> we don't use power domains, so most of these quirks are for backwards-
> compatibility. If we can avoid them for NVJPG, that'd be great.

Sounds good, I'll get rid of this explicit handling in v2.

Thanks,
Diogo


More information about the dri-devel mailing list