Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jessica Zhang <jesszhan@codeaurora.org>, freedreno@lists.freedesktop.org
Cc: kbuild-all@lists.01.org, Jessica Zhang <jesszhan@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	robdclark@gmail.com, seanpaul@chromium.org, swboyd@chromium.org,
	nganji@codeaurora.org, aravindh@codeaurora.org,
	khsieh@codeaurora.org
Subject: Re: [PATCH] drm/msm/dpu: Add CRC support for DPU
Date: Tue, 12 Oct 2021 18:43:30 +0800	[thread overview]
Message-ID: <202110121802.HfC1U79s-lkp@intel.com> (raw)
In-Reply-To: <20211011234123.1033-1-jesszhan@codeaurora.org>

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

Hi Jessica,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.15-rc5 next-20211011]
[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/Jessica-Zhang/drm-msm-dpu-Add-CRC-support-for-DPU/20211012-074357
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc
config: arm-qcom_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/5260fd396b774196018bdb110b213ce9abde8853
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jessica-Zhang/drm-msm-dpu-Add-CRC-support-for-DPU/20211012-074357
        git checkout 5260fd396b774196018bdb110b213ce9abde8853
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

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/msm/disp/dpu1/dpu_crtc.c:89:5: warning: no previous prototype for 'dpu_crtc_verify_crc_source' [-Wmissing-prototypes]
      89 | int dpu_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name, size_t *values_cnt)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:105:5: warning: no previous prototype for 'dpu_crtc_set_crc_source' [-Wmissing-prototypes]
     105 | int dpu_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c: In function 'dpu_crtc_get_crc':
   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:204:26: warning: variable 'dpu_crtc' set but not used [-Wunused-but-set-variable]
     204 |         struct dpu_crtc *dpu_crtc;
         |                          ^~~~~~~~


vim +/dpu_crtc_verify_crc_source +89 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

    88	
  > 89	int dpu_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name, size_t *values_cnt)
    90	{
    91		enum dpu_crtc_crc_source source = dpu_crtc_parse_crc_source(src_name);
    92		struct dpu_crtc_state *crtc_state = to_dpu_crtc_state(crtc->state);
    93	
    94		if (source < 0) {
    95			DRM_DEBUG_DRIVER("Invalid source %s for CRTC%d\n", src_name, crtc->index);
    96			return -EINVAL;
    97		}
    98	
    99		if (source == DPU_CRTC_CRC_SOURCE_LAYER_MIXER)
   100			*values_cnt = crtc_state->num_mixers;
   101	
   102		return 0;
   103	}
   104	
 > 105	int dpu_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
   106	{
   107		enum dpu_crtc_crc_source source = dpu_crtc_parse_crc_source(src_name);
   108		enum dpu_crtc_crc_source current_source;
   109		struct drm_crtc_commit *commit;
   110		struct dpu_crtc_state *crtc_state;
   111		struct drm_device *drm_dev = crtc->dev;
   112		struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
   113		struct dpu_crtc_mixer *m;
   114	
   115		bool was_enabled;
   116		bool enable = false;
   117		int i, ret = 0;
   118	
   119		if (source < 0) {
   120			DRM_DEBUG_DRIVER("Invalid CRC source %s for CRTC%d\n", src_name, crtc->index);
   121			return -EINVAL;
   122		}
   123	
   124		ret = drm_modeset_lock(&crtc->mutex, NULL);
   125	
   126		if (ret)
   127			return ret;
   128	
   129		/* Wait for any pending commits to finish */
   130		spin_lock(&crtc->commit_lock);
   131		commit = list_first_entry_or_null(&crtc->commit_list, struct drm_crtc_commit, commit_entry);
   132	
   133		if (commit)
   134			drm_crtc_commit_get(commit);
   135		spin_unlock(&crtc->commit_lock);
   136	
   137		if (commit) {
   138			ret = wait_for_completion_interruptible_timeout(&commit->hw_done, 10 * HZ);
   139	
   140			if (ret)
   141				goto cleanup;
   142		}
   143	
   144		enable = dpu_crtc_is_valid_crc_source(source);
   145		crtc_state = to_dpu_crtc_state(crtc->state);
   146	
   147		spin_lock_irq(&drm_dev->event_lock);
   148		current_source = dpu_crtc->crc_source;
   149		spin_unlock_irq(&drm_dev->event_lock);
   150	
   151		was_enabled = !(current_source == DPU_CRTC_CRC_SOURCE_NONE);
   152	
   153		if (!was_enabled && enable) {
   154			ret = drm_crtc_vblank_get(crtc);
   155	
   156			if (ret)
   157				goto cleanup;
   158	
   159		} else if (was_enabled && !enable) {
   160			drm_crtc_vblank_put(crtc);
   161		}
   162	
   163		spin_lock_irq(&drm_dev->event_lock);
   164		dpu_crtc->crc_source = source;
   165		spin_unlock_irq(&drm_dev->event_lock);
   166	
   167		crtc_state->skip_count = 0;
   168	
   169		for (i = 0; i < crtc_state->num_mixers; ++i) {
   170			m = &crtc_state->mixers[i];
   171	
   172			if (!m->hw_lm || !m->hw_lm->ops.collect_misr || !m->hw_lm->ops.setup_misr)
   173				continue;
   174	
   175			/* Calculate MISR over 1 frame */
   176			m->hw_lm->ops.setup_misr(m->hw_lm, true, 1);
   177		}
   178	
   179	
   180	cleanup:
   181		if (commit)
   182			drm_crtc_commit_put(commit);
   183		drm_modeset_unlock(&crtc->mutex);
   184	
   185		return ret;
   186	}
   187	

---
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: 39887 bytes --]

      parent reply	other threads:[~2021-10-12 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 23:41 [PATCH] drm/msm/dpu: Add CRC support for DPU Jessica Zhang
2021-10-12  2:01 ` Dmitry Baryshkov
2021-10-13 20:21   ` Jessica Zhang
2021-10-12 10:43 ` kernel test robot [this message]

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=202110121802.HfC1U79s-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aravindh@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan@codeaurora.org \
    --cc=kbuild-all@lists.01.org \
    --cc=khsieh@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=nganji@codeaurora.org \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    --cc=swboyd@chromium.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