All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Boris Brezillon <boris.brezillon@collabora.com>,
	Alyssa Rosenzweig <alyssa@collabora.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v3 05/15] drm/panfrost: Expose exception types to userspace
Date: Fri, 25 Jun 2021 16:32:27 +0100	[thread overview]
Message-ID: <cb7e886d-d59c-6086-7c5c-0070869087b1@arm.com> (raw)
In-Reply-To: <20210625162101.3047172f@collabora.com>

On 25/06/2021 15:21, Boris Brezillon wrote:
> On Fri, 25 Jun 2021 09:42:08 -0400
> Alyssa Rosenzweig <alyssa@collabora.com> wrote:
> 
>> I'm not convinced. Right now most of our UABI is pleasantly
>> GPU-agnostic. With this suddenly there's divergence between Midgard and
>> Bifrost uABI.
> 
> Hm, I don't see why. I mean the exception types seem to be the same,
> there are just some that are not used on Midgard and some that are no
> used on Bifrost. Are there any collisions I didn't notice?

I think the real question is: why are we exporting them if user space
doesn't want them ;) Should this be in an internal header file at least
until someone actually requests they be available to user space?

>> With that drawback in mind, could you explain the benefit?
> 
> Well, I thought having these definitions in a central place would be a
> good thing given they're not expected to change even if they might
> be per-GPU. I don't know if that changes with CSF, maybe the exception
> codes are no longer set in stone and can change with FW update...

CSF certainly means the firmware controls a lot more of this sort of
thing but AFAIK the exception types still fit in the same scheme.

Steve

>>
>> On Fri, Jun 25, 2021 at 03:33:17PM +0200, Boris Brezillon wrote:
>>> Job headers contain an exception type field which might be read and
>>> converted to a human readable string by tracing tools. Let's expose
>>> the exception type as an enum so we share the same definition.
>>>
>>> v3:
>>> * Add missing values
>>>
>>> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
>>> ---
>>>  include/uapi/drm/panfrost_drm.h | 71 +++++++++++++++++++++++++++++++++
>>>  1 file changed, 71 insertions(+)
>>>
>>> diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h
>>> index ec19db1eead8..899cd6d952d4 100644
>>> --- a/include/uapi/drm/panfrost_drm.h
>>> +++ b/include/uapi/drm/panfrost_drm.h
>>> @@ -223,6 +223,77 @@ struct drm_panfrost_madvise {
>>>  	__u32 retained;       /* out, whether backing store still exists */
>>>  };
>>>  
>>> +/* The exception types */
>>> +
>>> +enum drm_panfrost_exception_type {
>>> +	DRM_PANFROST_EXCEPTION_OK = 0x00,
>>> +	DRM_PANFROST_EXCEPTION_DONE = 0x01,
>>> +	DRM_PANFROST_EXCEPTION_INTERRUPTED = 0x02,
>>> +	DRM_PANFROST_EXCEPTION_STOPPED = 0x03,
>>> +	DRM_PANFROST_EXCEPTION_TERMINATED = 0x04,
>>> +	DRM_PANFROST_EXCEPTION_KABOOM = 0x05,
>>> +	DRM_PANFROST_EXCEPTION_EUREKA = 0x06,
>>> +	DRM_PANFROST_EXCEPTION_ACTIVE = 0x08,
>>> +	DRM_PANFROST_EXCEPTION_JOB_CONFIG_FAULT = 0x40,
>>> +	DRM_PANFROST_EXCEPTION_JOB_POWER_FAULT = 0x41,
>>> +	DRM_PANFROST_EXCEPTION_JOB_READ_FAULT = 0x42,
>>> +	DRM_PANFROST_EXCEPTION_JOB_WRITE_FAULT = 0x43,
>>> +	DRM_PANFROST_EXCEPTION_JOB_AFFINITY_FAULT = 0x44,
>>> +	DRM_PANFROST_EXCEPTION_JOB_BUS_FAULT = 0x48,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_INVALID_PC = 0x50,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_INVALID_ENC = 0x51,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_TYPE_MISMATCH = 0x52,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_OPERAND_FAULT = 0x53,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_TLS_FAULT = 0x54,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_BARRIER_FAULT = 0x55,
>>> +	DRM_PANFROST_EXCEPTION_INSTR_ALIGN_FAULT = 0x56,
>>> +	DRM_PANFROST_EXCEPTION_DATA_INVALID_FAULT = 0x58,
>>> +	DRM_PANFROST_EXCEPTION_TILE_RANGE_FAULT = 0x59,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_RANGE_FAULT = 0x5a,
>>> +	DRM_PANFROST_EXCEPTION_IMPRECISE_FAULT = 0x5b,
>>> +	DRM_PANFROST_EXCEPTION_OOM = 0x60,
>>> +	DRM_PANFROST_EXCEPTION_OOM_AFBC = 0x61,
>>> +	DRM_PANFROST_EXCEPTION_UNKNOWN = 0x7f,
>>> +	DRM_PANFROST_EXCEPTION_DELAYED_BUS_FAULT = 0x80,
>>> +	DRM_PANFROST_EXCEPTION_GPU_SHAREABILITY_FAULT = 0x88,
>>> +	DRM_PANFROST_EXCEPTION_SYS_SHAREABILITY_FAULT = 0x89,
>>> +	DRM_PANFROST_EXCEPTION_GPU_CACHEABILITY_FAULT = 0x8a,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_0 = 0xc0,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_1 = 0xc1,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_2 = 0xc2,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_3 = 0xc3,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_4 = 0xc4,
>>> +	DRM_PANFROST_EXCEPTION_TRANSLATION_FAULT_IDENTITY = 0xc7,
>>> +	DRM_PANFROST_EXCEPTION_PERM_FAULT_0 = 0xc8,
>>> +	DRM_PANFROST_EXCEPTION_PERM_FAULT_1 = 0xc9,
>>> +	DRM_PANFROST_EXCEPTION_PERM_FAULT_2 = 0xca,
>>> +	DRM_PANFROST_EXCEPTION_PERM_FAULT_3 = 0xcb,
>>> +	DRM_PANFROST_EXCEPTION_TRANSTAB_BUS_FAULT_0 = 0xd0,
>>> +	DRM_PANFROST_EXCEPTION_TRANSTAB_BUS_FAULT_1 = 0xd1,
>>> +	DRM_PANFROST_EXCEPTION_TRANSTAB_BUS_FAULT_2 = 0xd2,
>>> +	DRM_PANFROST_EXCEPTION_TRANSTAB_BUS_FAULT_3 = 0xd3,
>>> +	DRM_PANFROST_EXCEPTION_ACCESS_FLAG_0 = 0xd8,
>>> +	DRM_PANFROST_EXCEPTION_ACCESS_FLAG_1 = 0xd9,
>>> +	DRM_PANFROST_EXCEPTION_ACCESS_FLAG_2 = 0xda,
>>> +	DRM_PANFROST_EXCEPTION_ACCESS_FLAG_3 = 0xdb,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_IN0 = 0xe0,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_IN1 = 0xe1,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_IN2 = 0xe2,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_IN3 = 0xe3,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_OUT0 = 0xe4,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_OUT1 = 0xe5,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_OUT2 = 0xe6,
>>> +	DRM_PANFROST_EXCEPTION_ADDR_SIZE_FAULT_OUT3 = 0xe7,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_FAULT_0 = 0xe8,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_FAULT_1 = 0xe9,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_FAULT_2 = 0xea,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_FAULT_3 = 0xeb,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_NONCACHE_0 = 0xec,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_NONCACHE_1 = 0xed,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_NONCACHE_2 = 0xee,
>>> +	DRM_PANFROST_EXCEPTION_MEM_ATTR_NONCACHE_3 = 0xef,
>>> +};
>>> +
>>>  #if defined(__cplusplus)
>>>  }
>>>  #endif
>>> -- 
>>> 2.31.1
>>>   
> 


  reply	other threads:[~2021-06-25 15:32 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 13:33 [PATCH v3 00/15] drm/panfrost: Misc improvements Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 01/15] drm/sched: Allow using a dedicated workqueue for the timeout/fault tdr Boris Brezillon
