From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v3] drm/vc4: Add a debugfs entry to disable/enable the load tracker
Date: Tue, 11 Dec 2018 14:12:33 +0100 [thread overview]
Message-ID: <20181211141233.79709688@bbrezillon> (raw)
In-Reply-To: <20181207134757.32437-1-paul.kocialkowski@bootlin.com>
On Fri, 7 Dec 2018 14:47:57 +0100
Paul Kocialkowski <paul.kocialkowski@bootlin.com> wrote:
> diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> index f3fd34faa812..e80b1ad5c938 100644
> --- a/drivers/gpu/drm/vc4/vc4_kms.c
> +++ b/drivers/gpu/drm/vc4/vc4_kms.c
> @@ -479,6 +479,7 @@ static const struct drm_private_state_funcs vc4_load_tracker_state_funcs = {
> static int
> vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
> {
> + struct vc4_dev *vc4 = to_vc4_dev(dev);
> int ret;
>
> ret = vc4_ctm_atomic_check(dev, state);
> @@ -489,7 +490,10 @@ vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
> if (ret)
> return ret;
>
> - return vc4_load_tracker_atomic_check(state);
> + if (vc4->load_tracker_enabled)
> + return vc4_load_tracker_atomic_check(state);
Even if we don't return an error when ->load_tracker_enabled is false,
we should keep updating the ->{hvs,membus}_load state, otherwise those
fields will contain bad values if we activate the load tracker after
the planes have been enabled.
I suggest moving this test in vc4_load_tracker_atomic_check() just
before
if (load_state->membus_load > SZ_1G + SZ_512M)
prev parent reply other threads:[~2018-12-11 13:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 13:47 Paul Kocialkowski
2018-12-11 13:12 ` Boris Brezillon [this message]
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=20181211141233.79709688@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®