From: Sean Paul <seanpaul@chromium.org>
To: Jeykumar Sankaran <jsanka@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, hoegsberg@google.com
Subject: Re: [DPU PATCH 4/4] drm/msm/dpu: use private obj to track hw resources
Date: Thu, 14 Jun 2018 11:36:36 -0400 [thread overview]
Message-ID: <20180614153636.GC20303@art_vandelay> (raw)
In-Reply-To: <959717757a071673682236e39de59680@codeaurora.org>
On Wed, Jun 13, 2018 at 12:01:21PM -0700, Jeykumar Sankaran wrote:
> On 2018-06-13 09:44, Jordan Crouse wrote:
> > On Tue, Jun 12, 2018 at 06:17:47PM -0700, Jeykumar Sankaran wrote:
> > > Switch to state based resource management. This patch
> > > overhauls the resource manager and HW allocation methods by
> > > maintaining the global resource pool and allocated hw
> > > blocks in respective drm component states.
> > >
> > > Global resource manager(RM) is tracked in private object.
> > > Allocation strategy is switched from single point allocation
> > > of HW resources for the display pipeline to per component
> > > based allocation, where each drm component allocates HW
> > > blocks mapped to it's domain and tracks them in their respective
> > > state objects.
> > >
> > > Fixes resource contention due to race conditions between
> > > user space and display thread by reserving resources
> > > only in atomic check.
> > >
> > > Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
> > > ---
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 210 +++---
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 59 +-
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 223 ++----
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 4 -
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 9 +-
> > > .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 32 +-
> > > .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 86 +--
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 19 +-
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 8 +-
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 805
> > ++++++---------------
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 149 ++--
> > > 11 files changed, 534 insertions(+), 1070 deletions(-)
/snip
> > cstate->num_mixers);
> >
> > Nit - this could be worded a bit better - "too many mixers" would be
> > better, but
> > I have to ask - under what circumstances would the number of mixers be
> > larger
> > than CRTC_DUAL_MIXERS and/or why don't we support a dynamic number of
> > mixers?
> >
> Comes from downstream driver implementation where CRTC iterates through
> RM free pool to identify mixers tagged with the current crtc id. If the
> previous clean up was screwed up this may have more than 2 mixers. With
> the new state based RM, its very unlikely we hit this condition.
>
In this case, add a comment with "/* This should never happen */"
I'm just kidding, that would virtually guarantee that it does happen and we
certainly don't need that bad juju around!
Sean
> We do support dynamic mixer counts. Based on the connector (panel)
> resolution,
> CRTC allocates 1 or 2 (panel_width > hw mixer width) mixer block(s) on the
> first
> atomic check. DPU limits max no. of hw mixers that can be ganged up for a
> display to 2.
>
> > > return;
> > > }
> >
/snip
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-06-14 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 1:17 [DPU PATCH 0/4] Atomic resource management Jeykumar Sankaran
[not found] ` <1528852667-14833-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-06-13 1:17 ` [DPU PATCH 1/4] drm/msm/dpu: add atomic private object to dpu kms Jeykumar Sankaran
[not found] ` <1528852667-14833-2-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-06-13 16:29 ` Jordan Crouse
2018-06-13 18:25 ` [Freedreno] " Jeykumar Sankaran
2018-06-13 1:17 ` [DPU PATCH 2/4] drm/msm/dpu: remove scalar config definitions Jeykumar Sankaran
2018-06-13 1:17 ` [DPU PATCH 3/4] drm/msm/dpu: remove resource pool manager Jeykumar Sankaran
2018-06-13 1:17 ` [DPU PATCH 4/4] drm/msm/dpu: use private obj to track hw resources Jeykumar Sankaran
[not found] ` <1528852667-14833-5-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-06-13 16:44 ` Jordan Crouse
[not found] ` <20180613164456.GK11565-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-06-13 19:01 ` Jeykumar Sankaran
2018-06-14 15:36 ` Sean Paul [this message]
2018-06-14 15:49 ` Sean Paul
2018-06-14 15:38 ` [DPU PATCH 0/4] Atomic resource management Sean Paul
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=20180614153636.GC20303@art_vandelay \
--to=seanpaul@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=hoegsberg@google.com \
--cc=jsanka@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.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