[Intel-gfx] [PATCH v8 6/7] drm/i915: Adjust CDCLK accordingly to our DBuf bw needs

kbuild test robot lkp at intel.com
Thu May 14 18:26:53 UTC 2020


Hi Stanislav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20200514]
[cannot apply to drm-tip/drm-tip v5.7-rc5]
[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/Stanislav-Lisovskiy/Consider-DBuf-bandwidth-when-calculating-CDCLK/20200514-232752
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

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

drivers/gpu/drm/i915/display/intel_display.c: In function 'intel_atomic_check_planes':
>> drivers/gpu/drm/i915/display/intel_display.c:14695:2: error: 'new_cdclk_state' undeclared (first use in this function); did you mean 'intel_cdclk_state'?
new_cdclk_state = intel_atomic_get_new_cdclk_state(state);
^~~~~~~~~~~~~~~
intel_cdclk_state
drivers/gpu/drm/i915/display/intel_display.c:14695:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/i915/display/intel_display.c:14698:4: error: 'need_cdclk_calc' undeclared (first use in this function); did you mean 'intel_cdclk_vals'?
*need_cdclk_calc = true;
^~~~~~~~~~~~~~~
intel_cdclk_vals
In file included from include/linux/list.h:9:0,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/i2c.h:13,
from drivers/gpu/drm/i915/display/intel_display.c:27:
include/linux/kernel.h:866:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__safe_cmp(x, y),      ^
include/linux/kernel.h:882:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_display.c:14711:15: note: in expansion of macro 'max'
min_cdclk = max(new_cdclk_state->min_cdclk[crtc->pipe], min_cdclk);
^~~
drivers/gpu/drm/i915/display/intel_display.c: In function 'intel_atomic_check_cdclk':
drivers/gpu/drm/i915/display/intel_display.c:14736:21: warning: unused variable 'crtc' [-Wunused-variable]
struct intel_crtc *crtc;
^~~~
drivers/gpu/drm/i915/display/intel_display.c:14735:27: warning: unused variable 'new_crtc_state' [-Wunused-variable]
struct intel_crtc_state *new_crtc_state;
^~~~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_display.c:14734:28: warning: unused variable 'new_cdclk_state' [-Wunused-variable]
struct intel_cdclk_state *new_cdclk_state;
^~~~~~~~~~~~~~~

vim +14695 drivers/gpu/drm/i915/display/intel_display.c

 14638	
 14639	static int intel_atomic_check_planes(struct intel_atomic_state *state)
 14640	{
 14641		struct drm_i915_private *dev_priv = to_i915(state->base.dev);
 14642		struct intel_crtc_state *old_crtc_state, *new_crtc_state;
 14643		struct intel_plane_state *plane_state;
 14644		struct intel_plane *plane;
 14645		struct intel_crtc *crtc;
 14646		int i, ret;
 14647	
 14648		ret = icl_add_linked_planes(state);
 14649		if (ret)
 14650			return ret;
 14651	
 14652		for_each_new_intel_plane_in_state(state, plane, plane_state, i) {
 14653			ret = intel_plane_atomic_check(state, plane);
 14654			if (ret) {
 14655				drm_dbg_atomic(&dev_priv->drm,
 14656					       "[PLANE:%d:%s] atomic driver check failed\n",
 14657					       plane->base.base.id, plane->base.name);
 14658				return ret;
 14659			}
 14660		}
 14661	
 14662		for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
 14663						    new_crtc_state, i) {
 14664			u8 old_active_planes, new_active_planes;
 14665	
 14666			ret = icl_check_nv12_planes(new_crtc_state);
 14667			if (ret)
 14668				return ret;
 14669	
 14670			/*
 14671			 * On some platforms the number of active planes affects
 14672			 * the planes' minimum cdclk calculation. Add such planes
 14673			 * to the state before we compute the minimum cdclk.
 14674			 */
 14675			if (!active_planes_affects_min_cdclk(dev_priv))
 14676				continue;
 14677	
 14678			old_active_planes = old_crtc_state->active_planes & ~BIT(PLANE_CURSOR);
 14679			new_active_planes = new_crtc_state->active_planes & ~BIT(PLANE_CURSOR);
 14680	
 14681			/*
 14682			 * Not only the number of planes, but if the plane configuration had
 14683			 * changed might already mean we need to recompute min CDCLK,
 14684			 * because different planes might consume different amount of Dbuf bandwidth
 14685			 * according to formula: Bw per plane = Pixel rate * bpp * pipe/plane scale factor
 14686			 */
 14687			if (old_active_planes == new_active_planes)
 14688				continue;
 14689	
 14690			ret = intel_crtc_add_planes_to_state(state, crtc, new_active_planes);
 14691			if (ret)
 14692				return ret;
 14693		}
 14694	
 14695		new_cdclk_state = intel_atomic_get_new_cdclk_state(state);
 14696	
 14697		if (new_cdclk_state && new_cdclk_state->force_min_cdclk_changed)
 14698			*need_cdclk_calc = true;
 14699	
 14700		ret = intel_bw_calc_min_cdclk(state);
 14701		if (ret)
 14702			return ret;
 14703	
 14704		if (!new_cdclk_state)
 14705			return 0;
 14706	
 14707		for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
 14708			struct intel_bw_state *bw_state;
 14709			int min_cdclk = 0;
 14710	
 14711			min_cdclk = max(new_cdclk_state->min_cdclk[crtc->pipe], min_cdclk);
 14712	
 14713			bw_state = intel_atomic_get_bw_state(state);
 14714			if (IS_ERR(bw_state))
 14715				return PTR_ERR(bw_state);
 14716	
 14717			/*
 14718			 * Currently do this change only if we need to increase
 14719			 */
 14720			if (bw_state->min_cdclk > min_cdclk)
 14721				*need_cdclk_calc = true;
 14722		}
 14723	
 14724		return 0;
 14725	}
 14726	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 73362 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20200515/f4e6f562/attachment-0001.gz>


More information about the Intel-gfx mailing list