[Intel-gfx] [PATCH] drm/i915: Unset legacy_cursor_update early in intel_atomic_commit, v2.

kbuild test robot lkp at intel.com
Mon Sep 18 16:19:02 UTC 2017


Hi Maarten,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.14-rc1 next-20170915]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Maarten-Lankhorst/drm-i915-Unset-legacy_cursor_update-early-in-intel_atomic_commit-v2/20170918-223150
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x003-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_display.c: In function 'intel_atomic_commit':
>> drivers/gpu/drm/i915/intel_display.c:12608:3: error: implicit declaration of function 'for_each_new_intel_crtc_in_state' [-Werror=implicit-function-declaration]
      for_each_new_intel_crtc_in_state(intel_state, crtc, new_crtc_state, i)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/intel_display.c:12609:4: error: expected ';' before 'if'
       if (new_crtc_state->wm.need_postvbl_update ||
       ^~
   cc1: some warnings being treated as errors

vim +/for_each_new_intel_crtc_in_state +12608 drivers/gpu/drm/i915/intel_display.c

 12561	
 12562	/**
 12563	 * intel_atomic_commit - commit validated state object
 12564	 * @dev: DRM device
 12565	 * @state: the top-level driver state object
 12566	 * @nonblock: nonblocking commit
 12567	 *
 12568	 * This function commits a top-level state object that has been validated
 12569	 * with drm_atomic_helper_check().
 12570	 *
 12571	 * RETURNS
 12572	 * Zero for success or -errno.
 12573	 */
 12574	static int intel_atomic_commit(struct drm_device *dev,
 12575				       struct drm_atomic_state *state,
 12576				       bool nonblock)
 12577	{
 12578		struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
 12579		struct drm_i915_private *dev_priv = to_i915(dev);
 12580		int ret = 0;
 12581	
 12582		drm_atomic_state_get(state);
 12583		i915_sw_fence_init(&intel_state->commit_ready,
 12584				   intel_atomic_commit_ready);
 12585	
 12586		/*
 12587		 * The intel_legacy_cursor_update() fast path takes care
 12588		 * of avoiding the vblank waits for simple cursor
 12589		 * movement and flips. For cursor on/off and size changes,
 12590		 * we want to perform the vblank waits so that watermark
 12591		 * updates happen during the correct frames. Gen9+ have
 12592		 * double buffered watermarks and so shouldn't need this.
 12593		 *
 12594		 * Unset state->legacy_cursor_update before the call to
 12595		 * drm_atomic_helper_setup_commit() because otherwise
 12596		 * drm_atomic_helper_wait_for_flip_done() is a noop and
 12597		 * we get FIFO underruns because we didn't wait
 12598		 * for vblank.
 12599		 *
 12600		 * FIXME doing watermarks and fb cleanup from a vblank worker
 12601		 * (assuming we had any) would solve these problems.
 12602		 */
 12603		if (INTEL_GEN(dev_priv) < 9 && state->legacy_cursor_update) {
 12604			struct intel_crtc_state *new_crtc_state;
 12605			struct intel_crtc *crtc;
 12606			int i;
 12607	
 12608			for_each_new_intel_crtc_in_state(intel_state, crtc, new_crtc_state, i)
 12609				if (new_crtc_state->wm.need_postvbl_update ||
 12610				    new_crtc_state->update_wm_post)
 12611					state->legacy_cursor_update = false;
 12612		}
 12613	
 12614		ret = intel_atomic_prepare_commit(dev, state);
 12615		if (ret) {
 12616			DRM_DEBUG_ATOMIC("Preparing state failed with %i\n", ret);
 12617			i915_sw_fence_commit(&intel_state->commit_ready);
 12618			return ret;
 12619		}
 12620	
 12621		ret = drm_atomic_helper_setup_commit(state, nonblock);
 12622		if (!ret)
 12623			ret = drm_atomic_helper_swap_state(state, true);
 12624	
 12625		if (ret) {
 12626			i915_sw_fence_commit(&intel_state->commit_ready);
 12627	
 12628			drm_atomic_helper_cleanup_planes(dev, state);
 12629			return ret;
 12630		}
 12631		dev_priv->wm.distrust_bios_wm = false;
 12632		intel_shared_dpll_swap_state(state);
 12633		intel_atomic_track_fbs(state);
 12634	
 12635		if (intel_state->modeset) {
 12636			memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
 12637			       sizeof(intel_state->min_pixclk));
 12638			dev_priv->active_crtcs = intel_state->active_crtcs;
 12639			dev_priv->cdclk.logical = intel_state->cdclk.logical;
 12640			dev_priv->cdclk.actual = intel_state->cdclk.actual;
 12641		}
 12642	
 12643		drm_atomic_state_get(state);
 12644		INIT_WORK(&state->commit_work, intel_atomic_commit_work);
 12645	
 12646		i915_sw_fence_commit(&intel_state->commit_ready);
 12647		if (nonblock)
 12648			queue_work(system_unbound_wq, &state->commit_work);
 12649		else
 12650			intel_atomic_commit_tail(state);
 12651	
 12652	
 12653		return 0;
 12654	}
 12655	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29253 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20170919/77e4e80d/attachment-0001.gz>


More information about the Intel-gfx mailing list