From: Robert Foss <robert.foss@collabora.com>
To: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
Adrian Salido <salidoa@google.com>
Subject: Re: [PATCH hwc v2 5/6] drm_hwcomposer: Add GetCrtcCount function
Date: Thu, 28 Sep 2017 18:21:44 +0200 [thread overview]
Message-ID: <1506615704.2185.2.camel@collabora.com> (raw)
In-Reply-To: <CAOw6vb+-FrWL7M5rT8Hk-j0kGBCmQyB8UNniTHzce+2fXFqxRA@mail.gmail.com>
On Wed, 2017-09-27 at 15:12 -0400, Sean Paul wrote:
> On Wed, Sep 27, 2017 at 7:58 AM, Robert Foss <robert.foss@collabora.c
> om> wrote:
> > This GetCrtrcCount helper functions enables convenient
> > fetching of the number of Crtcs from DrmResources.
> >
> > Signed-off-by: Robert Foss <robert.foss@collabora.com>
> > ---
> > drmresources.cpp | 4 ++++
> > drmresources.h | 1 +
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/drmresources.cpp b/drmresources.cpp
> > index 762f5ef..0578cc6 100644
> > --- a/drmresources.cpp
> > +++ b/drmresources.cpp
> > @@ -241,6 +241,10 @@ DrmPlane *DrmResources::GetPlane(uint32_t id)
> > const {
> > return NULL;
> > }
> >
> > +uint32_t DrmResources::GetCrtcCount() const {
> > + return (uint32_t) crtcs_.size();
> > +}
>
> The "blessed" way of doing this would be to add a new function
>
> const std::vector<std::unique_ptr<DrmCrtc>> &crtcs() const {
> return crtcs_;
> }
>
> and then use crtcs()->size() wherever needed.
>
>
Yeah, that is nicer and more versatile.
Rob.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-09-28 16:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 11:58 [PATCH hwc v2 0/6] Implement fencing Robert Foss
2017-09-27 11:58 ` [PATCH hwc v2 1/6] drm_hwcomposer: Remove threading Robert Foss
2017-09-27 13:34 ` Emil Velikov
2017-09-27 18:53 ` Robert Foss
2017-09-27 19:14 ` Sean Paul
2017-09-28 16:22 ` Robert Foss
2017-09-28 16:43 ` Chih-Wei Huang
2017-09-28 21:29 ` Rob Herring
2017-09-29 5:49 ` Chih-Wei Huang
2017-09-29 8:44 ` Robert Foss
2017-09-29 9:07 ` Chih-Wei Huang
2017-09-29 13:16 ` Robert Foss
2017-09-27 11:58 ` [PATCH hwc v2 2/6] drm_hwcomposer: Add support for IN_FENCE_FD property to DrmPlane Robert Foss
2017-09-27 19:14 ` Sean Paul
2017-09-27 11:58 ` [PATCH hwc v2 3/6] drm_hwcomposer: Submit in-fence to DRM Robert Foss
2017-09-27 18:55 ` Sean Paul
2017-09-27 18:59 ` Robert Foss
2018-02-12 22:10 ` Rob Herring
2017-09-27 11:58 ` [PATCH hwc v2 4/6] drm_hwcomposer: Add FENCE_OUT_PTR property to DrmCrtc Robert Foss
2017-09-27 19:15 ` Sean Paul
2017-09-27 11:58 ` [PATCH hwc v2 5/6] drm_hwcomposer: Add GetCrtcCount function Robert Foss
2017-09-27 19:12 ` Sean Paul
2017-09-28 16:21 ` Robert Foss [this message]
2017-09-27 11:58 ` [PATCH hwc v2 6/6] drm_hwcomposer: Add out-fence support Robert Foss
2017-09-27 19:11 ` Sean Paul
2017-09-28 16:21 ` Robert Foss
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=1506615704.2185.2.camel@collabora.com \
--to=robert.foss@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=salidoa@google.com \
--cc=seanpaul@chromium.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