2021-06-25 15:07   ` Steven Price
2021-06-25 15:18     ` Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 02/15] drm/panfrost: Make ->run_job() return an ERR_PTR() when appropriate Boris Brezillon
2021-06-25 13:45   ` Alyssa Rosenzweig
2021-06-25 13:33 ` [PATCH v3 03/15] drm/panfrost: Get rid of the unused JS_STATUS_EVENT_ACTIVE definition Boris Brezillon
2021-06-25 13:39   ` Alyssa Rosenzweig
2021-06-25 13:33 ` [PATCH v3 04/15] drm/panfrost: Drop the pfdev argument passed to panfrost_exception_name() Boris Brezillon
2021-06-25 13:45   ` Alyssa Rosenzweig
2021-06-25 13:33 ` [PATCH v3 05/15] drm/panfrost: Expose exception types to userspace Boris Brezillon
2021-06-25 13:42   ` Alyssa Rosenzweig
2021-06-25 14:21     ` Boris Brezillon
2021-06-25 15:32       ` Steven Price [this message]
2021-06-25 15:40         ` Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 06/15] drm/panfrost: Do the exception -> string translation using a table Boris Brezillon
2021-06-25 13:41   ` Alyssa Rosenzweig
2021-06-25 15:35   ` Steven Price
2021-06-25 13:33 ` [PATCH v3 07/15] drm/panfrost: Expose a helper to trigger a GPU reset Boris Brezillon
2021-06-25 13:46   ` Alyssa Rosenzweig
2021-06-25 13:33 ` [PATCH v3 08/15] drm/panfrost: Use a threaded IRQ for job interrupts Boris Brezillon
2021-06-25 13:47   ` Alyssa Rosenzweig
2021-06-25 14:37     ` Boris Brezillon
2021-06-25 15:40   ` Steven Price
2021-06-25 13:33 ` [PATCH v3 09/15] drm/panfrost: Simplify the reset serialization logic Boris Brezillon
2021-06-25 15:42   ` Steven Price
2021-06-25 16:22   ` Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 10/15] drm/panfrost: Make sure job interrupts are masked before resetting Boris Brezillon
2021-06-25 15:55   ` Steven Price
2021-06-25 16:02     ` Boris Brezillon
2021-06-25 16:11       ` Steven Price
2021-06-25 13:33 ` [PATCH v3 11/15] drm/panfrost: Disable the AS on unhandled page faults Boris Brezillon
2021-06-25 16:10   ` Steven Price
2021-06-25 13:33 ` [PATCH v3 12/15] drm/panfrost: Reset the GPU when the AS_ACTIVE bit is stuck Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 13/15] drm/panfrost: Don't reset the GPU on job faults unless we really have to Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 14/15] drm/panfrost: Kill in-flight jobs on FD close Boris Brezillon
2021-06-25 13:43   ` Lucas Stach
2021-06-25 14:46     ` Boris Brezillon
2021-06-25 13:33 ` [PATCH v3 15/15] drm/panfrost: Queue jobs on the hardware 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=cb7e886d-d59c-6086-7c5c-0070869087b1@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.