From: kernel test robot <lkp@intel.com>
To: "Sebastian Krzyszkowiak" <sebastian.krzyszkowiak@puri.sm>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Guido Günther" <agx@sigxcpu.org>,
"Robert Chiras" <robert.chiras@nxp.com>,
"Fabio Estevam" <festevam@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, kernel@puri.sm,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Oliver F. Brown" <oliver.brown@oss.nxp.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Subject: Re: [PATCH] drm/bridge: nwl-dsi: Correct MIPI DSI horizontal sync timing
Date: Tue, 17 Feb 2026 13:13:31 +0800 [thread overview]
Message-ID: <202602171326.PoWR3Iye-lkp@intel.com> (raw)
In-Reply-To: <20260216-nwl-sync-timing-v1-1-b0ff6ecf204a@puri.sm>
Hi Sebastian,
kernel test robot noticed the following build errors:
[auto build test ERROR on 0f2acd3148e0ef42bdacbd477f90e8533f96b2ac]
url: https://github.com/intel-lab-lkp/linux/commits/Sebastian-Krzyszkowiak/drm-bridge-nwl-dsi-Correct-MIPI-DSI-horizontal-sync-timing/20260217-015316
base: 0f2acd3148e0ef42bdacbd477f90e8533f96b2ac
patch link: https://lore.kernel.org/r/20260216-nwl-sync-timing-v1-1-b0ff6ecf204a%40puri.sm
patch subject: [PATCH] drm/bridge: nwl-dsi: Correct MIPI DSI horizontal sync timing
config: i386-randconfig-006-20260217 (https://download.01.org/0day-ci/archive/20260217/202602171326.PoWR3Iye-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260217/202602171326.PoWR3Iye-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/202602171326.PoWR3Iye-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: drivers/gpu/drm/bridge/nwl-dsi.o: in function `nwl_dsi_config_dpi':
>> drivers/gpu/drm/bridge/nwl-dsi.c:338:(.text+0x1dcb): undefined reference to `__udivdi3'
>> ld: drivers/gpu/drm/bridge/nwl-dsi.c:339:(.text+0x1e2e): undefined reference to `__udivdi3'
ld: drivers/gpu/drm/bridge/nwl-dsi.c:340:(.text+0x1e8f): undefined reference to `__udivdi3'
vim +338 drivers/gpu/drm/bridge/nwl-dsi.c
255
256 static int nwl_dsi_config_dpi(struct nwl_dsi *dsi)
257 {
258 u32 mode;
259 int color_format;
260 bool burst_mode;
261 int hfront_porch, hback_porch, vfront_porch, vback_porch;
262 int hsync_len, vsync_len;
263 int hfp, hbp, hsa;
264 unsigned long long pclk_period;
265 unsigned long long hs_period;
266 int h_blank, pkt_hdr_len, pkt_len;
267
268 hfront_porch = dsi->mode.hsync_start - dsi->mode.hdisplay;
269 hsync_len = dsi->mode.hsync_end - dsi->mode.hsync_start;
270 hback_porch = dsi->mode.htotal - dsi->mode.hsync_end;
271
272 vfront_porch = dsi->mode.vsync_start - dsi->mode.vdisplay;
273 vsync_len = dsi->mode.vsync_end - dsi->mode.vsync_start;
274 vback_porch = dsi->mode.vtotal - dsi->mode.vsync_end;
275
276 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hfront_porch = %d\n", hfront_porch);
277 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hback_porch = %d\n", hback_porch);
278 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hsync_len = %d\n", hsync_len);
279 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hdisplay = %d\n", dsi->mode.hdisplay);
280 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vfront_porch = %d\n", vfront_porch);
281 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vback_porch = %d\n", vback_porch);
282 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vsync_len = %d\n", vsync_len);
283 DRM_DEV_DEBUG_DRIVER(dsi->dev, "vactive = %d\n", dsi->mode.vdisplay);
284 DRM_DEV_DEBUG_DRIVER(dsi->dev, "clock = %d kHz\n", dsi->mode.clock);
285
286 color_format = nwl_dsi_get_dpi_pixel_format(dsi->format);
287 if (color_format < 0) {
288 DRM_DEV_ERROR(dsi->dev, "Invalid color format 0x%x\n",
289 dsi->format);
290 return color_format;
291 }
292 DRM_DEV_DEBUG_DRIVER(dsi->dev, "pixel fmt = %d\n", dsi->format);
293
294 nwl_dsi_write(dsi, NWL_DSI_INTERFACE_COLOR_CODING, NWL_DSI_DPI_24_BIT);
295 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FORMAT, color_format);
296 nwl_dsi_write(dsi, NWL_DSI_VSYNC_POLARITY,
297 dsi->mode.flags & DRM_MODE_FLAG_PVSYNC ?
298 NWL_DSI_VSYNC_POLARITY_ACTIVE_HIGH :
299 NWL_DSI_VSYNC_POLARITY_ACTIVE_LOW);
300 nwl_dsi_write(dsi, NWL_DSI_HSYNC_POLARITY,
301 dsi->mode.flags & DRM_MODE_FLAG_PHSYNC ?
302 NWL_DSI_HSYNC_POLARITY_ACTIVE_HIGH :
303 NWL_DSI_HSYNC_POLARITY_ACTIVE_LOW);
304
305 burst_mode = (dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_BURST) &&
306 !(dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE);
307
308 if (burst_mode) {
309 nwl_dsi_write(dsi, NWL_DSI_VIDEO_MODE, NWL_DSI_VM_BURST_MODE);
310 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FIFO_SEND_LEVEL, 256);
311 } else {
312 mode = ((dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) ?
313 NWL_DSI_VM_BURST_MODE_WITH_SYNC_PULSES :
314 NWL_DSI_VM_NON_BURST_MODE_WITH_SYNC_EVENTS);
315 nwl_dsi_write(dsi, NWL_DSI_VIDEO_MODE, mode);
316 nwl_dsi_write(dsi, NWL_DSI_PIXEL_FIFO_SEND_LEVEL,
317 dsi->mode.hdisplay);
318 }
319
320 pclk_period = ALIGN(PSEC_PER_SEC, dsi->mode.clock * 1000);
321 do_div(pclk_period, dsi->mode.clock * 1000);
322 DRM_DEV_DEBUG_DRIVER(dsi->dev, "pclk_period: %llu\n", pclk_period);
323
324 hs_period = ALIGN(PSEC_PER_SEC, dsi->phy_cfg.mipi_dphy.hs_clk_rate);
325 do_div(hs_period, dsi->phy_cfg.mipi_dphy.hs_clk_rate);
326 DRM_DEV_DEBUG_DRIVER(dsi->dev, "hs_period: %llu\n", hs_period);
327
328 /*
329 * Calculate the bytes needed, according to the RM formula:
330 * Time of DPI event = time to transmit x number of bytes on the DSI
331 * interface
332 * dpi_event_size * dpi_pclk_period = dsi_bytes * 8 * hs_bit_period /
333 * num_lanes
334 * ===>
335 * dsi_bytes = dpi_event_size * dpi_pclk_period * num_lanes /
336 * (8 * hs_bit_period)
337 */
> 338 hfp = hfront_porch * pclk_period * dsi->lanes / (8 * hs_period);
> 339 hbp = hback_porch * pclk_period * dsi->lanes / (8 * hs_period);
340 hsa = hsync_len * pclk_period * dsi->lanes / (8 * hs_period);
341
342 /* Make sure horizontal blankins are even numbers */
343 hfp = roundup(hfp, 2);
344 hbp = roundup(hbp, 2);
345 hsa = roundup(hsa, 2);
346
347 /*
348 * We need to subtract the packet header length: 32
349 * In order to make sure we don't get negative values,
350 * subtract a proportional value to the total length of the
351 * horizontal blanking duration.
352 */
353 h_blank = hfp + hbp + hsa;
354
355 pkt_len = roundup(((hfp * 100 / h_blank) * 32) / 100, 2);
356 pkt_hdr_len = pkt_len;
357 hfp -= pkt_len;
358
359 pkt_len = roundup(((hbp * 100 / h_blank) * 32) / 100, 2);
360 pkt_hdr_len += pkt_len;
361 hbp -= pkt_len;
362
363 hsa -= (32 - pkt_hdr_len);
364
365 if (dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP)
366 hfp = hfront_porch;
367 if (dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP)
368 hbp = hback_porch;
369 if (dsi->dsi_mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA)
370 hsa = hsync_len;
371
372 DRM_DEV_DEBUG_DRIVER(dsi->dev, "Actual hfp: %d\n", hfp);
373 DRM_DEV_DEBUG_DRIVER(dsi->dev, "Actual hbp: %d\n", hbp);
374 DRM_DEV_DEBUG_DRIVER(dsi->dev, "Actual hsa: %d\n", hsa);
375
376 nwl_dsi_write(dsi, NWL_DSI_HFP, hfp);
377 nwl_dsi_write(dsi, NWL_DSI_HBP, hbp);
378 nwl_dsi_write(dsi, NWL_DSI_HSA, hsa);
379
380 nwl_dsi_write(dsi, NWL_DSI_ENABLE_MULT_PKTS, 0x0);
381 nwl_dsi_write(dsi, NWL_DSI_BLLP_MODE, 0x1);
382 nwl_dsi_write(dsi, NWL_DSI_USE_NULL_PKT_BLLP, 0x0);
383 nwl_dsi_write(dsi, NWL_DSI_VC, 0x0);
384
385 nwl_dsi_write(dsi, NWL_DSI_PIXEL_PAYLOAD_SIZE, dsi->mode.hdisplay);
386 nwl_dsi_write(dsi, NWL_DSI_VACTIVE, dsi->mode.vdisplay - 1);
387 nwl_dsi_write(dsi, NWL_DSI_VBP, vback_porch);
388 nwl_dsi_write(dsi, NWL_DSI_VFP, vfront_porch);
389
390 return nwl_dsi_clear_error(dsi);
391 }
392
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-02-17 5:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 17:45 [PATCH] drm/bridge: nwl-dsi: Correct MIPI DSI horizontal sync timing Sebastian Krzyszkowiak
2026-02-17 5:13 ` kernel test robot [this message]
2026-02-17 8:47 ` 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=202602171326.PoWR3Iye-lkp@intel.com \
--to=lkp@intel.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@puri.sm \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oliver.brown@oss.nxp.com \
--cc=rfoss@kernel.org \
--cc=robert.chiras@nxp.com \
--cc=sam@ravnborg.org \
--cc=sebastian.krzyszkowiak@puri.sm \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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.