dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: christian.koenig@amd.com
Cc: "Nicolai Hähnle" <nicolai.haehnle@amd.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Marek Olšák" <marek.olsak@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"amd-gfx mailing list" <amd-gfx@lists.freedesktop.org>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Dave Airlie" <airlied@redhat.com>,
	"Chad Versace" <chadversary@chromium.org>
Subject: Re: [RFC] drm/amdgpu: Add macros and documentation for format modifiers.
Date: Tue, 4 Sep 2018 14:26:04 +0200	[thread overview]
Message-ID: <20180904122604.GO21634@phenom.ffwll.local> (raw)
In-Reply-To: <72744df1-001b-bcd4-dcba-b6966a62c4ce@gmail.com>

On Tue, Sep 04, 2018 at 12:44:19PM +0200, Christian König wrote:
> Am 04.09.2018 um 12:15 schrieb Daniel Stone:
> > Hi,
> > 
> > On Tue, 4 Sep 2018 at 11:05, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > > On Tue, Sep 4, 2018 at 3:00 AM, Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> wrote:
> > > > +/* The chip this is compatible with.
> > > > + *
> > > > + * If compression is disabled, use
> > > > + *   - AMDGPU_CHIP_TAHITI for GFX6-GFX8
> > > > + *   - AMDGPU_CHIP_VEGA10 for GFX9+
> > > > + *
> > > > + * With compression enabled please use the exact chip.
> > > > + *
> > > > + * TODO: Do some generations share DCC format?
> > > > + */
> > > > +#define AMDGPU_MODIFIER_CHIP_GEN_SHIFT                 40
> > > > +#define AMDGPU_MODIFIER_CHIP_GEN_MASK                  0xff
> > > Do you really need all the combinations here of DCC + gpu gen + tiling
> > > details? When we had the entire discussion with nvidia folks they
> > > eventually agreed that they don't need the massive pile with every
> > > possible combination. Do you really plan to share all these different
> > > things?
> > > 
> > > Note that e.g. on i915 we spec some of the tiling depending upon
> > > buffer size and buffer format (because that's how the hw works), not
> > > using explicit modifier flags for everything.
> > Right. The conclusion, after people went through and started sorting
> > out the kinds of formats for which they would _actually_ export real
> > colour buffers for, that most vendors definitely have fewer than
> > 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936
> > possible formats to represent, very likely fewer than
> > 340,282,366,920,938,463,463,374,607,431,768,211,456 formats, probably
> > fewer than 72,057,594,037,927,936 formats, and even still generally
> > fewer than 281,474,976,710,656 if you want to be generous and leave 8
> > bits of the 56 available.
> 
> The problem here is that at least for some parameters we actually don't know
> which formats are actually used.
> 
> The following are not real world examples, but just to explain the general
> problem.
> 
> The memory configuration for example can be not ASIC specific, but rather
> determined by whoever took the ASIC and glued it together with VRAM on a
> board. It is not likely that somebody puts all the VRAM chips on one
> channel, but it is still perfectly possible.
> 
> Same is true for things like harvesting, e.g. of 16 channels halve of them
> could be bad and we need to know which to actually use.

For my understanding: This leaks outside the chip when sharing buffers?
All the information you only need locally to a given amdgpu instance
don't really need to be encoded in modifiers.

Pointers to code where this is all decided (kernel and radeonsi would be
good starters I guess) would be really good here.
-Daniel

> 
> Regards,
> Christian.
> 
> > 
> > If you do use 256 bits in order to represent
> > 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936
> > modifiers per format, userspace would start hitting OOM pretty quickly
> > as it attempted to enumerate and negotiate acceptable modifiers.
> > Either that or we need to replace the fixed 64-bit modifier tokens
> > with some kind of eBPF script.
> > 
> > Cheers,
> > Daniel
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-09-04 12:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  1:00 [RFC] drm/amdgpu: Add macros and documentation for format modifiers Bas Nieuwenhuizen
     [not found] ` <20180904010033.67611-1-bas-dldO88ZXqoXqqjsSq9zF6IRWq/SkRNHw@public.gmane.org>
2018-09-04  7:10   ` Christian König
2018-09-04 10:04   ` Daniel Vetter
     [not found]     ` <CAKMK7uGceX3ueO9+m8ZAi6UZMsx47X57L4NzzeivFFdquqMGXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 10:15       ` Daniel Stone
     [not found]         ` <CAPj87rNRAa0PkSOp3crK2YsifCeO6ucPhUM4Kg2kOfXk3MDOWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 10:44           ` Christian König
     [not found]             ` <72744df1-001b-bcd4-dcba-b6966a62c4ce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-04 12:22               ` Daniel Stone
     [not found]                 ` <CAP+8YyG3ALnJJH_04-10t2EOy9wk4SVB1jz8kw8MoX-w+J8sng@mail.gmail.com>
     [not found]                   ` <CAP+8YyG3ALnJJH_04-10t2EOy9wk4SVB1jz8kw8MoX-w+J8sng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 12:40                     ` Bas Nieuwenhuizen
     [not found]                 ` <CAPj87rMPtu_O5jGxFPgc02QeXofrmzzP7kiVbL7xD9-rpa9akw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 12:59                   ` Christian König
2018-09-04 12:26             ` Daniel Vetter [this message]
     [not found]               ` <20180904122604.GO21634-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-09-04 12:33                 ` Bas Nieuwenhuizen
2018-09-04 13:03                   ` Daniel Vetter
2018-09-04 13:12                     ` Christian König
     [not found]                       ` <164b70a7-8a7d-60ca-480b-04453ca95b90-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-04 13:17                         ` Daniel Vetter
2018-09-04 13:23                           ` Christian König
     [not found]                     ` <20180904130353.GQ21634-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-09-04 13:33                       ` Bas Nieuwenhuizen
2018-09-04 14:43                         ` Daniel Vetter
2018-09-04 15:52                           ` Bas Nieuwenhuizen
     [not found]                             ` <CAP+8YyH_5oNKcWgapuC+vRQOAcBEDPLqxvBqUvhqYdT_FjMe7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 16:37                               ` Daniel Vetter
     [not found]                                 ` <CAKMK7uEYNkvTV19Svz0LQS5SgiWbTXmQcmVZCWMihrjNE6Rx3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 17:48                                   ` Christian König
     [not found]                                     ` <b3276cd4-8ff2-36d6-35ef-83da75099b96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-04 17:57                                       ` Bas Nieuwenhuizen
     [not found]                                         ` <CAP+8YyFC6z=aNT=RR7zV44i4y6tURfadazDX0VaPnzBhG-6gfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 18:00                                           ` Bas Nieuwenhuizen
     [not found]                                             ` <CAP+8YyEH7i-zkoaMyT=jhgc_O_uyq6cdU2PjNkAvE6o_7AthaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 18:06                                               ` Christian König
2018-09-04 18:27                                         ` Daniel Vetter
2018-09-04 18:31                                           ` Bas Nieuwenhuizen
2018-09-04 19:28                                             ` Daniel Vetter
     [not found]                                               ` <CAKMK7uH+O5bhSUY6srEGEu2NcqCOR0vEw+mfoPm8q_yCzzNUHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 19:36                                                 ` Bas Nieuwenhuizen
     [not found]                                                   ` <CAP+8YyF6NyFbjiVrR4jvfgE7gZTtbM3GuxMqqkoDPRADV+4EYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-04 21:39                                                     ` Daniel Vetter
2018-09-04 13:03                 ` Christian König
2018-09-04 12:21     ` Bas Nieuwenhuizen
2018-09-07  4:50   ` Marek Olšák
     [not found]     ` <CAAxE2A4eO4pevcHQKhbRbZXFTUVbFuBzOrFf8dgfVR4n5fvX1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-07  9:55       ` Bas Nieuwenhuizen
     [not found]         ` <CAP+8YyEQKu7xACK3O=tp=MqvvumcjYouwate3_+uhTCDho-v5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-07 22:33           ` Marek Olšák

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=20180904122604.GO21634@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chadversary@chromium.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=marek.olsak@amd.com \
    --cc=nicolai.haehnle@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox