From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Daniel Vetter" <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
"Dave Airlie" <airlied@redhat.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid
Date: Mon, 19 Feb 2018 15:50:00 +0100 [thread overview]
Message-ID: <20180219145000.GF22199@phenom.ffwll.local> (raw)
In-Reply-To: <151905093868.2041.7669755303078047846@mail.alporthouse.com>
On Mon, Feb 19, 2018 at 02:35:38PM +0000, Chris Wilson wrote:
> Quoting Christian König (2018-02-13 13:48:24)
> > Am 12.02.2018 um 18:14 schrieb Ville Syrjälä:
> > > On Mon, Feb 12, 2018 at 02:55:33PM +0000, Chris Wilson wrote:
> > >> Use the new idr_init_base() function to create an IDR that knows id==0
> > >> is never allocated as it maps to an invalid identifier. By knowing that
> > >> id==0 is invalid, the IDR can start from id=1 instead avoiding the issue
> > >> of having to start each lookup from the zeroth leaf as id==0 is always
> > >> unused (and thus the tree-of-bitmaps indicate that is the first
> > >> available).
> > >>
> > >> References: 6ce711f27500 ("idr: Make 1-based IDRs more efficient")
> > >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > >> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > >> Cc: Christian Konig <christian.koenig@amd.com>
> > >> Cc: Dave Airlie <airlied@redhat.com>
> > > Yep, looks like all of these pass start==1 to idr_alloc().
> > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Acked-by: Christian König <christian.koenig@amd.com> as well.
> >
> > Probably going to do this for the command submission context handles in
> > amdgpu as well.
>
> Thanks for the review, pushed to drm-misc-next.
>
> As noted, there are probably quite a few more idr's that we can move
> over to idr_init_base(1), e.g. the KMS objects. If someone feels like a
> small task?
I'll type a todo.rst patch.
-Daniel
--
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
next prev parent reply other threads:[~2018-02-19 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 14:55 [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid Chris Wilson
2018-02-12 16:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-12 17:14 ` [PATCH] " Ville Syrjälä
2018-02-13 13:48 ` Christian König
2018-02-19 14:35 ` Chris Wilson
2018-02-19 14:50 ` Daniel Vetter [this message]
2018-02-12 18:20 ` ✓ Fi.CI.IGT: success for " Patchwork
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=20180219145000.GF22199@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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