mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Carsten Behling <carsten.behling@googlemail.com>
Cc: kbuild-all@01.org, Carsten Behling <carsten.behling@gmail.com>,
	Rob Clark <robdclark@gmail.com>, David Airlie <airlied@linux.ie>,
	Archit Taneja <architt@codeaurora.org>,
	Sean Paul <seanpaul@chromium.org>,
	Steve Kowalik <steven@wedontsleep.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/display: negative x/y in cursor move
Date: Tue, 17 Jul 2018 06:06:35 +0800	[thread overview]
Message-ID: <201807170504.KBRX6Bew%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180716174957.5977-1-carsten.behling@gmail.com>

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

Hi Carsten,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robclark/msm-next]
[also build test WARNING on v4.18-rc5 next-20180716]
[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/Carsten-Behling/drm-msm-display-negative-x-y-in-cursor-move/20180717-031351
base:   git://people.freedesktop.org/~robclark/linux msm-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm64 

All warnings (new ones prefixed by >>):

   In file included from include/drm/drm_mm.h:49:0,
                    from include/drm/drmP.h:73,
                    from include/drm/drm_modeset_helper.h:26,
                    from include/drm/drm_crtc_helper.h:44,
                    from drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:22:
   drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c: In function 'mdp5_crtc_restore_cursor':
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:6: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=]
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
         ^
   include/drm/drm_print.h:285:25: note: in definition of macro 'DRM_DEBUG_DRIVER'
     drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
                            ^~~
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:2: note: in expansion of macro 'DBG'
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
     ^~~
   drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:8: note: format string is defined here
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
          ~^
          %d
   In file included from include/drm/drm_mm.h:49:0,
                    from include/drm/drmP.h:73,
                    from include/drm/drm_modeset_helper.h:26,
                    from include/drm/drm_crtc_helper.h:44,
                    from drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:22:
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:6: warning: format '%d' expects a matching 'int' argument [-Wformat=]
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
         ^
   include/drm/drm_print.h:285:25: note: in definition of macro 'DRM_DEBUG_DRIVER'
     drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
                            ^~~
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:2: note: in expansion of macro 'DBG'
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
     ^~~
   drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:831:56: note: format string is defined here
     DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
                                                          ~^

vim +831 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c

   789	
   790	static void mdp5_crtc_restore_cursor(struct drm_crtc *crtc)
   791	{
   792		struct mdp5_crtc_state *mdp5_cstate = to_mdp5_crtc_state(crtc->state);
   793		struct mdp5_crtc *mdp5_crtc = to_mdp5_crtc(crtc);
   794		struct mdp5_kms *mdp5_kms = get_kms(crtc);
   795		const enum mdp5_cursor_alpha cur_alpha = CURSOR_ALPHA_PER_PIXEL;
   796		uint32_t blendcfg, stride;
   797		uint32_t x, y, src_x, src_y, width, height;
   798		uint32_t roi_w, roi_h;
   799		int lm;
   800	
   801		assert_spin_locked(&mdp5_crtc->cursor.lock);
   802	
   803		lm = mdp5_cstate->pipeline.mixer->lm;
   804	
   805		x = mdp5_crtc->cursor.x;
   806		y = mdp5_crtc->cursor.y;
   807		width = mdp5_crtc->cursor.width;
   808		height = mdp5_crtc->cursor.height;
   809	
   810		stride = width * drm_format_plane_cpp(DRM_FORMAT_ARGB8888, 0);
   811	
   812		get_roi(crtc, &roi_w, &roi_h);
   813	
   814		/* If cusror buffer overlaps due to rotation on the
   815		 * upper or left screen border the pixel offset inside
   816		 * the cursor buffer of the ROI is the positive overlap
   817		 * distance.
   818		 */
   819		if (mdp5_crtc->cursor.x < 0) {
   820			src_x = abs(mdp5_crtc->cursor.x);
   821			x = 0;
   822		} else {
   823			src_x = 0;
   824		}
   825		if (mdp5_crtc->cursor.y < 0) {
   826			src_y = abs(mdp5_crtc->cursor.y);
   827			y = 0;
   828		} else {
   829			src_y = 0;
   830		}
 > 831		DBG("%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d",
   832			x, y, roi_w, roi_h, src_x, src_y);
   833	
   834		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_STRIDE(lm), stride);
   835		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_FORMAT(lm),
   836				MDP5_LM_CURSOR_FORMAT_FORMAT(CURSOR_FMT_ARGB8888));
   837		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_IMG_SIZE(lm),
   838				MDP5_LM_CURSOR_IMG_SIZE_SRC_H(height) |
   839				MDP5_LM_CURSOR_IMG_SIZE_SRC_W(width));
   840		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_SIZE(lm),
   841				MDP5_LM_CURSOR_SIZE_ROI_H(roi_h) |
   842				MDP5_LM_CURSOR_SIZE_ROI_W(roi_w));
   843		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_START_XY(lm),
   844				MDP5_LM_CURSOR_START_XY_Y_START(y) |
   845				MDP5_LM_CURSOR_START_XY_X_START(x));
   846		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_XY(lm),
   847				MDP5_LM_CURSOR_XY_SRC_Y(src_y) |
   848				MDP5_LM_CURSOR_XY_SRC_X(src_x));
   849		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_BASE_ADDR(lm),
   850				mdp5_crtc->cursor.iova);
   851	
   852		blendcfg = MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN;
   853		blendcfg |= MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL(cur_alpha);
   854		mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_BLEND_CONFIG(lm), blendcfg);
   855	}
   856	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2018-07-16 22:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 17:49 Carsten Behling
2018-07-16 22:06 ` kbuild test robot [this message]
2018-07-16 23:03   ` [PATCH v2] " Carsten Behling
2018-07-24 17:33     ` Archit Taneja
     [not found]       ` <CAPuGWB9oBN4U6OS8FLDQ1m6eO3n4mT-UG3QWHdjuM9XgSLG8iQ@mail.gmail.com>
2018-07-26  7:25         ` Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201807170504.KBRX6Bew%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=carsten.behling@gmail.com \
    --cc=carsten.behling@googlemail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    --cc=steven@wedontsleep.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®