All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-rt-devel:linux-5.9.y-rt-rebase 163/203] drivers/gpu/drm/i915/display/intel_sprite.c:121:9: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2020-08-24 19:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-24 19:24 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.9.y-rt-rebase
head:   e7b17bd805747460961fa525247289b894f57004
commit: 09c4d8d773da234141d7cffceb90760b34e95d0e [163/203] drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end()
config: x86_64-randconfig-s021-20200824 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 09c4d8d773da234141d7cffceb90760b34e95d0e
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/display/intel_sprite.c:121:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct local_lock_t * @@
>> drivers/gpu/drm/i915/display/intel_sprite.c:121:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
>> drivers/gpu/drm/i915/display/intel_sprite.c:121:9: sparse:     got struct local_lock_t *
   drivers/gpu/drm/i915/display/intel_sprite.c:146:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct local_lock_t * @@
   drivers/gpu/drm/i915/display/intel_sprite.c:146:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/gpu/drm/i915/display/intel_sprite.c:146:17: sparse:     got struct local_lock_t *
   drivers/gpu/drm/i915/display/intel_sprite.c:150:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct local_lock_t * @@
   drivers/gpu/drm/i915/display/intel_sprite.c:150:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/gpu/drm/i915/display/intel_sprite.c:150:17: sparse:     got struct local_lock_t *
   drivers/gpu/drm/i915/display/intel_sprite.c:183:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct local_lock_t * @@
   drivers/gpu/drm/i915/display/intel_sprite.c:183:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/gpu/drm/i915/display/intel_sprite.c:183:9: sparse:     got struct local_lock_t *
   drivers/gpu/drm/i915/display/intel_sprite.c:221:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct local_lock_t * @@
   drivers/gpu/drm/i915/display/intel_sprite.c:221:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/gpu/drm/i915/display/intel_sprite.c:221:9: sparse:     got struct local_lock_t *

# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=09c4d8d773da234141d7cffceb90760b34e95d0e
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.9.y-rt-rebase
git checkout 09c4d8d773da234141d7cffceb90760b34e95d0e
vim +121 drivers/gpu/drm/i915/display/intel_sprite.c

    70	
    71	/**
    72	 * intel_pipe_update_start() - start update of a set of display registers
    73	 * @new_crtc_state: the new crtc state
    74	 *
    75	 * Mark the start of an update to pipe registers that should be updated
    76	 * atomically regarding vblank. If the next vblank will happens within
    77	 * the next 100 us, this function waits until the vblank passes.
    78	 *
    79	 * After a successful call to this function, interrupts will be disabled
    80	 * until a subsequent call to intel_pipe_update_end(). That is done to
    81	 * avoid random delays.
    82	 */
    83	void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
    84	{
    85		struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
    86		struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
    87		const struct drm_display_mode *adjusted_mode = &new_crtc_state->hw.adjusted_mode;
    88		long timeout = msecs_to_jiffies_timeout(1);
    89		int scanline, min, max, vblank_start;
    90		wait_queue_head_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
    91		bool need_vlv_dsi_wa = (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
    92			intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
    93		DEFINE_WAIT(wait);
    94		u32 psr_status;
    95	
    96		vblank_start = adjusted_mode->crtc_vblank_start;
    97		if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
    98			vblank_start = DIV_ROUND_UP(vblank_start, 2);
    99	
   100		/* FIXME needs to be calibrated sensibly */
   101		min = vblank_start - intel_usecs_to_scanlines(adjusted_mode,
   102							      VBLANK_EVASION_TIME_US);
   103		max = vblank_start - 1;
   104	
   105		if (min <= 0 || max <= 0)
   106			goto irq_disable;
   107	
   108		if (drm_WARN_ON(&dev_priv->drm, drm_crtc_vblank_get(&crtc->base)))
   109			goto irq_disable;
   110	
   111		/*
   112		 * Wait for psr to idle out after enabling the VBL interrupts
   113		 * VBL interrupts will start the PSR exit and prevent a PSR
   114		 * re-entry as well.
   115		 */
   116		if (intel_psr_wait_for_idle(new_crtc_state, &psr_status))
   117			drm_err(&dev_priv->drm,
   118				"PSR idle timed out 0x%x, atomic update may fail\n",
   119				psr_status);
   120	
 > 121		local_lock_irq(&crtc->pipe_update_lock);
   122	
   123		crtc->debug.min_vbl = min;
   124		crtc->debug.max_vbl = max;
   125		trace_intel_pipe_update_start(crtc);
   126	
   127		for (;;) {
   128			/*
   129			 * prepare_to_wait() has a memory barrier, which guarantees
   130			 * other CPUs can see the task state update by the time we
   131			 * read the scanline.
   132			 */
   133			prepare_to_wait(wq, &wait, TASK_UNINTERRUPTIBLE);
   134	
   135			scanline = intel_get_crtc_scanline(crtc);
   136			if (scanline < min || scanline > max)
   137				break;
   138	
   139			if (!timeout) {
   140				drm_err(&dev_priv->drm,
   141					"Potential atomic update failure on pipe %c\n",
   142					pipe_name(crtc->pipe));
   143				break;
   144			}
   145	
   146			local_unlock_irq(&crtc->pipe_update_lock);
   147	
   148			timeout = schedule_timeout(timeout);
   149	
   150			local_lock_irq(&crtc->pipe_update_lock);
   151		}
   152	
   153		finish_wait(wq, &wait);
   154	
   155		drm_crtc_vblank_put(&crtc->base);
   156	
   157		/*
   158		 * On VLV/CHV DSI the scanline counter would appear to
   159		 * increment approx. 1/3 of a scanline before start of vblank.
   160		 * The registers still get latched at start of vblank however.
   161		 * This means we must not write any registers on the first
   162		 * line of vblank (since not the whole line is actually in
   163		 * vblank). And unfortunately we can't use the interrupt to
   164		 * wait here since it will fire too soon. We could use the
   165		 * frame start interrupt instead since it will fire after the
   166		 * critical scanline, but that would require more changes
   167		 * in the interrupt code. So for now we'll just do the nasty
   168		 * thing and poll for the bad scanline to pass us by.
   169		 *
   170		 * FIXME figure out if BXT+ DSI suffers from this as well
   171		 */
   172		while (need_vlv_dsi_wa && scanline == vblank_start)
   173			scanline = intel_get_crtc_scanline(crtc);
   174	
   175		crtc->debug.scanline_start = scanline;
   176		crtc->debug.start_vbl_time = ktime_get();
   177		crtc->debug.start_vbl_count = intel_crtc_get_vblank_counter(crtc);
   178	
   179		trace_intel_pipe_update_vblank_evaded(crtc);
   180		return;
   181	
   182	irq_disable:
   183		local_lock_irq(&crtc->pipe_update_lock);
   184	}
   185	

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-24 19:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 19:24 [linux-rt-devel:linux-5.9.y-rt-rebase 163/203] drivers/gpu/drm/i915/display/intel_sprite.c:121:9: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot

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.