From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Helen Koike <helen.koike@collabora.com>
Cc: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
linux-media@vger.kernel.org, ezequiel@collabora.com,
hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com,
sakari.ailus@linux.intel.com, linux-rockchip@lists.infradead.org,
mchehab@kernel.org
Subject: Re: [PATCH] media: staging: rkisp1: set more precise size errors in debugfs
Date: Wed, 20 May 2020 03:13:56 +0300 [thread overview]
Message-ID: <20200520001356.GL3820@pendragon.ideasonboard.com> (raw)
In-Reply-To: <d78fd01c-6044-4c09-dc44-9df449eb051e@collabora.com>
Hi Dafna and Helen,
On Tue, May 19, 2020 at 01:17:13PM -0300, Helen Koike wrote:
> On 5/14/20 11:21 AM, Dafna Hirschfeld wrote:
> > When a size error is signaled, it is possible to read a register
> > to see where the error comes from. So, in debugfs the general
> > error 'pic_size_err' can be replaced with 3 more precise errors.
> >
> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> > ---
> > drivers/staging/media/rkisp1/rkisp1-common.h | 4 +++-
> > drivers/staging/media/rkisp1/rkisp1-dev.c | 8 ++++++--
> > drivers/staging/media/rkisp1/rkisp1-isp.c | 7 ++++++-
> > 3 files changed, 15 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/media/rkisp1/rkisp1-common.h b/drivers/staging/media/rkisp1/rkisp1-common.h
> > index 0c4fe503adc9..95d54306bae6 100644
> > --- a/drivers/staging/media/rkisp1/rkisp1-common.h
> > +++ b/drivers/staging/media/rkisp1/rkisp1-common.h
> > @@ -226,7 +226,9 @@ struct rkisp1_resizer {
> > struct rkisp1_debug {
> > struct dentry *debugfs_dir;
> > unsigned long data_loss;
> > - unsigned long pic_size_error;
> > + unsigned long outform_size_error;
> > + unsigned long is_size_error;
>
> I would just do s/is/img_stabilization
>
> otherwise it is easy to read it as a verb, and it feels it's a boolean, and not a counter.
>
> With this:
>
> Acked-by: Helen Koike <helen.koike@collabora.com>
With that change,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > + unsigned long inform_size_error;
> > unsigned long mipi_error;
> > unsigned long stats_error;
> > unsigned long stop_timeout[2];
> > diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c
> > index 9ac38bafb839..2298d3ae5950 100644
> > --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
> > +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
> > @@ -438,8 +438,12 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
> > }
> > debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
> > &debug->data_loss);
> > - debugfs_create_ulong("pic_size_error", 0444, debug->debugfs_dir,
> > - &debug->pic_size_error);
> > + debugfs_create_ulong("outform_size_err", 0444, debug->debugfs_dir,
> > + &debug->outform_size_error);
> > + debugfs_create_ulong("is_size_error", 0444, debug->debugfs_dir,
> > + &debug->is_size_error);
> > + debugfs_create_ulong("inform_size_error", 0444, debug->debugfs_dir,
> > + &debug->inform_size_error);
> > debugfs_create_ulong("mipi_error", 0444, debug->debugfs_dir,
> > &debug->mipi_error);
> > debugfs_create_ulong("stats_error", 0444, debug->debugfs_dir,
> > diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c b/drivers/staging/media/rkisp1/rkisp1-isp.c
> > index dc2b59a0160a..a7e5461e25a5 100644
> > --- a/drivers/staging/media/rkisp1/rkisp1-isp.c
> > +++ b/drivers/staging/media/rkisp1/rkisp1-isp.c
> > @@ -1123,8 +1123,13 @@ void rkisp1_isp_isr(struct rkisp1_device *rkisp1)
> > if (status & RKISP1_CIF_ISP_PIC_SIZE_ERROR) {
> > /* Clear pic_size_error */
> > isp_err = rkisp1_read(rkisp1, RKISP1_CIF_ISP_ERR);
> > + if (isp_err & RKISP1_CIF_ISP_ERR_INFORM_SIZE)
> > + rkisp1->debug.inform_size_error++;
> > + if (isp_err & RKISP1_CIF_ISP_ERR_IS_SIZE)
> > + rkisp1->debug.is_size_error++;
> > + if (isp_err & RKISP1_CIF_ISP_ERR_OUTFORM_SIZE)
> > + rkisp1->debug.outform_size_error++;
> > rkisp1_write(rkisp1, isp_err, RKISP1_CIF_ISP_ERR_CLR);
> > - rkisp1->debug.pic_size_error++;
> > } else if (status & RKISP1_CIF_ISP_DATA_LOSS) {
> > /* keep track of data_loss in debugfs */
> > rkisp1->debug.data_loss++;
> >
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2020-05-20 0:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 14:21 [PATCH] media: staging: rkisp1: set more precise size errors in debugfs Dafna Hirschfeld
2020-05-19 16:17 ` Helen Koike
2020-05-20 0:13 ` Laurent Pinchart [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=20200520001356.GL3820@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=ezequiel@collabora.com \
--cc=helen.koike@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).