From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher James Halse Rogers Subject: Re: [PATCH 1/2] drm: Add DRM_CAP_PRIME_SCANOUT. Date: Wed, 05 Apr 2017 00:20:46 +0000 Message-ID: References: <20170404081321.19263-1-raof@ubuntu.com> <20170404081321.19263-2-raof@ubuntu.com> <20170404083112.s5rp7bwhj3jimoxi@phenom.ffwll.local> <88638B51-0742-4BE9-9137-AEAB72E0B971@cooperteam.net> <1491302580.2367.24.camel@pengutronix.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0925237974==" Return-path: Received: from mail-ua0-x236.google.com (mail-ua0-x236.google.com [IPv6:2607:f8b0:400c:c08::236]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0034E899D5 for ; Wed, 5 Apr 2017 00:20:57 +0000 (UTC) Received: by mail-ua0-x236.google.com with SMTP id g30so2224072uab.0 for ; Tue, 04 Apr 2017 17:20:57 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter , Lucas Stach Cc: raof@ubuntu.com, dri-devel List-Id: dri-devel@lists.freedesktop.org --===============0925237974== Content-Type: multipart/alternative; boundary=001a113552b2c0db18054c605dbf --001a113552b2c0db18054c605dbf Content-Type: text/plain; charset=UTF-8 On Tue, Apr 4, 2017 at 9:53 PM Daniel Vetter wrote: > On Tue, Apr 4, 2017 at 12:43 PM, Lucas Stach > wrote: > >> If I could guarantee that I'd only ever run on 4.13-or-later kernels > >> (I think that's when the previous patches will land?), then this would > >> indeed be mostly unnecessary. It would save me a bunch of addfb calls > >> that would predictably fail, but they're cheap. > > > > I don't think we ever had caps for "things are working now, as they are > > supposed to". i915 wasn't properly synchronizing on foreign fences for a > > long time, yet we didn't gain a cap for "cross device sync works now". > > > > If your distro use-case relies on those things working it's probably > > best to just backport the relevant fixes. > > The even better solution for this is to push the backports through > upstream -stable kernels. This stuff here is simple enough that we can > do it. Same could have been done for the fairly minimal fencing fixes > for i915 (at least some of them, the ones in the page-flip). > > Otherwise we'll end up with tons IM_NOT_BUGGY and > IM_SLIGHTLY_LESS_BUGGY and IM_NOT_BUGGY_EXCEPT_THIS_BOTCHED_BACKPORT > flags where no one at all knows what they mean, usage between > different drivers and different userspace is entirely inconsistent and > they just all add to the confusion. They're just bugs, lets treat them > like that. > It's not *quite* DRM_CAP_PRIME_SCANOUT_NOT_BUGGY - while the relevant hardware allegedly supports it, nouveau/radeon/amdgpu don't do scanout of GTT, so the lack of this cap indicates that there's no point in trying to call addfb2. But calling addfb2 and it failing is not expensive, so this is rather niche. In practice I can just restrict attempting to scanout of imported buffers to i915, as that's the only driver that it'll work on. By the time nouveau/radeon/amdgpu get patches to scanout of GTT the fixes should be old enough that I don't need to care about unfixed kernels. --001a113552b2c0db18054c605dbf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue= , Apr 4, 2017 at 9:53 PM Daniel Vetter <daniel@ffwll.ch> wrote:
O= n Tue, Apr 4, 2017 at 12:43 PM, Lucas Stach <l.stach@pengutronix.de= > wrote:
>> If I could guarantee that I'd only ever run on 4.13-or-later k= ernels
>> (I think that's when the previous patches will land?), then th= is would
>> indeed be mostly unnecessary. It would save me a bunch of addfb ca= lls
>> that would predictably fail, but they're cheap.
>
> I don't think we ever had caps for "things are working now, a= s they are
> supposed to". i915 wasn't properly synchronizing on foreign f= ences for a
> long time, yet we didn't gain a cap for "cross device sync wo= rks now".
>
> If your distro use-case relies on those things working it's probab= ly
> best to just backport the relevant fixes.

The even better solution for this is to push the backports through
upstream -stable kernels. This stuff here is simple enough that we can
do it. Same could have been done for the fairly minimal fencing fixes
for i915 (at least some of them, the ones in the page-flip).

Otherwise we'll end up with tons IM_NOT_BUGGY and
IM_SLIGHTLY_LESS_BUGGY and IM_NOT_BUGGY_EXCEPT_THIS_BOTCHED_BACKPORT
flags where no one at all knows what they mean, usage between
different drivers and different userspace is entirely inconsistent and
they just all add to the confusion. They're just bugs, lets treat them<= br class=3D"gmail_msg"> like that.

It's= not *quite* DRM_CAP_PRIME_SCANOUT_NOT_BUGGY - while the relevant hardware = allegedly supports it, nouveau/radeon/amdgpu don't do scanout of GTT, s= o the lack of this cap indicates that there's no point in trying to cal= l addfb2.

But calling addfb2 and it failing is not expens= ive, so this is rather niche.

In practice I can just rest= rict attempting to scanout of imported buffers to i915, as that's the o= nly driver that it'll work on. By the time nouveau/radeon/amdgpu get pa= tches to scanout of GTT the fixes should be old enough that I don't nee= d to care about unfixed kernels.
--001a113552b2c0db18054c605dbf-- --===============0925237974== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0925237974==--