lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511102026.2kvJOVYL-lkp@intel.com>
Date: Mon, 10 Nov 2025 20:54:19 +0800
From: kernel test robot <lkp@...el.com>
To: oushixiong1025@....com,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	Shixiong Ou <oushixiong@...inos.cn>, Tiger Liu <liuyihu@...inos.cn>
Subject: Re: [PATCH] drm/fb-helper: add fbdev screen expended mode display
 support

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.18-rc5 next-20251110]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/oushixiong1025-163-com/drm-fb-helper-add-fbdev-screen-expended-mode-display-support/20251107-172927
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20251107092641.111431-1-oushixiong1025%40163.com
patch subject: [PATCH] drm/fb-helper: add fbdev screen expended mode display support
config: arm-randconfig-003-20251110 (https://download.01.org/0day-ci/archive/20251110/202511102026.2kvJOVYL-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/202511102026.2kvJOVYL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511102026.2kvJOVYL-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_fb_helper.c:1509:3: warning: variable 'crtc_count' is uninitialized when used here [-Wuninitialized]
                   crtc_count++;
                   ^~~~~~~~~~
   drivers/gpu/drm/drm_fb_helper.c:1506:16: note: initialize the variable 'crtc_count' to silence this warning
           u32 crtc_count;
                         ^
                          = 0
   1 warning generated.


vim +/crtc_count +1509 drivers/gpu/drm/drm_fb_helper.c

  1492	
  1493	/*
  1494	 * Check if the device supports extended mode
  1495	 *
  1496	 * return true if the device supports extended mode,
  1497	 * otherwise return false.
  1498	 */
  1499	static bool drm_fb_helper_validate_extended_mode(struct drm_fb_helper *fb_helper,
  1500							 struct drm_fb_helper_surface_size *sizes)
  1501	{
  1502		struct drm_client_dev *client = &fb_helper->client;
  1503		struct drm_device *dev = fb_helper->dev;
  1504		struct drm_mode_config *config = &dev->mode_config;
  1505		struct drm_mode_set *mode_set;
  1506		u32 crtc_count;
  1507	
  1508		drm_client_for_each_modeset(mode_set, client) {
> 1509			crtc_count++;
  1510	
  1511			for (int j = 0; j < mode_set->num_connectors; j++) {
  1512				struct drm_connector *connector = mode_set->connectors[j];
  1513	
  1514				if (connector->has_tile) {
  1515					drm_dbg_kms(client->dev,
  1516						    "Don't support extended with tile mode connector yet\n");
  1517					return false;
  1518				}
  1519			}
  1520		}
  1521	
  1522		if (crtc_count < 2) {
  1523			drm_dbg_kms(client->dev,
  1524				    "Only support extended mode when device have mult-crtcs\n");
  1525			return false;
  1526		}
  1527	
  1528		if (drm_fbdev_screen_mode == SCREEN_EXPAND_HORIZONTAL) {
  1529			u32 x = 0;
  1530	
  1531			drm_client_for_each_modeset(mode_set, client) {
  1532				struct drm_display_mode *desired_mode;
  1533	
  1534				desired_mode = mode_set->mode;
  1535				x = mode_set->x;
  1536				sizes->fb_width = sizes->surface_width  += desired_mode->hdisplay;
  1537				sizes->surface_height =
  1538					min_t(u32, desired_mode->vdisplay + mode_set->y,
  1539					      sizes->surface_height);
  1540				sizes->fb_height = min_t(u32, desired_mode->vdisplay + mode_set->y,
  1541							 sizes->fb_height);
  1542			}
  1543			sizes->fb_width = sizes->surface_width += x;
  1544	
  1545			if (sizes->fb_width > config->max_width) {
  1546				drm_dbg_kms(client->dev,
  1547					    "screen_buffer total width %d > config width %d\n",
  1548					    sizes->fb_width, config->max_width);
  1549				return false;
  1550			}
  1551		} else if (drm_fbdev_screen_mode == SCREEN_EXPAND_VERTICAL) {
  1552			u32 y = 0;
  1553	
  1554			drm_client_for_each_modeset(mode_set, client) {
  1555				struct drm_display_mode *desired_mode;
  1556	
  1557				desired_mode = mode_set->mode;
  1558				y = mode_set->y;
  1559				sizes->fb_height = sizes->surface_height += desired_mode->vdisplay;
  1560				sizes->surface_width =
  1561					min_t(u32, desired_mode->hdisplay + mode_set->x,
  1562					      sizes->surface_width);
  1563				sizes->fb_width = min_t(u32, desired_mode->hdisplay + mode_set->x,
  1564							sizes->fb_width);
  1565			}
  1566			sizes->fb_height = sizes->surface_height += y;
  1567	
  1568			if (sizes->fb_height > config->max_height) {
  1569				drm_dbg_kms(client->dev,
  1570					    "screen_buffer_total_height %d > config height %d\n",
  1571					    sizes->fb_height, config->max_height);
  1572				return false;
  1573			}
  1574		} else {
  1575			return false;
  1576		}
  1577	
  1578		return true;
  1579	}
  1580	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