Re: [PATCH v2] drm: refuse ADDFB2 ioctl for broken bigendian drivers

From: kbuild test robot
Date: Mon Sep 10 2018 - 04:32:40 EST


Hi Gerd,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.19-rc2 next-20180906]
[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/Gerd-Hoffmann/drm-refuse-ADDFB2-ioctl-for-broken-bigendian-drivers/20180910-142802
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=xtensa

All errors (new ones prefixed by >>):

drivers/gpu//drm/drm_framebuffer.c: In function 'drm_mode_addfb2_ioctl':
>> drivers/gpu//drm/drm_framebuffer.c:359:23: error: 'struct drm_mode_config' has no member named 'quirk_addfb_prefer_host_byte_order'
if (!dev->mode_config.quirk_addfb_prefer_host_byte_order) {
^

vim +359 drivers/gpu//drm/drm_framebuffer.c

354
355 int drm_mode_addfb2_ioctl(struct drm_device *dev,
356 void *data, struct drm_file *file_priv)
357 {
358 #ifdef __BIG_ENDIAN
> 359 if (!dev->mode_config.quirk_addfb_prefer_host_byte_order) {
360 /*
361 * Drivers must set the
362 * quirk_addfb_prefer_host_byte_order quirk to make
363 * the drm_mode_addfb() compat code work correctly on
364 * bigendian machines.
365 *
366 * If they don't they interpret pixel_format values
367 * incorrectly for bug compatibility, which in turn
368 * implies the ADDFB2 ioctl does not work correctly
369 * then. So block it to make userspace fallback to
370 * ADDFB.
371 */
372 DRM_DEBUG_KMS("addfb2 broken on bigendian");
373 return -EINVAL;
374 }
375 #endif
376 return drm_mode_addfb2(dev, data, file_priv);
377 }
378

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

Attachment: .config.gz
Description: application/gzip