linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [nomadik:ux500-skomer-v5.13-rc1 6/7] drivers/gpu/drm/mcde/mcde_display.c:403:23: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first
@ 2021-06-04 16:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-04 16:47 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, clang-built-linux, linux-arm-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-skomer-v5.13-rc1
head:   1d339919c927a2a4959827c8c7656dbe5eee9ed3
commit: d7295e8422c84b108fa5669740a2caac1f71e3d9 [6/7] pointless hack to stabilize?
config: arm64-randconfig-r013-20210604 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5c0d1b2f902aa6a9cf47cc7e42c5b83bb2217cf9)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?id=d7295e8422c84b108fa5669740a2caac1f71e3d9
        git remote add nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
        git fetch --no-tags nomadik ux500-skomer-v5.13-rc1
        git checkout d7295e8422c84b108fa5669740a2caac1f71e3d9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/mcde/mcde_display.c:403:23: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
           val = mode->hdisplay - 1 << MCDE_OVLXCONF_PPL_SHIFT;
                 ~~~~~~~~~~~~~~~^~~ ~~
   drivers/gpu/drm/mcde/mcde_display.c:403:23: note: place parentheses around the '-' expression to silence this warning
           val = mode->hdisplay - 1 << MCDE_OVLXCONF_PPL_SHIFT;
                                ^
                 (                 )
   drivers/gpu/drm/mcde/mcde_display.c:404:24: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
           val |= mode->vdisplay - 1 << MCDE_OVLXCONF_LPF_SHIFT;
                  ~~~~~~~~~~~~~~~^~~ ~~
   drivers/gpu/drm/mcde/mcde_display.c:404:24: note: place parentheses around the '-' expression to silence this warning
           val |= mode->vdisplay - 1 << MCDE_OVLXCONF_LPF_SHIFT;
                                 ^
                  (                 )
   2 warnings generated.


vim +403 drivers/gpu/drm/mcde/mcde_display.c

   336	
   337	static void mcde_configure_overlay(struct mcde *mcde, enum mcde_overlay ovl,
   338					   enum mcde_extsrc src,
   339					   enum mcde_channel ch,
   340					   const struct drm_display_mode *mode,
   341					   u32 format, int cpp)
   342	{
   343		u32 val;
   344		u32 conf1;
   345		u32 conf2;
   346		u32 crop;
   347		u32 ljinc;
   348		u32 cr;
   349		u32 comp;
   350		u32 pixel_fetcher_watermark;
   351	
   352		switch (ovl) {
   353		case MCDE_OVERLAY_0:
   354			conf1 = MCDE_OVL0CONF;
   355			conf2 = MCDE_OVL0CONF2;
   356			crop = MCDE_OVL0CROP;
   357			ljinc = MCDE_OVL0LJINC;
   358			cr = MCDE_OVL0CR;
   359			comp = MCDE_OVL0COMP;
   360			break;
   361		case MCDE_OVERLAY_1:
   362			conf1 = MCDE_OVL1CONF;
   363			conf2 = MCDE_OVL1CONF2;
   364			crop = MCDE_OVL1CROP;
   365			ljinc = MCDE_OVL1LJINC;
   366			cr = MCDE_OVL1CR;
   367			comp = MCDE_OVL1COMP;
   368			break;
   369		case MCDE_OVERLAY_2:
   370			conf1 = MCDE_OVL2CONF;
   371			conf2 = MCDE_OVL2CONF2;
   372			crop = MCDE_OVL2CROP;
   373			ljinc = MCDE_OVL2LJINC;
   374			cr = MCDE_OVL2CR;
   375			comp = MCDE_OVL2COMP;
   376			break;
   377		case MCDE_OVERLAY_3:
   378			conf1 = MCDE_OVL3CONF;
   379			conf2 = MCDE_OVL3CONF2;
   380			crop = MCDE_OVL3CROP;
   381			ljinc = MCDE_OVL3LJINC;
   382			cr = MCDE_OVL3CR;
   383			comp = MCDE_OVL3COMP;
   384			break;
   385		case MCDE_OVERLAY_4:
   386			conf1 = MCDE_OVL4CONF;
   387			conf2 = MCDE_OVL4CONF2;
   388			crop = MCDE_OVL4CROP;
   389			ljinc = MCDE_OVL4LJINC;
   390			cr = MCDE_OVL4CR;
   391			comp = MCDE_OVL4COMP;
   392			break;
   393		case MCDE_OVERLAY_5:
   394			conf1 = MCDE_OVL5CONF;
   395			conf2 = MCDE_OVL5CONF2;
   396			crop = MCDE_OVL5CROP;
   397			ljinc = MCDE_OVL5LJINC;
   398			cr = MCDE_OVL5CR;
   399			comp = MCDE_OVL5COMP;
   400			break;
   401		}
   402	
 > 403		val = mode->hdisplay - 1 << MCDE_OVLXCONF_PPL_SHIFT;
   404		val |= mode->vdisplay - 1 << MCDE_OVLXCONF_LPF_SHIFT;
   405		/* Use external source 0 that we just configured */
   406		val |= src << MCDE_OVLXCONF_EXTSRC_ID_SHIFT;
   407		writel(val, mcde->regs + conf1);
   408	
   409		val = MCDE_OVLXCONF2_BP_PER_PIXEL_ALPHA;
   410		val |= 0xff << MCDE_OVLXCONF2_ALPHAVALUE_SHIFT;
   411		/* OPQ: overlay is opaque */
   412		switch (format) {
   413		case DRM_FORMAT_ARGB8888:
   414		case DRM_FORMAT_ABGR8888:
   415		case DRM_FORMAT_ARGB4444:
   416		case DRM_FORMAT_ABGR4444:
   417		case DRM_FORMAT_XRGB1555:
   418		case DRM_FORMAT_XBGR1555:
   419			/* No OPQ */
   420			break;
   421		case DRM_FORMAT_XRGB8888:
   422		case DRM_FORMAT_XBGR8888:
   423		case DRM_FORMAT_RGB888:
   424		case DRM_FORMAT_BGR888:
   425		case DRM_FORMAT_RGB565:
   426		case DRM_FORMAT_BGR565:
   427		case DRM_FORMAT_YUV422:
   428			val |= MCDE_OVLXCONF2_OPQ;
   429			break;
   430		default:
   431			dev_err(mcde->dev, "Unknown pixel format 0x%08x\n",
   432				format);
   433			break;
   434		}
   435	
   436		/*
   437		 * Pixel fetch watermark level is max 0x1FFF pixels.
   438		 * Two basic rules should be followed:
   439		 * 1. The value should be at least 256 bits.
   440		 * 2. The sum of all active overlays pixelfetch watermark level
   441		 *    multiplied with bits per pixel, should be lower than the
   442		 *    size of input_fifo_size in bits.
   443		 * 3. The value should be a multiple of a line (256 bits).
   444		 */
   445		switch (cpp) {
   446		case 2:
   447			pixel_fetcher_watermark = 128;
   448			break;
   449		case 3:
   450			pixel_fetcher_watermark = 96;
   451			break;
   452		case 4:
   453			pixel_fetcher_watermark = 48;
   454			break;
   455		default:
   456			pixel_fetcher_watermark = 48;
   457			break;
   458		}
   459		dev_dbg(mcde->dev, "pixel fetcher watermark level %d pixels\n",
   460			pixel_fetcher_watermark);
   461		val |= pixel_fetcher_watermark << MCDE_OVLXCONF2_PIXELFETCHERWATERMARKLEVEL_SHIFT;
   462		writel(val, mcde->regs + conf2);
   463	
   464		/* Number of bytes to fetch per line */
   465		writel(mcde->stride, mcde->regs + ljinc);
   466		/* No cropping */
   467		writel(0, mcde->regs + crop);
   468	
   469		/* Set up overlay control register */
   470		val = MCDE_OVLXCR_OVLEN;
   471		val |= MCDE_OVLXCR_COLCCTRL_DISABLED;
   472		val |= MCDE_OVLXCR_BURSTSIZE_8W <<
   473			MCDE_OVLXCR_BURSTSIZE_SHIFT;
   474		val |= MCDE_OVLXCR_MAXOUTSTANDING_8_REQ <<
   475			MCDE_OVLXCR_MAXOUTSTANDING_SHIFT;
   476		/* Not using rotation but set it up anyways */
   477		val |= MCDE_OVLXCR_ROTBURSTSIZE_8W <<
   478			MCDE_OVLXCR_ROTBURSTSIZE_SHIFT;
   479		writel(val, mcde->regs + cr);
   480	
   481		/*
   482		 * Set up the overlay compositor to route the overlay out to
   483		 * the desired channel
   484		 */
   485		val = ch << MCDE_OVLXCOMP_CH_ID_SHIFT;
   486		writel(val, mcde->regs + comp);
   487	}
   488	

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

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

only message in thread, other threads:[~2021-06-04 16:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 16:47 [nomadik:ux500-skomer-v5.13-rc1 6/7] drivers/gpu/drm/mcde/mcde_display.c:403:23: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).