AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"David Airlie" <airlied-cv59FeDIM0c@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround
Date: Fri, 21 Jun 2019 13:01:42 +0100	[thread overview]
Message-ID: <20190621120142.GD21486@arch-x1c3> (raw)
In-Reply-To: <CAKMK7uG+EUhmZafFmjzSR=eq7543OELbHVaQnZZQGx0APSozwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 2019/06/21, Daniel Vetter wrote:
> On Fri, Jun 21, 2019 at 1:50 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> >
> > On Fri, Jun 21, 2019 at 1:37 PM Christian König
> > <ckoenig.leichtzumerken@gmail.com> wrote:
> > >
> > > Am 21.06.19 um 13:03 schrieb Daniel Vetter:
> > > > On Fri, Jun 21, 2019 at 12:31 PM Koenig, Christian
> > > > <Christian.Koenig@amd.com> wrote:
> > > >> Am 21.06.19 um 12:20 schrieb Emil Velikov:
> > > >>> In particular, that user-space will "remove" render nodes.
> > > >> Yes, that is my main concern here. You basically make render nodes
> > > >> superfluously. That gives userspace all legitimization to also remove
> > > >> support for them. That is not stupid or evil or whatever, userspace
> > > >> would just follow the kernel design.
> > > > This already happened. At least for kms-only display socs we had to
> > > > hide the separate render node (and there you really have to deal with
> > > > the separate render node, because it's a distinct driver) entirely
> > > > within gbm/mesa.
> > >
> > > Ok, that is something I didn't knew before and is rather interesting.
> > >
> > > > So if you want to depracate render functionality on primary nodes, you
> > > > _have_ to do that hiding in userspace. Or you'll break a lot of
> > > > compositors everywhere. Just testing -amdgpu doesn't really prove
> > > > anything here. So you won't move the larger ecosystem with this at
> > > > all, that ship sailed.
> > >
> > > So what else can we do? That sounds like you suggest we should
> > > completely drop render node functionality.
> > >
> > > I mean it's not my preferred option, but certainly something that
> > > everybody could do.
> > >
> > > My primary concern is that we somehow need to get rid of thinks like GEM
> > > flink and all that other crufty stuff we still have around on the
> > > primary node (we should probably make a list of that).
> > >
> > > Switching everything over to render nodes just sounded like the best
> > > alternative so far to archive that.
> >
> > tbh I do like that plan too, but it's a lot more work. And I think to
> > have any push whatsoever we probably need to roll it out in gbm as a
> > hack to keep things going. But probably not enough.
> >
> > I also think that at least some compositors will bother to do the
> > right thing, and actually bother with render nodes and all that
> > correctly. It's just that there's way more which dont.
> >
> > Also for server rendering it'll be render nodes all the way down I
> > hope (or we need to seriously educate cloud people about the
> > permissions they set on their default images, and distros on how this
> > cloud stuff should work.
> >
> > > > At that point this all feels like a bikeshed, and for a bikeshed I
> > > > don't care what the color is we pick, as long as they're all painted
> > > > the same.
> > > >
> > > > Once we picked a color it's a simple technical matter of how to roll
> > > > it out, using Kconfig options, or only enabling on new hw, or "merge
> > > > and fix the regressions as they come" or any of the other well proven
> > > > paths forward.
> > >
> > > Yeah, the problem is I don't see an option which currently works for
> > > everyone.
> > >
> > > I absolutely need a grace time of multiple years until we can apply this
> > > to amdgpu/radeon.
> >
> > Yeah that's what I meant with "pick a color, pick a way to roll it
> > out". "enable for new hw, roll out years and years later" is one of
> > the options for roll out.
> >
> > > And that under the prerequisite to have a plan to somehow enable that
> > > functionality now to make it at least painful for userspace to rely on
> > > hack around that.
> > >
> > > > So if you want to do this, please start with the mesa side work (as
> > > > the biggest userspace, not all of it) with patches to redirect all
> > > > primary node rendering to render nodes. The code is there already for
> > > > socs, just needs to be rolled out more. Or we go with the DRM_AUTH
> > > > horrors. Or a 3rd option, I really don't care which it is, as long as
> > > > its consistent.
> > >
> > > How about this:
> > > 1. We keep DRM_AUTH around for amdgpu/radeon for now.
> > > 2. We add a Kconfig option to ignore DRM_AUTH, currently default to N.
> > > This also works as a workaround for old RADV.
> > > 3. We start to work on further removing old cruft from the primary node.
> > > Possible the Kconfig option I suggested to disable GEM flink.
> >
> > Hm I'm not worried about flink really. It's gem_open which is the
> > security gap, and that one has to stay master-only forever. I guess we
> > could try to disable that so people have to deal with dma-buf (and
> > once you have that render nodes become a lot easier to use). But then
> > I still think we have drivers which don't do dma-buf self-import, so
> > again we're stuck. So maybe first step is to just roll out a default
> > self-import dma-buf support for every gem driver. Then start ditching
> > flink/gem_open. Then start ditching render support on primary nodes.
> > Every step in the way taking a few years of prodding userspace plus
> > even more years to wait until it's all gone.
> 
> I forgot one step here: I think we even still have drivers without
> render node support. As long as those exists (and are still relevant)
> then userspace needs primary node rendering + flink code anyway. And
> they're not going to be happy about us telling them to add more. So I
> think that would need to be fixed first. Hence rough plan:
> 
> - Make sure all gem drivers with rendering have render nodes.
> - Roll out self-import of dma-buf for all gem drivers (we can do that
> with 0 driver support, it's like flink).
> - Roll out mesa gbm for everyone to ignore primary nodes for rendering
> as much as possible. Maybe needs more gbm work so that compositors can
> ask for the display drmfd and the render drmfd.
> - wait. like really long time :-/
> - slowly deprecate flink for new hw as additional forcing function to
> get people to move to dma-buf and render nodes
> - wait even longer
> - ditch rendering on primary nodes.
> 
> Lots of work, and I really mean _lots_, but I think this has a chance
> of actually working.
Thanks for the extensive proposal/list Daniel. I mentioned a, perhaps
too short, version of this a while back.

Above sounds perfectly reasonable IMHO.

-Emil
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-06-21 12:01 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  8:17 [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround Emil Velikov
     [not found] ` <20190527081741.14235-1-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-05-27  8:17   ` [PATCH 02/13] drm/amdgpu: drop DRM_AUTH usage from the driver Emil Velikov
2019-05-27  8:17   ` [PATCH 10/13] drm/radeon: drop DRM_AUTH from DRM_RENDER_ALLOW ioctls Emil Velikov
2019-05-27 10:47   ` [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround Koenig, Christian
     [not found]     ` <3c9b5688-5e83-f173-00e3-6e139e05d466-5C7GfCeVMHo@public.gmane.org>
2019-05-27 12:05       ` Emil Velikov
2019-05-27 12:20         ` Koenig, Christian
2019-05-27 12:52           ` Emil Velikov
2019-05-27 13:26             ` Daniel Vetter
2019-05-27 13:34               ` Daniel Vetter
2019-05-27 13:20     ` Daniel Vetter
     [not found]       ` <20190527132041.GP21222-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-05-27 13:26         ` Emil Velikov
2019-05-27 13:42           ` Koenig, Christian
     [not found]             ` <0426fb3e-e7bc-2464-cb42-4d5753956d23-5C7GfCeVMHo@public.gmane.org>
2019-05-27 15:26               ` Daniel Vetter
     [not found]                 ` <CAKMK7uE_pRro8PxTwUq+pC_1GVVT7nUxan1T-kqSYT=BMHTf2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-28  6:58                   ` Koenig, Christian
     [not found]                     ` <d12a7dd4-595b-d0aa-a87d-527392fb0384-5C7GfCeVMHo@public.gmane.org>
2019-05-28  7:38                       ` Daniel Vetter
     [not found]                         ` <CAKMK7uE1ZWjCeg3q7qDrbcj89+DuPQwfjMqC8hTjDAMU5bhh-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-28  8:03                           ` Koenig, Christian
     [not found]                             ` <98c3d891-6966-2043-9709-4e718dbc6bac-5C7GfCeVMHo@public.gmane.org>
2019-05-28  8:18                               ` Daniel Vetter
     [not found]                                 ` <CAKMK7uGsc7WzBBrfxape4Yy7fbKoDFH5J2F87Kx=7rE1+pXcXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-28 16:10                                   ` Emil Velikov
2019-05-28 16:22                                     ` Koenig, Christian
2019-05-28 16:46                                       ` Emil Velikov
2019-05-28 20:05                                         ` Dave Airlie
     [not found]                                           ` <CAPM=9tzuQX4iQU=w4QfbE1ryq6sXc4k5SVh6V1_4AyH_O+D_oA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-29 13:03                                             ` Emil Velikov
2019-05-29 13:14                                               ` Koenig, Christian
2019-05-29 16:29                                                 ` Emil Velikov
2019-05-31 12:20                                                   ` Koenig, Christian
2019-06-04 17:59                                                     ` Emil Velikov
2019-06-04 10:50                               ` Michel Dänzer
     [not found]                                 ` <ee1b8980-3d78-aa6d-fe46-2c0d45c2bbdd-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-04 11:24                                   ` Koenig, Christian
2019-06-04 13:28                                     ` Daniel Vetter
2019-05-27 15:32               ` Emil Velikov
2019-05-27 13:11   ` Daniel Vetter
     [not found]     ` <20190527131143.GN21222-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-05-27 13:47       ` Emil Velikov
2019-06-14 12:09 ` Emil Velikov
2019-06-14 12:55   ` Koenig, Christian
     [not found]     ` <9dbdda6c-8916-e5ae-1676-86828b9890e7-5C7GfCeVMHo@public.gmane.org>
2019-06-14 14:16       ` Michel Dänzer
2019-06-14 15:53       ` Emil Velikov
2019-06-14 16:00         ` Koenig, Christian
     [not found]           ` <84b3337c-0cdc-44d4-02c6-c56bd729ed47-5C7GfCeVMHo@public.gmane.org>
2019-06-14 16:25             ` Emil Velikov
2019-06-20 16:30           ` Emil Velikov
2019-06-21  7:12             ` Koenig, Christian
     [not found]               ` <9cad6e74-4751-0b0a-35d1-e8f0ac4d3efc-5C7GfCeVMHo@public.gmane.org>
2019-06-21  7:41                 ` Michel Dänzer
2019-06-21  8:23                   ` Koenig, Christian
2019-06-21  9:09               ` Daniel Vetter
2019-06-21  9:25                 ` Koenig, Christian
     [not found]                   ` <be9f38f5-6bb5-9535-f3d9-bafa83370e0f-5C7GfCeVMHo@public.gmane.org>
2019-06-21  9:35                     ` Daniel Vetter
     [not found]                       ` <CAKMK7uE5qO4q3RYNDp22gkMSSJGgz9ChxhuWPYqXO6D1UUvy6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-21 10:16                         ` Christian König
2019-06-21 10:20                       ` Emil Velikov
2019-06-21 10:31                         ` Koenig, Christian
     [not found]                           ` <d241fab3-b6f0-d38a-b83f-03b70736b355-5C7GfCeVMHo@public.gmane.org>
2019-06-21 10:53                             ` Emil Velikov
2019-06-21 11:07                               ` Koenig, Christian
     [not found]                                 ` <338bb519-05f1-cb76-d965-81237f432937-5C7GfCeVMHo@public.gmane.org>
2019-06-21 11:58                                   ` Emil Velikov
2019-06-21 12:13                                     ` Koenig, Christian
     [not found]                                       ` <76158d1f-676d-2afa-244b-934967a9cb75-5C7GfCeVMHo@public.gmane.org>
2019-06-21 12:47                                         ` Emil Velikov
2019-06-21 13:00                                           ` Koenig, Christian
2019-06-21 15:37                                             ` Daniel Vetter
2019-06-21 15:24                                     ` Michel Dänzer
2019-06-21 11:03                           ` Daniel Vetter
     [not found]                             ` <CAKMK7uEVziNZJES9=JFBUu=LpmubS8=-A654cMN+QqhEmc8Fvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-21 11:37                               ` Christian König
     [not found]                                 ` <c92dc683-6815-dc5a-dc2b-54517cc027de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-21 11:50                                   ` Daniel Vetter
     [not found]                                     ` <CAKMK7uHsv3HOXOQq=GGRkx6f+ssRg7dO7qEoBqRS9V_KiTN3Hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-21 11:59                                       ` Daniel Vetter
     [not found]                                         ` <CAKMK7uG+EUhmZafFmjzSR=eq7543OELbHVaQnZZQGx0APSozwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-21 12:01                                           ` Emil Velikov [this message]
2019-06-21 15:15                                       ` Michel Dänzer
     [not found]                                         ` <b182c8e3-c060-71f0-2b3b-62600d825c9f-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-21 15:44                                           ` Daniel Vetter
2019-06-21 15:52                                             ` Michel Dänzer
     [not found]                                               ` <13024821-4767-eeaf-86eb-9ae1056f8931-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-24  9:37                                                 ` Michel Dänzer
     [not found]                                                   ` <b03e8977-c51a-9606-383f-cf4ba674dcdd-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-24  9:48                                                     ` Daniel Vetter

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=20190621120142.GD21486@arch-x1c3 \
    --to=emil.l.velikov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=daniel-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox