All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Eric Anholt <eric@anholt.net>, dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, Maxime Ripard <maxime.ripard@bootlin.com>
Subject: Re: [PATCH 7/7] drm/vc4: Make sure that the v3d ident debugfs has vc4's power on.
Date: Fri, 22 Mar 2019 11:43:30 +0100	[thread overview]
Message-ID: <d9fb67398678b10784a25534699f5d28070d4552.camel@bootlin.com> (raw)
In-Reply-To: <20190220210343.28157-7-eric@anholt.net>

Hi,

Le mercredi 20 février 2019 à 13:03 -0800, Eric Anholt a écrit :
> Otherwise, you sometimes decode the ident fields based on 0xdeadbeef
> register reads.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  drivers/gpu/drm/vc4/vc4_v3d.c | 29 +++++++++++++++++------------
>  1 file changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
> index 7820b8eaaa98..36e6c7086ecf 100644
> --- a/drivers/gpu/drm/vc4/vc4_v3d.c
> +++ b/drivers/gpu/drm/vc4/vc4_v3d.c
> @@ -108,18 +108,23 @@ static int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused)
>  	struct drm_info_node *node = (struct drm_info_node *)m->private;
>  	struct drm_device *dev = node->minor->dev;
>  	struct vc4_dev *vc4 = to_vc4_dev(dev);
> -	uint32_t ident1 = V3D_READ(V3D_IDENT1);
> -	uint32_t nslc = VC4_GET_FIELD(ident1, V3D_IDENT1_NSLC);
> -	uint32_t tups = VC4_GET_FIELD(ident1, V3D_IDENT1_TUPS);
> -	uint32_t qups = VC4_GET_FIELD(ident1, V3D_IDENT1_QUPS);
> -
> -	seq_printf(m, "Revision:   %d\n",
> -		   VC4_GET_FIELD(ident1, V3D_IDENT1_REV));
> -	seq_printf(m, "Slices:     %d\n", nslc);
> -	seq_printf(m, "TMUs:       %d\n", nslc * tups);
> -	seq_printf(m, "QPUs:       %d\n", nslc * qups);
> -	seq_printf(m, "Semaphores: %d\n",
> -		   VC4_GET_FIELD(ident1, V3D_IDENT1_NSEM));
> +	int ret = vc4_v3d_pm_get(vc4);
> +
> +	if (ret == 0) {
> +		uint32_t ident1 = V3D_READ(V3D_IDENT1);
> +		uint32_t nslc = VC4_GET_FIELD(ident1, V3D_IDENT1_NSLC);
> +		uint32_t tups = VC4_GET_FIELD(ident1, V3D_IDENT1_TUPS);
> +		uint32_t qups = VC4_GET_FIELD(ident1, V3D_IDENT1_QUPS);
> +
> +		seq_printf(m, "Revision:   %d\n",
> +			   VC4_GET_FIELD(ident1, V3D_IDENT1_REV));
> +		seq_printf(m, "Slices:     %d\n", nslc);
> +		seq_printf(m, "TMUs:       %d\n", nslc * tups);
> +		seq_printf(m, "QPUs:       %d\n", nslc * qups);
> +		seq_printf(m, "Semaphores: %d\n",
> +			   VC4_GET_FIELD(ident1, V3D_IDENT1_NSEM));
> +		vc4_v3d_pm_put(vc4);
> +	}
>  
>  	return 0;
>  }
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


  reply	other threads:[~2019-03-22 10:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20 21:03 [PATCH 1/7] drm: Add a helper function for printing a debugfs_regset32 Eric Anholt
2019-02-20 21:03 ` [PATCH 2/7] drm/vc4: Use drm_print_regset32() for our debug register dumping Eric Anholt
2019-02-20 21:03   ` Eric Anholt
2019-03-22 10:32   ` Paul Kocialkowski
2019-03-22 10:32     ` Paul Kocialkowski
2019-02-20 21:03 ` [PATCH 3/7] drm/vc4: Use common helpers for debugfs setup by the driver components Eric Anholt
2019-02-20 21:03   ` Eric Anholt
2019-02-20 21:03 ` [PATCH 4/7] drm/vc4: Use drm_printer for the debugfs and runtime bo stats output Eric Anholt
2019-02-20 21:03   ` Eric Anholt
2019-03-22 10:41   ` Paul Kocialkowski
2019-02-20 21:03 ` [PATCH 5/7] drm/vc4: Disable V3D interactions if the v3d component didn't probe Eric Anholt
2019-03-25 13:30   ` Paul Kocialkowski
2019-02-20 21:03 ` [PATCH 6/7] drm/vc4: Add helpers for pm get/put Eric Anholt
2019-02-20 21:03   ` Eric Anholt
2019-03-22 10:48   ` Paul Kocialkowski
2019-02-20 21:03 ` [PATCH 7/7] drm/vc4: Make sure that the v3d ident debugfs has vc4's power on Eric Anholt
2019-03-22 10:43   ` Paul Kocialkowski [this message]
2019-02-21  9:37 ` [PATCH 1/7] drm: Add a helper function for printing a debugfs_regset32 Daniel Vetter
2019-02-21  9:37   ` Daniel Vetter
2019-03-25 16:43   ` Eric Anholt
2019-03-22 10:30 ` Paul Kocialkowski
2019-04-01 17:52   ` Eric Anholt

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=d9fb67398678b10784a25534699f5d28070d4552.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.