All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mikko Perttunen <cyndis-/1wQRMveznE@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
	sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	bhuntsman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Subject: Re: [RFC] Host1x/TegraDRM UAPI (drm_tegra_submit_relocation)
Date: Fri, 26 Jun 2020 01:50:51 +0300	[thread overview]
Message-ID: <eb3cac23-cd8c-732b-684c-c2d531de00a2@gmail.com> (raw)
In-Reply-To: <8d60baf4-45e8-296a-279e-dc105966361c-/1wQRMveznE@public.gmane.org>

25.06.2020 12:27, Mikko Perttunen пишет:
> On 6/25/20 1:33 AM, Dmitry Osipenko wrote:
>> 23.06.2020 15:09, Mikko Perttunen пишет:
>>> struct drm_tegra_submit_relocation {
>>>          /* [in] Index of GATHER or GATHER_UPTR command in commands. */
>>>          __u32 gather_command_index;
>>>
>>>          /*
>>>           * [in] Mapping handle (obtained through CHANNEL_MAP) of the
>>> memory
>>>           *   the address of which will be patched in.
>>>           */
>>>          __u32 mapping_id;
>>>
>>>          /*
>>>           * [in] Offset in the gather that will be patched.
>>>           */
>>>          __u64 gather_offset;
>>>
>>>          /*
>>>           * [in] Offset in target buffer whose paddr/IOVA will be
>>> written
>>>           *   to the gather.
>>>           */
>>>          __u64 target_offset;
>>>
>>>          /*
>>>           * [in] Number of bits the resulting address will be logically
>>>           *   shifted right before writing to gather.
>>>           */
>>>          __u32 shift;
>>>
>>>          __u32 reserved[1];
>>> };
>>
>> We will also need read/write direction flag here for the
>> DMA-reservations set up, it will be used for the implicit BO fencing by
>> the job's scheduler.
>>
> 
> Ideally on newer chips with context isolation, we no longer know what
> DMA-BUFs are being used by the job at submit time - they would just be
> pointers after being MAPped.

The DMA-BUFs themselves shouldn't be needed, but GEMs should.

> Do you know how other GPUs deal with DMA reservations - I expect
> separate MAP and SUBMIT steps would be pretty common?

I can't instantly recall what other drivers do, could be worthwhile to
take a closer look.

> Do you have to
> pass the DMA-BUF to both steps (i.e. do IOMMU mapping during MAP, and
> manage reservations at SUBMIT)?

Yes, this sounds good to me if DMA-BUF part is replaced with a GEM.

Please see my other reply regarding the MAP IOCTL where I'm suggesting
to back mapping IDs with a GEM.

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Osipenko <digetx@gmail.com>
To: Mikko Perttunen <cyndis@kapsi.fi>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	sumit.semwal@linaro.org, gustavo@padovan.org
Cc: "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	talho@nvidia.com, bhuntsman@nvidia.com,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC] Host1x/TegraDRM UAPI (drm_tegra_submit_relocation)
Date: Fri, 26 Jun 2020 01:50:51 +0300	[thread overview]
Message-ID: <eb3cac23-cd8c-732b-684c-c2d531de00a2@gmail.com> (raw)
In-Reply-To: <8d60baf4-45e8-296a-279e-dc105966361c@kapsi.fi>

