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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202412241626.qf8hyywO-lkp@intel.com>
Date: Tue, 24 Dec 2024 16:48:39 +0800
From: kernel test robot <lkp@...el.com>
To: Jammy Huang <jammy_huang@...eedtech.com>, tzimmermann@...e.de,
	jfalempe@...hat.com, maarten.lankhorst@...ux.intel.com,
	mripard@...nel.org, airlied@...hat.com, airlied@...il.com,
	daniel@...ll.ch
Cc: oe-kbuild-all@...ts.linux.dev, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/ast: Support timings, 1280x720/1280x960/1600x900

Hi Jammy,

kernel test robot noticed the following build errors:

[auto build test ERROR on 4bbf9020becbfd8fc2c3da790855b7042fad455b]

url:    https://github.com/intel-lab-lkp/linux/commits/Jammy-Huang/drm-ast-Support-timings-1280x720-1280x960-1600x900/20241224-105552
base:   4bbf9020becbfd8fc2c3da790855b7042fad455b
patch link:    https://lore.kernel.org/r/20241224025430.3773224-1-jammy_huang%40aspeedtech.com
patch subject: [PATCH v2] drm/ast: Support timings, 1280x720/1280x960/1600x900
config: x86_64-buildonly-randconfig-002-20241224 (https://download.01.org/0day-ci/archive/20241224/202412241626.qf8hyywO-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241224/202412241626.qf8hyywO-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/202412241626.qf8hyywO-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/ast/ast_mode.c: In function 'ast_get_vbios_mode_info':
>> drivers/gpu/drm/ast/ast_mode.c:150:26: error: 'crtc' undeclared (first use in this function)
     150 |                 else if (crtc->mode.crtc_vdisplay == 720)
         |                          ^~~~
   drivers/gpu/drm/ast/ast_mode.c:150:26: note: each undeclared identifier is reported only once for each function it appears in


vim +/crtc +150 drivers/gpu/drm/ast/ast_mode.c

   108	
   109	static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
   110					    const struct drm_display_mode *mode,
   111					    struct drm_display_mode *adjusted_mode,
   112					    struct ast_vbios_mode_info *vbios_mode)
   113	{
   114		u32 refresh_rate_index = 0, refresh_rate;
   115		const struct ast_vbios_enhtable *best = NULL;
   116		u32 hborder, vborder;
   117		bool check_sync;
   118	
   119		switch (format->cpp[0] * 8) {
   120		case 8:
   121			vbios_mode->std_table = &vbios_stdtable[VGAModeIndex];
   122			break;
   123		case 16:
   124			vbios_mode->std_table = &vbios_stdtable[HiCModeIndex];
   125			break;
   126		case 24:
   127		case 32:
   128			vbios_mode->std_table = &vbios_stdtable[TrueCModeIndex];
   129			break;
   130		default:
   131			return false;
   132		}
   133	
   134		switch (mode->crtc_hdisplay) {
   135		case 640:
   136			vbios_mode->enh_table = &res_640x480[refresh_rate_index];
   137			break;
   138		case 800:
   139			vbios_mode->enh_table = &res_800x600[refresh_rate_index];
   140			break;
   141		case 1024:
   142			vbios_mode->enh_table = &res_1024x768[refresh_rate_index];
   143			break;
   144		case 1152:
   145			vbios_mode->enh_table = &res_1152x864[refresh_rate_index];
   146			break;
   147		case 1280:
   148			if (mode->crtc_vdisplay == 800)
   149				vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
 > 150			else if (crtc->mode.crtc_vdisplay == 720)
   151				vbios_mode->enh_table = &res_1280x720[refresh_rate_index];
   152			else if (crtc->mode.crtc_vdisplay == 960)
   153				vbios_mode->enh_table = &res_1280x960[refresh_rate_index];
   154			else
   155				vbios_mode->enh_table = &res_1280x1024[refresh_rate_index];
   156			break;
   157		case 1360:
   158			vbios_mode->enh_table = &res_1360x768[refresh_rate_index];
   159			break;
   160		case 1440:
   161			vbios_mode->enh_table = &res_1440x900[refresh_rate_index];
   162			break;
   163		case 1600:
   164			if (mode->crtc_vdisplay == 900)
   165				vbios_mode->enh_table = &res_1600x900[refresh_rate_index];
   166			else
   167				vbios_mode->enh_table = &res_1600x1200[refresh_rate_index];
   168			break;
   169		case 1680:
   170			vbios_mode->enh_table = &res_1680x1050[refresh_rate_index];
   171			break;
   172		case 1920:
   173			if (mode->crtc_vdisplay == 1080)
   174				vbios_mode->enh_table = &res_1920x1080[refresh_rate_index];
   175			else
   176				vbios_mode->enh_table = &res_1920x1200[refresh_rate_index];
   177			break;
   178		default:
   179			return false;
   180		}
   181	
   182		refresh_rate = drm_mode_vrefresh(mode);
   183		check_sync = vbios_mode->enh_table->flags & WideScreenMode;
   184	
   185		while (1) {
   186			const struct ast_vbios_enhtable *loop = vbios_mode->enh_table;
   187	
   188			while (loop->refresh_rate != 0xff) {
   189				if ((check_sync) &&
   190				    (((mode->flags & DRM_MODE_FLAG_NVSYNC)  &&
   191				      (loop->flags & PVSync))  ||
   192				     ((mode->flags & DRM_MODE_FLAG_PVSYNC)  &&
   193				      (loop->flags & NVSync))  ||
   194				     ((mode->flags & DRM_MODE_FLAG_NHSYNC)  &&
   195				      (loop->flags & PHSync))  ||
   196				     ((mode->flags & DRM_MODE_FLAG_PHSYNC)  &&
   197				      (loop->flags & NHSync)))) {
   198					loop++;
   199					continue;
   200				}
   201				if (loop->refresh_rate <= refresh_rate
   202				    && (!best || loop->refresh_rate > best->refresh_rate))
   203					best = loop;
   204				loop++;
   205			}
   206			if (best || !check_sync)
   207				break;
   208			check_sync = 0;
   209		}
   210	
   211		if (best)
   212			vbios_mode->enh_table = best;
   213	
   214		hborder = (vbios_mode->enh_table->flags & HBorder) ? 8 : 0;
   215		vborder = (vbios_mode->enh_table->flags & VBorder) ? 8 : 0;
   216	
   217		adjusted_mode->crtc_htotal = vbios_mode->enh_table->ht;
   218		adjusted_mode->crtc_hblank_start = vbios_mode->enh_table->hde + hborder;
   219		adjusted_mode->crtc_hblank_end = vbios_mode->enh_table->ht - hborder;
   220		adjusted_mode->crtc_hsync_start = vbios_mode->enh_table->hde + hborder +
   221			vbios_mode->enh_table->hfp;
   222		adjusted_mode->crtc_hsync_end = (vbios_mode->enh_table->hde + hborder +
   223						 vbios_mode->enh_table->hfp +
   224						 vbios_mode->enh_table->hsync);
   225	
   226		adjusted_mode->crtc_vtotal = vbios_mode->enh_table->vt;
   227		adjusted_mode->crtc_vblank_start = vbios_mode->enh_table->vde + vborder;
   228		adjusted_mode->crtc_vblank_end = vbios_mode->enh_table->vt - vborder;
   229		adjusted_mode->crtc_vsync_start = vbios_mode->enh_table->vde + vborder +
   230			vbios_mode->enh_table->vfp;
   231		adjusted_mode->crtc_vsync_end = (vbios_mode->enh_table->vde + vborder +
   232						 vbios_mode->enh_table->vfp +
   233						 vbios_mode->enh_table->vsync);
   234	
   235		return true;
   236	}
   237	

-- 
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