linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	linux-media@vger.kernel.org
Cc: kbuild-all@lists.01.org, dafna.hirschfeld@collabora.com,
	helen.koike@collabora.com, 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 5/5] media: staging: rkisp1: replace workqueue with threaded irq for reading statistics registers
Date: Wed, 13 May 2020 00:41:11 +0800	[thread overview]
Message-ID: <202005130014.6crueEVz%lkp@intel.com> (raw)
In-Reply-To: <20200512120522.25960-6-dafna.hirschfeld@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 7822 bytes --]

Hi Dafna,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.7-rc5 next-20200512]
[cannot apply to staging/staging-testing]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Dafna-Hirschfeld/media-staging-rkisp1-change-workqueue-to-threaded-irq-in-stats/20200512-200942
base:   git://linuxtv.org/media_tree.git master
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

In file included from drivers/staging/media/rkisp1/rkisp1-stats.c:14:
drivers/staging/media/rkisp1/rkisp1-common.h:309:1: error: unknown type name 'irqreturn_t'
309 | irqreturn_t rkisp1_read_stats_threaded_irq(int irq, void *ctx);
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-common.h:310:1: error: unknown type name 'irqreturn_t'
310 | irqreturn_t rkisp1_isp_isr(struct rkisp1_device *rkisp1);
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-common.h:311:1: error: unknown type name 'irqreturn_t'
311 | irqreturn_t rkisp1_mipi_isr(struct rkisp1_device *rkisp1);
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-common.h:312:1: error: unknown type name 'irqreturn_t'
312 | irqreturn_t rkisp1_capture_isr(struct rkisp1_device *rkisp1);
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-common.h:313:1: error: unknown type name 'irqreturn_t'
313 | irqreturn_t rkisp1_stats_isr(struct rkisp1_stats *stats, u32 isp_ris);
| ^~~~~~~~~~~
>> drivers/staging/media/rkisp1/rkisp1-stats.c:313:1: error: unknown type name 'irqreturn_t'
313 | irqreturn_t rkisp1_read_stats_threaded_irq(int irq, void *ctx)
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-stats.c: In function 'rkisp1_read_stats_threaded_irq':
>> drivers/staging/media/rkisp1/rkisp1-stats.c:326:10: error: 'IRQ_HANDLED' undeclared (first use in this function)
326 |   return IRQ_HANDLED;
|          ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-stats.c:326:10: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/media/rkisp1/rkisp1-stats.c: At top level:
drivers/staging/media/rkisp1/rkisp1-stats.c:382:1: error: unknown type name 'irqreturn_t'
382 | irqreturn_t rkisp1_stats_isr(struct rkisp1_stats *stats, u32 isp_ris)
| ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-stats.c: In function 'rkisp1_stats_isr':
drivers/staging/media/rkisp1/rkisp1-stats.c:387:2: error: unknown type name 'irqreturn_t'
387 |  irqreturn_t ret = IRQ_HANDLED;
|  ^~~~~~~~~~~
drivers/staging/media/rkisp1/rkisp1-stats.c:387:20: error: 'IRQ_HANDLED' undeclared (first use in this function)
387 |  irqreturn_t ret = IRQ_HANDLED;
|                    ^~~~~~~~~~~
>> drivers/staging/media/rkisp1/rkisp1-stats.c:409:10: error: 'IRQ_WAKE_THREAD' undeclared (first use in this function); did you mean 'RUSAGE_THREAD'?
409 |    ret = IRQ_WAKE_THREAD;
|          ^~~~~~~~~~~~~~~
|          RUSAGE_THREAD
drivers/staging/media/rkisp1/rkisp1-stats.c: In function 'rkisp1_read_stats_threaded_irq':
>> drivers/staging/media/rkisp1/rkisp1-stats.c:379:1: warning: control reaches end of non-void function [-Wreturn-type]
379 | }
| ^

vim +/irqreturn_t +313 drivers/staging/media/rkisp1/rkisp1-stats.c

   312	
 > 313	irqreturn_t rkisp1_read_stats_threaded_irq(int irq, void *ctx)
   314	{
   315		struct device *dev = ctx;
   316		struct rkisp1_device *rkisp1 = dev_get_drvdata(dev);
   317		struct rkisp1_stats *stats = &rkisp1->stats;
   318		struct rkisp1_kstats_buffer *kstats_buf = NULL;
   319		struct rkisp1_stat_buffer *cur_stat_buf;
   320		unsigned long flags;
   321		u64 timestamp = ktime_get_ns();
   322	
   323		spin_lock_irqsave(&stats->stats_lock, flags);
   324		if (!stats->is_streaming) {
   325			spin_unlock_irqrestore(&stats->stats_lock, flags);
 > 326			return IRQ_HANDLED;
   327		}
   328		if (list_empty(&stats->stat)) {
   329			spin_unlock_irqrestore(&stats->stats_lock, flags);
   330			WARN("%s: threaded irq waked but there are no buffers",
   331			     __func__);
   332			return IRQ_HANDLED;
   333		}
   334		kstats_buf = list_first_entry(&stats->stat,
   335					      struct rkisp1_kstats_buffer, buff.queue);
   336	
   337		/*
   338		 * each waked irq thread reads exactly one ready statistics
   339		 * so it is a bug  if no statistics are ready
   340		 */
   341		if (!kstats_buf->ris) {
   342			spin_unlock_irqrestore(&stats->stats_lock, flags);
   343			WARN("%s: threaded irq waked but buffer holds no measures",
   344			     __func__);
   345			return IRQ_HANDLED;
   346		}
   347		list_del(&kstats_buf->buff.queue);
   348		spin_unlock_irqrestore(&stats->stats_lock, flags);
   349	
   350		cur_stat_buf =
   351			(struct rkisp1_stat_buffer *)(kstats_buf->buff.vaddr[0]);
   352	
   353		if (kstats_buf->ris & RKISP1_CIF_ISP_AWB_DONE) {
   354			rkisp1_stats_get_awb_meas(stats, cur_stat_buf);
   355			cur_stat_buf->meas_type |= RKISP1_CIF_ISP_STAT_AWB;
   356		}
   357	
   358		if (kstats_buf->ris & RKISP1_CIF_ISP_AFM_FIN) {
   359			rkisp1_stats_get_afc_meas(stats, cur_stat_buf);
   360			cur_stat_buf->meas_type |= RKISP1_CIF_ISP_STAT_AFM_FIN;
   361		}
   362	
   363		if (kstats_buf->ris & RKISP1_CIF_ISP_EXP_END) {
   364			rkisp1_stats_get_aec_meas(stats, cur_stat_buf);
   365			rkisp1_stats_get_bls_meas(stats, cur_stat_buf);
   366			cur_stat_buf->meas_type |= RKISP1_CIF_ISP_STAT_AUTOEXP;
   367		}
   368	
   369		if (kstats_buf->ris & RKISP1_CIF_ISP_HIST_MEASURE_RDY) {
   370			rkisp1_stats_get_hst_meas(stats, cur_stat_buf);
   371			cur_stat_buf->meas_type |= RKISP1_CIF_ISP_STAT_HIST;
   372		}
   373	
   374		vb2_set_plane_payload(&kstats_buf->buff.vb.vb2_buf, 0,
   375				      sizeof(struct rkisp1_stat_buffer));
   376		kstats_buf->buff.vb.vb2_buf.timestamp = timestamp;
   377		vb2_buffer_done(&kstats_buf->buff.vb.vb2_buf, VB2_BUF_STATE_DONE);
   378		return IRQ_HANDLED;
 > 379	}
   380	
   381	
   382	irqreturn_t rkisp1_stats_isr(struct rkisp1_stats *stats, u32 isp_ris)
   383	{
   384		struct rkisp1_device *rkisp1 = stats->rkisp1;
   385		struct rkisp1_isp *isp = &rkisp1->isp;
   386		struct rkisp1_kstats_buffer *buf = NULL;
 > 387		irqreturn_t ret = IRQ_HANDLED;
   388		unsigned int isp_mis_tmp = 0;
   389		unsigned long flags;
   390		u32 val;
   391	
   392		spin_lock_irqsave(&stats->stats_lock, flags);
   393	
   394		val = RKISP1_STATS_MEAS_MASK;
   395		rkisp1_write(rkisp1, val, RKISP1_CIF_ISP_ICR);
   396	
   397		isp_mis_tmp = rkisp1_read(rkisp1, RKISP1_CIF_ISP_MIS);
   398		if (isp_mis_tmp & RKISP1_STATS_MEAS_MASK)
   399			rkisp1->debug.stats_error++;
   400	
   401		if (!stats->is_streaming || !(isp_ris & RKISP1_STATS_MEAS_MASK))
   402			goto unlock;
   403	
   404		list_for_each_entry(buf, &stats->stat, buff.queue) {
   405			if (!buf->ris) {
   406				buf->buff.vb.sequence =
   407					atomic_read(&isp->frame_sequence);
   408				buf->ris = isp_ris;
 > 409				ret = IRQ_WAKE_THREAD;
   410				break;
   411			}
   412		}
   413	
   414	unlock:
   415		spin_unlock_irqrestore(&stats->stats_lock, flags);
   416		return ret;
   417	}
   418	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 55567 bytes --]

  reply	other threads:[~2020-05-12 16:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 12:05 [PATCH 0/5] media: staging: rkisp1: change workqueue to threaded irq in stats Dafna Hirschfeld
2020-05-12 12:05 ` [PATCH 1/5] media: staging: rkisp1: return IRQ_NONE in isr when irq isn't for ISP Dafna Hirschfeld
2020-05-12 15:42   ` kbuild test robot
2020-05-20 10:58   ` Helen Koike
2020-05-20 20:58     ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 2/5] media: staging: rkisp1: use a macro for the statistics flags mask Dafna Hirschfeld
2020-05-20 11:03   ` Helen Koike
2020-05-20 23:27   ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 3/5] media: staging: rkisp1: stats: use spin_lock_irqsave for irq_lock Dafna Hirschfeld
2020-05-20 11:11   ` Helen Koike
2020-05-20 19:22     ` Dafna Hirschfeld
2020-05-20 23:40       ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 4/5] media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lock Dafna Hirschfeld
2020-05-20 23:48   ` Laurent Pinchart
2020-05-12 12:05 ` [PATCH 5/5] media: staging: rkisp1: replace workqueue with threaded irq for reading statistics registers Dafna Hirschfeld
2020-05-12 16:41   ` kbuild test robot [this message]
2020-05-21  0:09   ` Laurent Pinchart
2020-05-21 10:38     ` Tomasz Figa
2020-05-28 19:19       ` Dafna Hirschfeld
2020-05-28 19:35         ` Tomasz Figa

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=202005130014.6crueEVz%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=dafna3@gmail.com \
    --cc=ezequiel@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --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).