25.06.2020 12:27, Mikko Perttunen пишет:
> On 6/25/20 1:33 AM, Dmitry Osipenko wrote:
>> 23.06.2020 15:09, Mikko Perttunen пишет:
>>> struct drm_tegra_submit_relocation {
>>>          /* [in] Index of GATHER or GATHER_UPTR command in commands. */
>>>          __u32 gather_command_index;
>>>
>>>          /*
>>>           * [in] Mapping handle (obtained through CHANNEL_MAP) of the
>>> memory
>>>           *   the address of which will be patched in.
>>>           */
>>>          __u32 mapping_id;
>>>
>>>          /*
>>>           * [in] Offset in the gather that will be patched.
>>>           */
>>>          __u64 gather_offset;
>>>
>>>          /*
>>>           * [in] Offset in target buffer whose paddr/IOVA will be
>>> written
>>>           *   to the gather.
>>>           */
>>>          __u64 target_offset;
>>>
>>>          /*
>>>           * [in] Number of bits the resulting address will be logically
>>>           *   shifted right before writing to gather.
>>>           */
>>>          __u32 shift;
>>>
>>>          __u32 reserved[1];
>>> };
>>
>> We will also need read/write direction flag here for the
>> DMA-reservations set up, it will be used for the implicit BO fencing by
>> the job's scheduler.
>>
> 
> Ideally on newer chips with context isolation, we no longer know what
> DMA-BUFs are being used by the job at submit time - they would just be
> pointers after being MAPped.

The DMA-BUFs themselves shouldn't be needed, but GEMs should.

> Do you know how other GPUs deal with DMA reservations - I expect
> separate MAP and SUBMIT steps would be pretty common?

I can't instantly recall what other drivers do, could be worthwhile to
take a closer look.

> Do you have to
> pass the DMA-BUF to both steps (i.e. do IOMMU mapping during MAP, and
> manage reservations at SUBMIT)?

Yes, this sounds good to me if DMA-BUF part is replaced with a GEM.

Please see my other reply regarding the MAP IOCTL where I'm suggesting
to back mapping IDs with a GEM.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-06-25 22:50 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 12:09 [RFC] Host1x/TegraDRM UAPI Mikko Perttunen
2020-06-23 12:09 ` Mikko Perttunen
     [not found] ` <9b06b7ec-f952-2561-7afb-5653514cd5d3-/1wQRMveznE@public.gmane.org>
2020-06-24 20:55   ` Dmitry Osipenko
2020-06-24 20:55     ` Dmitry Osipenko
     [not found]     ` <867dea06-8741-82e8-3e26-9a017ad9057a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  9:17       ` Mikko Perttunen
2020-06-25  9:17         ` Mikko Perttunen
2020-06-24 22:33   ` Dmitry Osipenko
2020-06-24 22:33     ` Dmitry Osipenko
     [not found]     ` <7cc0d47b-024a-263e-3b63-1d1184b462b3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  9:27       ` Mikko Perttunen
2020-06-25  9:27         ` Mikko Perttunen
     [not found]         ` <8d60baf4-45e8-296a-279e-dc105966361c-/1wQRMveznE@public.gmane.org>
2020-06-25 22:50           ` Dmitry Osipenko [this message]
2020-06-25 22:50             ` [RFC] Host1x/TegraDRM UAPI (drm_tegra_submit_relocation) Dmitry Osipenko
     [not found]             ` <eb3cac23-cd8c-732b-684c-c2d531de00a2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-26  9:01               ` Mikko Perttunen
2020-06-26  9:01                 ` Mikko Perttunen
2020-06-24 23:11   ` [RFC] Host1x/TegraDRM UAPI Dmitry Osipenko
2020-06-24 23:11     ` Dmitry Osipenko
     [not found]     ` <c6642ebd-c9f1-eab0-ff6d-109698af73e0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  9:16       ` Mikko Perttunen
2020-06-25  9:16         ` Mikko Perttunen
     [not found]         ` <5c0aa939-d722-5034-6328-4df5be8ee3c6-/1wQRMveznE@public.gmane.org>
2020-06-25 23:24           ` Dmitry Osipenko
2020-06-25 23:24             ` Dmitry Osipenko
     [not found]             ` <c96af3cb-a15c-dd3f-ac5b-b0a56d2ed6d9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-26  9:05               ` Mikko Perttunen
2020-06-26  9:05                 ` Mikko Perttunen
2020-06-24 23:18   ` Dmitry Osipenko
2020-06-24 23:18     ` Dmitry Osipenko
     [not found]     ` <f85f3fa0-ba18-ddd5-2bac-158dfed9b792-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  0:59       ` Dmitry Osipenko
2020-06-25  0:59         ` Dmitry Osipenko
2020-06-24 23:23   ` Dmitry Osipenko
2020-06-24 23:23     ` Dmitry Osipenko
     [not found]     ` <3703cf87-457a-0e71-7693-5644735e438a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  9:19       ` Mikko Perttunen
2020-06-25  9:19         ` Mikko Perttunen
2020-06-25  0:47   ` Dmitry Osipenko
2020-06-25  0:47     ` Dmitry Osipenko
     [not found]     ` <10f9a8e5-9972-76bc-f60a-1bf1211e55e1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-25  9:23       ` Mikko Perttunen
2020-06-25  9:23         ` Mikko Perttunen
2020-06-25 22:47   ` [RFC] Host1x/TegraDRM UAPI (drm_tegra_channel_map) Dmitry Osipenko
2020-06-25 22:47     ` Dmitry Osipenko
     [not found]     ` <4f9ddf30-ad8d-3750-20d7-867be17a1006-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-26  7:34       ` Thierry Reding
2020-06-26  7:34         ` Thierry Reding
2020-06-26 16:35         ` Dmitry Osipenko
2020-06-26 16:35           ` Dmitry Osipenko
     [not found]           ` <4c243f7a-4c53-d995-88a1-0fe03d41fc3a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-28 11:16             ` Mikko Perttunen
2020-06-28 11:16               ` Mikko Perttunen
     [not found]               ` <f622c8ed-efe4-0889-bd26-dc22e96b8e4d-/1wQRMveznE@public.gmane.org>
2020-06-28 22:59                 ` Dmitry Osipenko
2020-06-28 22:59                   ` Dmitry Osipenko
     [not found]                   ` <b8a8b05e-de1c-400f-3f35-bb1ea49789e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-30 10:55                     ` Mikko Perttunen
2020-06-30 10:55                       ` Mikko Perttunen
     [not found]                       ` <76e46256-58d3-fdbe-41d6-8ac910fc7fd0-/1wQRMveznE@public.gmane.org>
2020-06-30 19:48                         ` Dmitry Osipenko
2020-06-30 19:48                           ` Dmitry Osipenko
2020-06-26 11:06   ` [RFC] Host1x/TegraDRM UAPI Karol Herbst
2020-06-26 11:06     ` Karol Herbst
     [not found]     ` <CACO55ttfwQDwnO8ep=YKBgo+HYBg=zLDLfBKtH67MrqKzMWw_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-06-26 11:13       ` Mikko Perttunen
2020-06-26 11:13         ` Mikko Perttunen
     [not found]         ` <cb935527-2eb9-23f3-a823-d6b849fc3c94-/1wQRMveznE@public.gmane.org>
2020-06-26 11:16           ` Karol Herbst
2020-06-26 11:16             ` Karol Herbst
2020-06-26 11:40       ` Thierry Reding
2020-06-26 11:40         ` Thierry Reding
2020-06-26 13:38         ` Daniel Vetter
2020-06-26 13:38           ` Daniel Vetter
     [not found]           ` <20200626133837.GE3278063-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2020-06-26 13:59             ` Dmitry Osipenko
2020-06-26 13:59               ` Dmitry Osipenko
     [not found]               ` <b46516eb-4077-c3ac-83d0-d8c57660dc3e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-30  9:09                 ` Daniel Vetter
2020-06-30  9:09                   ` Daniel Vetter
2020-06-27 21:47   ` [RFC] Host1x/TegraDRM UAPI (drm_tegra_submit_syncpt_incr) Dmitry Osipenko
2020-06-27 21:47     ` Dmitry Osipenko
     [not found]     ` <9ddfedff-f465-b22d-5d6f-c7ba01731455-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-28 11:10       ` Mikko Perttunen
2020-06-28 11:10         ` Mikko Perttunen
2020-06-27 22:32   ` [RFC] Host1x/TegraDRM UAPI (drm_tegra_submit_command) Dmitry Osipenko
2020-06-27 22:32     ` Dmitry Osipenko
     [not found]     ` <f31fbe3b-3fc5-2ece-4c2c-9ff4e99995d6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-28 10:28       ` Mikko Perttunen
2020-06-28 10:28         ` Mikko Perttunen
     [not found]         ` <19b7b295-30fa-8897-02f3-3c3b8f2a0e53-/1wQRMveznE@public.gmane.org>
2020-06-29  0:00           ` Dmitry Osipenko
2020-06-29  0:00             ` Dmitry Osipenko
     [not found]             ` <3f0d2e08-aa0b-9048-c22d-8f3d3106cdff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-30 10:40               ` Mikko Perttunen
2020-06-30 10:40                 ` Mikko Perttunen
2020-06-27 23:27   ` [RFC] Host1x/TegraDRM UAPI (sync points) Dmitry Osipenko
2020-06-27 23:27     ` Dmitry Osipenko
     [not found]     ` <5b1edaad-ba36-7b0f-5b02-457ae5b6d91e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-28  9:44       ` Mikko Perttunen
2020-06-28  9:44         ` Mikko Perttunen
     [not found]         ` <62859775-514c-2941-75ed-6905e9282a6f-/1wQRMveznE@public.gmane.org>
2020-06-29  2:36           ` Dmitry Osipenko
2020-06-29  2:36             ` Dmitry Osipenko
     [not found]             ` <623c1eaa-31fb-8dff-f6c0-d8cd0be60070-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-29 10:27               ` Mikko Perttunen
2020-06-29 10:27                 ` Mikko Perttunen
     [not found]                 ` <827c92a6-7fed-a81c-ba8e-6c69416c4ab9-/1wQRMveznE@public.gmane.org>
2020-06-29 19:28                   ` Dmitry Osipenko
2020-06-29 19:28                     ` Dmitry Osipenko
2020-06-29 19:33                   ` Dmitry Osipenko
2020-06-29 19:33                     ` Dmitry Osipenko
2020-06-29 19:42                   ` Dmitry Osipenko
2020-06-29 19:42                     ` Dmitry Osipenko
     [not found]                     ` <f1a88006-ab3e-9068-e220-15eee17aeba0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-06-30 10:26                       ` Mikko Perttunen
2020-06-30 10:26                         ` Mikko Perttunen
     [not found]                         ` <3b058989-a93a-6796-8d94-f60ce39e3fba-/1wQRMveznE@public.gmane.org>
2020-07-01  0:22                           ` Dmitry Osipenko
2020-07-01  0:22                             ` Dmitry Osipenko
     [not found]                             ` <2190fe9d-6381-0b5e-39d8-a04daca9a1bf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-02 12:10                               ` Mikko Perttunen
2020-07-02 12:10                                 ` Mikko Perttunen
     [not found]                                 ` <a1d6c789-4935-110f-f4fd-db86ae0e4fef-/1wQRMveznE@public.gmane.org>
2020-07-07 11:06                                   ` Dmitry Osipenko
2020-07-07 11:06                                     ` Dmitry Osipenko
     [not found]                                     ` <a2b1f9cf-cc0b-1a0f-d0ac-addcb1f28502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-07-08 10:06                                       ` Mikko Perttunen
2020-07-08 10:06                                         ` Mikko Perttunen
     [not found]                                         ` <d3a6c005-0d85-e7b9-41a2-3d86595efbc1-/1wQRMveznE@public.gmane.org>
2020-07-09  9:28                                           ` Dmitry Osipenko
2020-07-09  9:28                                             ` Dmitry Osipenko

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=eb3cac23-cd8c-732b-684c-c2d531de00a2@gmail.com \
    --to=digetx-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=bhuntsman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=cyndis-/1wQRMveznE@public.gmane.org \
    --cc=daniel-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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.