Re: [PATCH v7 05/15] gpu: host1x: Add option to skip firewall for a job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 10, 2021 at 02:04:46PM +0300, Mikko Perttunen wrote:
> The new UAPI will have its own firewall, and we don't want to run
> the firewall in the Host1x driver for those jobs. As such, add a
> parameter to host1x_job_alloc to specify if we want to skip the
> firewall in the Host1x driver.
[...]
>  struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
> -				    u32 num_cmdbufs, u32 num_relocs)
> +				    u32 num_cmdbufs, u32 num_relocs,
> +				    bool skip_firewall)
>  {
>  	struct host1x_job *job = NULL;
>  	unsigned int num_unpins = num_relocs;
> +	bool enable_firewall;
>  	u64 total;
>  	void *mem;
>  
> -	if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL))
> +	enable_firewall = IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) && !skip_firewall;
[...]

Why negatively name a parameter just to invert it right away?

Best Regards
Michał Mirosław



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux