mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: dri-devel@lists.freedesktop.org,
	linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jose Abreu <Jose.Abreu@synopsys.com>
Subject: Re: [PATCH] drm/arcpgu: Opt in debugfs
Date: Fri, 3 Mar 2017 16:18:10 +0000	[thread overview]
Message-ID: <20170303161810.GN917@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <1488544235-25444-1-git-send-email-abrodkin@synopsys.com>

On Fri, Mar 03, 2017 at 03:30:35PM +0300, Alexey Brodkin wrote:
> This change adopts debugfs usage for outputting useful data.
> As of today we print:
>  * Mode and real HW clock values
>  * Standard FB info
> 
> Code is heavily borrowed from ARM's HDLCD thus adding Liviu in Cc.

FWIW: Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>

Best regards,
Liviu

> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Liviu Dudau <Liviu.Dudau@arm.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Jose Abreu <joabreu@synopsys.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index 8d8344ed655e..5c82f52fba80 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -161,6 +161,32 @@ static int arcpgu_unload(struct drm_device *drm)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_DEBUG_FS
> +static int arcpgu_show_pxlclock(struct seq_file *m, void *arg)
> +{
> +	struct drm_info_node *node = (struct drm_info_node *)m->private;
> +	struct drm_device *drm = node->minor->dev;
> +	struct arcpgu_drm_private *arcpgu = drm->dev_private;
> +	unsigned long clkrate = clk_get_rate(arcpgu->clk);
> +	unsigned long mode_clock = arcpgu->crtc.mode.crtc_clock * 1000;
> +
> +	seq_printf(m, "hw  : %lu\n", clkrate);
> +	seq_printf(m, "mode: %lu\n", mode_clock);
> +	return 0;
> +}
> +
> +static struct drm_info_list arcpgu_debugfs_list[] = {
> +	{ "clocks", arcpgu_show_pxlclock, 0 },
> +	{ "fb", drm_fb_cma_debugfs_show, 0 },
> +};
> +
> +static int arcpgu_debugfs_init(struct drm_minor *minor)
> +{
> +	return drm_debugfs_create_files(arcpgu_debugfs_list,
> +		ARRAY_SIZE(arcpgu_debugfs_list), minor->debugfs_root, minor);
> +}
> +#endif
> +
>  static struct drm_driver arcpgu_drm_driver = {
>  	.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
>  			   DRIVER_ATOMIC,
> @@ -187,6 +213,9 @@ static struct drm_driver arcpgu_drm_driver = {
>  	.gem_prime_vmap = drm_gem_cma_prime_vmap,
>  	.gem_prime_vunmap = drm_gem_cma_prime_vunmap,
>  	.gem_prime_mmap = drm_gem_cma_prime_mmap,
> +#ifdef CONFIG_DEBUG_FS
> +	.debugfs_init = arcpgu_debugfs_init,
> +#endif
>  };
>  
>  static int arcpgu_probe(struct platform_device *pdev)
> -- 
> 2.7.4
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

      reply	other threads:[~2017-03-03 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 12:30 Alexey Brodkin
2017-03-03 16:18 ` Liviu Dudau [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=20170303161810.GN917@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.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

all inboxes | Powered by JetHome®