[PATCH] drm/panfrost: Add PANFROST_BO_NO{READ,WRITE} flags

Boris Brezillon boris.brezillon at collabora.com
Thu Sep 30 19:40:30 UTC 2021


On Thu, 30 Sep 2021 15:13:29 -0400
Alyssa Rosenzweig <alyssa at collabora.com> wrote:

> > +	/* Executable implies readable */
> > +	if ((args->flags & PANFROST_BO_NOREAD) &&
> > +	    !(args->flags & PANFROST_BO_NOEXEC))
> > +		return -EINVAL;  
> 
> Generally, executable also implies not-writeable. Should we check that?

We were allowing it until now, so doing that would break the backward
compat, unfortunately. Steve also mentioned that the DDK might use
shaders modifying other shaders here [1], it clearly doesn't happen in
panfrost, but I think I'd prefer to keep the existing behavior by
default, just to be safe. I'll send a patch setting the RO flag on
all executable BOs in mesa/panfrost.

[1]https://oftc.irclog.whitequark.org/panfrost/2021-09-02


More information about the dri-devel mailing list