[PATCH] drm/msm/dpu: Add CRC support for DPU
kernel test robot
lkp at intel.com
Tue Oct 12 10:43:30 UTC 2021
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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 39887 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20211012/4f61a3f3/attachment-0001.gz>
More information about the dri-devel
mailing list