From: Eric Anholt <eric@anholt.net>
To: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/pl111: Add a debugfs node to dump our registers.
Date: Fri, 19 May 2017 11:17:11 -0700 [thread overview]
Message-ID: <87pof4g194.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <20170518100804.vnqomuzeligkltby@imgtec.com>
[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]
Eric Engestrom <eric.engestrom@imgtec.com> writes:
> On Wednesday, 2017-05-17 17:56:40 -0700, Eric Anholt wrote:
>> While debugging an X11 display failure, I wanted to see where we were
>> actually scanning out from. This is probably generally useful to
>> others that might be working on this device.
>>
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>> drivers/gpu/drm/pl111/Makefile | 2 ++
>> drivers/gpu/drm/pl111/pl111_debugfs.c | 55 +++++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/pl111/pl111_drm.h | 3 ++
>> drivers/gpu/drm/pl111/pl111_drv.c | 4 +++
>> 4 files changed, 64 insertions(+)
>> create mode 100644 drivers/gpu/drm/pl111/pl111_debugfs.c
>>
>> diff --git a/drivers/gpu/drm/pl111/Makefile b/drivers/gpu/drm/pl111/Makefile
>> index 01caee727c13..59483d610ef5 100644
>> --- a/drivers/gpu/drm/pl111/Makefile
>> +++ b/drivers/gpu/drm/pl111/Makefile
>> @@ -2,4 +2,6 @@ pl111_drm-y += pl111_connector.o \
>> pl111_display.o \
>> pl111_drv.o
>>
>> +pl111_drm-$(CONFIG_DEBUG_FS) += pl111_debugfs.o
>> +
>> obj-$(CONFIG_DRM_PL111) += pl111_drm.o
>> diff --git a/drivers/gpu/drm/pl111/pl111_debugfs.c b/drivers/gpu/drm/pl111/pl111_debugfs.c
>> new file mode 100644
>> index 000000000000..ee13a060cddf
>> --- /dev/null
>> +++ b/drivers/gpu/drm/pl111/pl111_debugfs.c
>> @@ -0,0 +1,55 @@
>> +/*
>> + * Copyright © 2017 Broadcom
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +#include <linux/amba/clcd-regs.h>
>> +#include <linux/seq_file.h>
>> +#include <drm/drm_debugfs.h>
>> +#include <drm/drmP.h>
>> +#include "pl111_drm.h"
>> +
>> +#define REGDEF(reg) { reg, #reg }
>> +static const struct {
>> + uint32_t reg;
>> + const char *name;
>> +} pl111_reg_defs[] = {
>> + REGDEF(CLCD_TIM0),
>> + REGDEF(CLCD_TIM1),
>> + REGDEF(CLCD_TIM2),
>> + REGDEF(CLCD_TIM3),
>> + REGDEF(CLCD_UBAS),
>> + REGDEF(CLCD_PL111_CNTL),
>> + REGDEF(CLCD_PL111_IENB),
>> +};
>> +
>> +int pl111_debugfs_regs(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 pl111_drm_dev_private *priv = dev->dev_private;
>> + int i;
>
> nit: this will print a warning; s/int/unsigned/ ?
I don't see any. I think the warning is only for non-constant
expressions -- we do i < ARRAY_SIZE all over the place.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-05-19 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 0:56 Eric Anholt
2017-05-18 10:08 ` Eric Engestrom
2017-05-19 18:17 ` Eric Anholt [this message]
2017-05-18 13:33 ` Linus Walleij
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=87pof4g194.fsf@eliezer.anholt.net \
--to=eric@anholt.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric.engestrom@imgtec.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®