Re: [PATCH 09/11] drm/i915: migrate skl planes code new file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20201211]
[cannot apply to v5.10-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Dave-Airlie/drm-i915-display-move-needs_modeset-to-an-inline-in-header/20201211-163119
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a003-20201210 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/a5c9dca8844730c679e9716efd016bfe04f9d002
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dave-Airlie/drm-i915-display-move-needs_modeset-to-an-inline-in-header/20201211-163119
        git checkout a5c9dca8844730c679e9716efd016bfe04f9d002
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1396:5: warning: no previous prototype for function 'skl_plane_ctl_crtc' [-Wmissing-prototypes]
   u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
       ^
   drivers/gpu/drm/i915/display/intel_gen9_plane.c:1396:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1416:5: warning: no previous prototype for function 'skl_plane_ctl' [-Wmissing-prototypes]
   u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
       ^
   drivers/gpu/drm/i915/display/intel_gen9_plane.c:1416:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1455:5: warning: no previous prototype for function 'glk_plane_color_ctl_crtc' [-Wmissing-prototypes]
   u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
       ^
   drivers/gpu/drm/i915/display/intel_gen9_plane.c:1455:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_gen9_plane.c:1472:5: warning: no previous prototype for function 'glk_plane_color_ctl' [-Wmissing-prototypes]
   u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
       ^
   drivers/gpu/drm/i915/display/intel_gen9_plane.c:1472:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
   ^
   static 
   4 warnings generated.

vim +/skl_plane_ctl_crtc +1396 drivers/gpu/drm/i915/display/intel_gen9_plane.c

  1395	
> 1396	u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
  1397	{
  1398		struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
  1399		u32 plane_ctl = 0;
  1400	
  1401		if (crtc_state->uapi.async_flip)
  1402			plane_ctl |= PLANE_CTL_ASYNC_FLIP;
  1403	
  1404		if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
  1405			return plane_ctl;
  1406	
  1407		if (crtc_state->gamma_enable)
  1408			plane_ctl |= PLANE_CTL_PIPE_GAMMA_ENABLE;
  1409	
  1410		if (crtc_state->csc_enable)
  1411			plane_ctl |= PLANE_CTL_PIPE_CSC_ENABLE;
  1412	
  1413		return plane_ctl;
  1414	}
  1415	
> 1416	u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
  1417			  const struct intel_plane_state *plane_state)
  1418	{
  1419		struct drm_i915_private *dev_priv =
  1420			to_i915(plane_state->uapi.plane->dev);
  1421		const struct drm_framebuffer *fb = plane_state->hw.fb;
  1422		unsigned int rotation = plane_state->hw.rotation;
  1423		const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
  1424		u32 plane_ctl;
  1425	
  1426		plane_ctl = PLANE_CTL_ENABLE;
  1427	
  1428		if (INTEL_GEN(dev_priv) < 10 && !IS_GEMINILAKE(dev_priv)) {
  1429			plane_ctl |= skl_plane_ctl_alpha(plane_state);
  1430			plane_ctl |= PLANE_CTL_PLANE_GAMMA_DISABLE;
  1431	
  1432			if (plane_state->hw.color_encoding == DRM_COLOR_YCBCR_BT709)
  1433				plane_ctl |= PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709;
  1434	
  1435			if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
  1436				plane_ctl |= PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE;
  1437		}
  1438	
  1439		plane_ctl |= skl_plane_ctl_format(fb->format->format);
  1440		plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
  1441		plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
  1442	
  1443		if (INTEL_GEN(dev_priv) >= 10)
  1444			plane_ctl |= cnl_plane_ctl_flip(rotation &
  1445							DRM_MODE_REFLECT_MASK);
  1446	
  1447		if (key->flags & I915_SET_COLORKEY_DESTINATION)
  1448			plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
  1449		else if (key->flags & I915_SET_COLORKEY_SOURCE)
  1450			plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
  1451	
  1452		return plane_ctl;
  1453	}
  1454	
> 1455	u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
  1456	{
  1457		struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
  1458		u32 plane_color_ctl = 0;
  1459	
  1460		if (INTEL_GEN(dev_priv) >= 11)
  1461			return plane_color_ctl;
  1462	
  1463		if (crtc_state->gamma_enable)
  1464			plane_color_ctl |= PLANE_COLOR_PIPE_GAMMA_ENABLE;
  1465	
  1466		if (crtc_state->csc_enable)
  1467			plane_color_ctl |= PLANE_COLOR_PIPE_CSC_ENABLE;
  1468	
  1469		return plane_color_ctl;
  1470	}
  1471	
> 1472	u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
  1473				const struct intel_plane_state *plane_state)
  1474	{
  1475		struct drm_i915_private *dev_priv =
  1476			to_i915(plane_state->uapi.plane->dev);
  1477		const struct drm_framebuffer *fb = plane_state->hw.fb;
  1478		struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
  1479		u32 plane_color_ctl = 0;
  1480	
  1481		plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
  1482		plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
  1483	
  1484		if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
  1485			switch (plane_state->hw.color_encoding) {
  1486			case DRM_COLOR_YCBCR_BT709:
  1487				plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
  1488				break;
  1489			case DRM_COLOR_YCBCR_BT2020:
  1490				plane_color_ctl |=
  1491					PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;
  1492				break;
  1493			default:
  1494				plane_color_ctl |=
  1495					PLANE_COLOR_CSC_MODE_YUV601_TO_RGB601;
  1496			}
  1497			if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
  1498				plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
  1499		} else if (fb->format->is_yuv) {
  1500			plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
  1501		}
  1502	
  1503		return plane_color_ctl;
  1504	}
  1505	

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux