All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Alyssa Rosenzweig <alyssa@collabora.com>,
	Boris Brezillon <boris.brezillon@collabora.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Robin Murphy <robin.murphy@arm.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/panfrost: Add PANFROST_BO_NO{READ,WRITE} flags
Date: Fri, 1 Oct 2021 13:09:48 +0100	[thread overview]
Message-ID: <5ec5c310-902f-ee13-2fe6-2a88b366eae7@arm.com> (raw)
In-Reply-To: <YVY2O48ckub2fc5W@maud>

On 30/09/2021 23:12, Alyssa Rosenzweig 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.
> 
> Not a problem if you only enforce this starting with the appropriate
> UABI version, but...
> 
>> Steve also mentioned that the DDK might use shaders modifying other
>> shaders here [1]
> 
> What? I believe it, but what?

*might* ;) I've not looked in detail and a quick look through the code
just now I can't actually find anything which does.

> For the case of pilot shaders, that shouldn't require self-modifying
> code. As I understand, the DDK binds the push uniform (FAU / RMU) buffer
> as global shader memory (SSBO) and uses regular STORE instructions on
> it. That requires writability on that BO but that should be fine.

Yeah it looks like you're correct here - I've never looked closely into
exactly how pilot shaders work. It would appear that the DDK checks (in
user space) for the GPU-executable + GPU-writable condition and moans.
So this obviously isn't used by the DDK as it stands.

For the actual patch:

Reviewed-by: Steven Price <steven.price@arm.com>

Although if you can figure out how to add the "private mapping" flag at
the same time we can avoid bumping the version number too many times.
And today I'm actually in the office so (perversely) I haven't got the
hardware to actually test it at the moment - I really need to get remote
access set up!

Thanks,

Steve

  parent reply	other threads:[~2021-10-01 12:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 18:47 [PATCH] drm/panfrost: Add PANFROST_BO_NO{READ,WRITE} flags Boris Brezillon
2021-09-30 19:13 ` Alyssa Rosenzweig
2021-09-30 19:40   ` Boris Brezillon
2021-09-30 22:12     ` Alyssa Rosenzweig
2021-10-01  6:47       ` Boris Brezillon
2021-10-01 11:48         ` Alyssa Rosenzweig
2021-10-01 12:09       ` Steven Price [this message]
2021-09-30 19:44 ` Boris Brezillon
2021-10-01  7:06   ` Boris Brezillon

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=5ec5c310-902f-ee13-2fe6-2a88b366eae7@arm.com \
    --to=steven.price@arm.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=alyssa@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tomeu.vizoso@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.