From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= Subject: Re: Unix Device Memory Allocation project Date: Wed, 19 Oct 2016 15:40:31 +0200 Message-ID: References: <8b555674-1c5b-c791-4547-2ea7c16aee6c@nvidia.com> <75693493-86ac-297f-20b8-63801cf79933@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1463516781==" Return-path: Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 77FA16E917 for ; Wed, 19 Oct 2016 13:40:33 +0000 (UTC) Received: by mail-oi0-x22a.google.com with SMTP id t73so30647579oie.1 for ; Wed, 19 Oct 2016 06:40:33 -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: Nicolai Haehnle Cc: James Jones , dri-devel List-Id: dri-devel@lists.freedesktop.org --===============1463516781== Content-Type: multipart/alternative; boundary=001a1134ea2efaad1b053f37f392 --001a1134ea2efaad1b053f37f392 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Oct 19, 2016 2:33 PM, "Nicolai H=C3=A4hnle" wrote: > > On 19.10.2016 01:40, Marek Ol=C5=A1=C3=A1k wrote: >> >> * We can build upon this idea. I think the worst thing to do would >> be to add metadata handling to driver-agnostic userspace APIs. Really, >> driver-agnostic APIs shouldn't know about that, because they can't >> understand all the hw-specific information encoded in the metadata. >> Also, when you want to change the metadata format, you only have to >> update the affected drivers, not userspace APIs. > > > I don't fully agree with that. In a PRIME setting, where you have a compositor running on an integrated GPU and an application on a dGPU, there may well be a benefit to finding a tiling format that the dGPU can produce and the iGPU can consume. Admittedly I don't know whether that's actually possible today when they're from different vendors, but resigning ourselves to linear only for all time seems a bit pessimistic. Yeah, that's a good point and I even mentioned it near the end of my post. It could be solved by passing the PCI ID of the other device to the driver instead of the linear flag. Then the driver can decide whether a linear layout is necessary or not. Marek --001a1134ea2efaad1b053f37f392 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Oct 19, 2016 2:33 PM, "Nicolai H=C3=A4hnle" <= ;nhaehnle@gmail.com> wrote: >
> On 19.10.2016 01:40, Marek Ol=C5=A1=C3=A1k wrote:
>>
>> =C2=A0 * We can build upon this idea. I think the worst thing to d= o would
>> be to add metadata handling to driver-agnostic userspace APIs. Rea= lly,
>> driver-agnostic APIs shouldn't know about that, because they c= an't
>> understand all the hw-specific information encoded in the metadata= .
>> Also, when you want to change the metadata format, you only have t= o
>> update the affected drivers, not userspace APIs.
>
>
> I don't fully agree with that. In a PRIME setting, where you have = a compositor running on an integrated GPU and an application on a dGPU, the= re may well be a benefit to finding a tiling format that the dGPU can produ= ce and the iGPU can consume. Admittedly I don't know whether that's= actually possible today when they're from different vendors, but resig= ning ourselves to linear only for all time seems a bit pessimistic.

Yeah, that's a good point and I even mentioned it near t= he end of my post. It could be solved by passing the PCI ID of the other de= vice to the driver instead of the linear flag. Then the driver can decide w= hether a linear layout is necessary or not.

Marek

--001a1134ea2efaad1b053f37f392-- --===============1463516781== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1463516781==--