From: kernel test robot <lkp@intel.com>
To: Philipp Zabel <p.zabel@pengutronix.de>, dri-devel@lists.freedesktop.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Thomas Zimmermann <tzimmermann@suse.de>,
kernel@pengutronix.de
Subject: Re: [PATCH 3/4] drm/plane: add drmm_universal_plane_alloc()
Date: Thu, 27 Aug 2020 03:47:13 +0800 [thread overview]
Message-ID: <202008270323.CteGD0Vx%lkp@intel.com> (raw)
In-Reply-To: <20200826123506.19560-3-p.zabel@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 6766 bytes --]
Hi Philipp,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master drm-exynos/exynos-drm-next v5.9-rc2 next-20200826]
[cannot apply to drm/drm-next]
[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/Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a003-20200826 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 7cfcecece0e0430937cf529ce74d3a071a4dedc6)
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
# 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@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/drm_plane.c:156:5: warning: no previous prototype for function '__drm_universal_plane_init' [-Wmissing-prototypes]
int __drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
^
drivers/gpu/drm/drm_plane.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
^
static
1 warning generated.
# https://github.com/0day-ci/linux/commit/d809a51da3d2939a84ecf6b4ada8f5be6c3ecb35
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
git checkout d809a51da3d2939a84ecf6b4ada8f5be6c3ecb35
vim +/__drm_universal_plane_init +156 drivers/gpu/drm/drm_plane.c
155
> 156 int __drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
157 uint32_t possible_crtcs,
158 const struct drm_plane_funcs *funcs,
159 const uint32_t *formats, unsigned int format_count,
160 const uint64_t *format_modifiers,
161 enum drm_plane_type type,
162 const char *name, va_list ap)
163 {
164 struct drm_mode_config *config = &dev->mode_config;
165 unsigned int format_modifier_count = 0;
166 int ret;
167
168 /* plane index is used with 32bit bitmasks */
169 if (WARN_ON(config->num_total_plane >= 32))
170 return -EINVAL;
171
172 WARN_ON(drm_drv_uses_atomic_modeset(dev) &&
173 (!funcs->atomic_destroy_state ||
174 !funcs->atomic_duplicate_state));
175
176 ret = drm_mode_object_add(dev, &plane->base, DRM_MODE_OBJECT_PLANE);
177 if (ret)
178 return ret;
179
180 drm_modeset_lock_init(&plane->mutex);
181
182 plane->base.properties = &plane->properties;
183 plane->dev = dev;
184 plane->funcs = funcs;
185 plane->format_types = kmalloc_array(format_count, sizeof(uint32_t),
186 GFP_KERNEL);
187 if (!plane->format_types) {
188 DRM_DEBUG_KMS("out of memory when allocating plane\n");
189 drm_mode_object_unregister(dev, &plane->base);
190 return -ENOMEM;
191 }
192
193 /*
194 * First driver to need more than 64 formats needs to fix this. Each
195 * format is encoded as a bit and the current code only supports a u64.
196 */
197 if (WARN_ON(format_count > 64))
198 return -EINVAL;
199
200 if (format_modifiers) {
201 const uint64_t *temp_modifiers = format_modifiers;
202
203 while (*temp_modifiers++ != DRM_FORMAT_MOD_INVALID)
204 format_modifier_count++;
205 }
206
207 if (format_modifier_count)
208 config->allow_fb_modifiers = true;
209
210 plane->modifier_count = format_modifier_count;
211 plane->modifiers = kmalloc_array(format_modifier_count,
212 sizeof(format_modifiers[0]),
213 GFP_KERNEL);
214
215 if (format_modifier_count && !plane->modifiers) {
216 DRM_DEBUG_KMS("out of memory when allocating plane\n");
217 kfree(plane->format_types);
218 drm_mode_object_unregister(dev, &plane->base);
219 return -ENOMEM;
220 }
221
222 if (name) {
223 plane->name = kvasprintf(GFP_KERNEL, name, ap);
224 } else {
225 plane->name = kasprintf(GFP_KERNEL, "plane-%d",
226 drm_num_planes(dev));
227 }
228 if (!plane->name) {
229 kfree(plane->format_types);
230 kfree(plane->modifiers);
231 drm_mode_object_unregister(dev, &plane->base);
232 return -ENOMEM;
233 }
234
235 memcpy(plane->format_types, formats, format_count * sizeof(uint32_t));
236 plane->format_count = format_count;
237 memcpy(plane->modifiers, format_modifiers,
238 format_modifier_count * sizeof(format_modifiers[0]));
239 plane->possible_crtcs = possible_crtcs;
240 plane->type = type;
241
242 list_add_tail(&plane->head, &config->plane_list);
243 plane->index = config->num_total_plane++;
244
245 drm_object_attach_property(&plane->base,
246 config->plane_type_property,
247 plane->type);
248
249 if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
250 drm_object_attach_property(&plane->base, config->prop_fb_id, 0);
251 drm_object_attach_property(&plane->base, config->prop_in_fence_fd, -1);
252 drm_object_attach_property(&plane->base, config->prop_crtc_id, 0);
253 drm_object_attach_property(&plane->base, config->prop_crtc_x, 0);
254 drm_object_attach_property(&plane->base, config->prop_crtc_y, 0);
255 drm_object_attach_property(&plane->base, config->prop_crtc_w, 0);
256 drm_object_attach_property(&plane->base, config->prop_crtc_h, 0);
257 drm_object_attach_property(&plane->base, config->prop_src_x, 0);
258 drm_object_attach_property(&plane->base, config->prop_src_y, 0);
259 drm_object_attach_property(&plane->base, config->prop_src_w, 0);
260 drm_object_attach_property(&plane->base, config->prop_src_h, 0);
261 }
262
263 if (config->allow_fb_modifiers)
264 create_in_format_blob(dev, plane);
265
266 return 0;
267 }
268
---
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: 47458 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-08-26 19:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 12:35 [PATCH 1/4] drm: add drmm_encoder_alloc() Philipp Zabel
2020-08-26 12:35 ` [PATCH 2/4] drm/simple_kms_helper: add drmm_simple_encoder_alloc() Philipp Zabel
2020-08-26 12:35 ` [PATCH 3/4] drm/plane: add drmm_universal_plane_alloc() Philipp Zabel
2020-08-26 15:26 ` kernel test robot
2020-08-26 15:26 ` [RFC PATCH] drm/plane: __drm_universal_plane_init() can be static kernel test robot
2020-08-26 16:58 ` [PATCH 3/4] drm/plane: add drmm_universal_plane_alloc() kernel test robot
2020-08-26 19:47 ` kernel test robot [this message]
2020-08-31 9:37 ` Dan Carpenter
2020-08-26 12:35 ` [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes() Philipp Zabel
2020-08-26 18:04 ` kernel test robot
2020-08-26 21:29 ` kernel test robot
2020-08-27 7:32 ` [drm/crtc] 236b7bc44a: BUG:stack_guard_page_was_hit_at(____ptrval____)(stack_is(____ptrval____)..(____ptrval____)) kernel test robot
2020-08-31 9:39 ` [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes() Dan Carpenter
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=202008270323.CteGD0Vx%lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=kernel@pengutronix.de \
--cc=p.zabel@pengutronix.de \
--cc=tzimmermann@suse.de \
/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