All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFC 2/2] media: i2c: ds90ub953: Add TPG support
Date: Fri, 10 Jan 2025 18:37:12 +0800	[thread overview]
Message-ID: <202501101823.2pdM9LEe-lkp@intel.com> (raw)
In-Reply-To: <20250109-ub953-tpg-v1-2-d7392375c243@ideasonboard.com>

Hi Tomi,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on 40ed9e9b2808beeb835bd0ed971fb364c285d39c]

url:    https://github.com/intel-lab-lkp/linux/commits/Tomi-Valkeinen/media-mc-Add-INTERNAL-pad-flag/20250109-181850
base:   40ed9e9b2808beeb835bd0ed971fb364c285d39c
patch link:    https://lore.kernel.org/r/20250109-ub953-tpg-v1-2-d7392375c243%40ideasonboard.com
patch subject: [PATCH RFC 2/2] media: i2c: ds90ub953: Add TPG support
config: csky-randconfig-001-20250110 (https://download.01.org/0day-ci/archive/20250110/202501101823.2pdM9LEe-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501101823.2pdM9LEe-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501101823.2pdM9LEe-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/media/i2c/ds90ub953.c: In function 'ub953_enable_tpg':
>> drivers/media/i2c/ds90ub953.c:978:25: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
     978 |                         FIELD_PREP(UB953_IND_PGEN_CFG_NUM_CBARS_MASK, 0) |
         |                         ^~~~~~~~~~


vim +/FIELD_PREP +978 drivers/media/i2c/ds90ub953.c

   896	
   897	static int ub953_enable_tpg(struct ub953_data *priv,
   898				    enum ub953_tpg_pattern pattern)
   899	{
   900		const struct ub953_format_info *fmt_info;
   901		struct device *dev = &priv->client->dev;
   902		struct v4l2_subdev *sd = &priv->sd;
   903		struct v4l2_subdev_state *state;
   904		struct v4l2_mbus_framefmt *fmt;
   905		struct v4l2_fract *ival;
   906		const u8 num_cbars = 8;
   907		const u8 vc = 0; /* Always VC 0 for now */
   908		const u8 vbp = 33;
   909		const u8 vfp = 10;
   910		const u16 tot_blanking = vbp + vfp + 2;
   911		u16 line_size; /* in bytes */
   912		u16 bar_size; /* in bytes */
   913		u16 act_lpf; /* active lines/frame */
   914		u16 tot_lpf; /* tot lines/frame */
   915		u64 line_pd; /* Line period in 10-ns units */
   916	
   917		state = v4l2_subdev_get_locked_active_state(sd);
   918	
   919		fmt = v4l2_subdev_state_get_format(state, UB953_PAD_TPG, 0);
   920		if (!fmt)
   921			return -EINVAL;
   922	
   923		ival = v4l2_subdev_state_get_interval(state, UB953_PAD_TPG, 0);
   924		if (!ival)
   925			return -EINVAL;
   926	
   927		fmt_info = ub953_find_format(fmt->code);
   928		if (!fmt_info) {
   929			dev_err(dev, "unsupported TPG format %#x\n", fmt->code);
   930			return -EINVAL;
   931		}
   932	
   933		line_size = fmt->width * fmt_info->bitspp / 8;
   934		bar_size = rounddown(line_size / num_cbars, fmt_info->block_size);
   935		act_lpf = fmt->height;
   936		tot_lpf = act_lpf + tot_blanking;
   937		line_pd = div_u64((u64)NANO / 10 * ival->numerator,
   938				  ival->denominator * tot_lpf);
   939	
   940		if (line_pd > 0xffff) {
   941			dev_err(dev, "Line period over the limit: %llu\n", line_pd);
   942			return -EINVAL;
   943		}
   944	
   945		if (fmt->width * fmt_info->bitspp % 8 != 0) {
   946			dev_err(dev, "Invalid TPG width\n");
   947			return -EINVAL;
   948		}
   949	
   950		if (line_size % fmt_info->block_size != 0) {
   951			dev_err(dev, "Invalid TPG line size\n");
   952			return -EINVAL;
   953		}
   954	
   955		ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN, UB953_IND_PGEN_CSI_DI,
   956				(vc << 6) | (fmt_info->dt << 0));
   957		ub953_write_ind16(priv, UB953_IND_TARGET_PAT_GEN,
   958				  UB953_IND_PGEN_LINE_SIZE1, line_size);
   959		ub953_write_ind16(priv, UB953_IND_TARGET_PAT_GEN,
   960				  UB953_IND_PGEN_BAR_SIZE1, bar_size);
   961		ub953_write_ind16(priv, UB953_IND_TARGET_PAT_GEN,
   962				  UB953_IND_PGEN_ACT_LPF1, act_lpf);
   963		ub953_write_ind16(priv, UB953_IND_TARGET_PAT_GEN,
   964				  UB953_IND_PGEN_TOT_LPF1, tot_lpf);
   965		ub953_write_ind16(priv, UB953_IND_TARGET_PAT_GEN,
   966				  UB953_IND_PGEN_LINE_PD1, line_pd);
   967		ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN, UB953_IND_PGEN_VBP,
   968				vbp);
   969		ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN, UB953_IND_PGEN_VFP,
   970				vfp);
   971	
   972		for (unsigned int i = 0; i < 3; ++i)
   973			ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN,
   974					UB953_IND_PGEN_COLOR(i), 0x0);
   975	
   976		ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN, UB953_IND_PGEN_CFG,
   977				UB953_IND_PGEN_CFG_FIXED_COLOR_MODE |
 > 978				FIELD_PREP(UB953_IND_PGEN_CFG_NUM_CBARS_MASK, 0) |
   979				FIELD_PREP(UB953_IND_PGEN_CFG_BLOCK_SIZE_MASK,
   980					   fmt_info->block_size));
   981	
   982		switch (pattern) {
   983		case UB953_TPG_RED:
   984			ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN,
   985					UB953_IND_PGEN_COLOR(2), 0xff);
   986			break;
   987		case UB953_TPG_GREEN:
   988			ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN,
   989					UB953_IND_PGEN_COLOR(1), 0xff);
   990			break;
   991		case UB953_TPG_BLUE:
   992			ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN,
   993					UB953_IND_PGEN_COLOR(0), 0xff);
   994			break;
   995		default:
   996			break;
   997		}
   998	
   999		ub953_write_ind(priv, UB953_IND_TARGET_PAT_GEN, UB953_IND_PGEN_CTL,
  1000				UB953_IND_PGEN_CTL_PGEN_ENABLE);
  1001	
  1002		return 0;
  1003	}
  1004	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-01-10 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 10:15 [PATCH RFC 0/2] media: TPG with internal pads Tomi Valkeinen
2025-01-09 10:15 ` [PATCH RFC 1/2] media: mc: Add INTERNAL pad flag Tomi Valkeinen
2025-01-09 10:15 ` [PATCH RFC 2/2] media: i2c: ds90ub953: Add TPG support Tomi Valkeinen
2025-01-10 10:37   ` kernel test robot [this message]
2025-01-10 12:39   ` kernel test robot

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=202501101823.2pdM9LEe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tomi.valkeinen@ideasonboard.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.