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>] [day] [month] [year] [list]
Message-ID: <202211031431.RA4r2fSQ-lkp@intel.com>
Date:   Thu, 3 Nov 2022 14:14:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: drivers/video/fbdev/omap/hwa742.c:791:13: warning: variable 'vdisp'
 set but not used

Hi Arnd,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8e5423e991e8cd0988d0c4a3f4ac4ca1af7d148a
commit: 804f7f19c2e2928aeb8eafef8379fe8b8d13f98b fbdev: omap: avoid using mach/*.h files
date:   7 months ago
config: arm-randconfig-r032-20221103
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=804f7f19c2e2928aeb8eafef8379fe8b8d13f98b
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 804f7f19c2e2928aeb8eafef8379fe8b8d13f98b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/video/fbdev/omap/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/video/fbdev/omap/hwa742.c:492:5: warning: no previous prototype for function 'hwa742_update_window_async' [-Wmissing-prototypes]
   int hwa742_update_window_async(struct fb_info *fbi,
       ^
   drivers/video/fbdev/omap/hwa742.c:492:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int hwa742_update_window_async(struct fb_info *fbi,
   ^
   static 
>> drivers/video/fbdev/omap/hwa742.c:791:13: warning: variable 'vdisp' set but not used [-Wunused-but-set-variable]
           int hdisp, vdisp;
                      ^
>> drivers/video/fbdev/omap/hwa742.c:943:31: warning: variable 'omapfb_conf' set but not used [-Wunused-but-set-variable]
           struct omapfb_platform_data *omapfb_conf;
                                        ^
   3 warnings generated.


vim +/vdisp +791 drivers/video/fbdev/omap/hwa742.c

aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   787  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   788  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   789  static int setup_tearsync(unsigned long pix_clk, int extif_div)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   790  {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  @791  	int hdisp, vdisp;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   792  	int hndp, vndp;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   793  	int hsw, vsw;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   794  	int hs, vs;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   795  	int hs_pol_inv, vs_pol_inv;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   796  	int use_hsvs, use_ndp;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   797  	u8  b;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   798  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   799  	hsw = hwa742_read_reg(HWA742_HS_W_REG);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   800  	vsw = hwa742_read_reg(HWA742_VS_W_REG);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   801  	hs_pol_inv = !(hsw & 0x80);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   802  	vs_pol_inv = !(vsw & 0x80);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   803  	hsw = hsw & 0x7f;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   804  	vsw = vsw & 0x3f;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   805  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   806  	hdisp = (hwa742_read_reg(HWA742_H_DISP_REG) & 0x7f) * 8;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   807  	vdisp = hwa742_read_reg(HWA742_V_DISP_1_REG) +
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   808  		((hwa742_read_reg(HWA742_V_DISP_2_REG) & 0x3) << 8);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   809  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   810  	hndp = hwa742_read_reg(HWA742_H_NDP_REG) & 0x7f;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   811  	vndp = hwa742_read_reg(HWA742_V_NDP_REG);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   812  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   813  	/* time to transfer one pixel (16bpp) in ps */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   814  	hwa742.pix_tx_time = hwa742.reg_timings.we_cycle_time;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   815  	if (hwa742.extif->get_max_tx_rate != NULL) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   816  		/*
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   817  		 * The external interface might have a rate limitation,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   818  		 * if so, we have to maximize our transfer rate.
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   819  		 */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   820  		unsigned long min_tx_time;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   821  		unsigned long max_tx_rate = hwa742.extif->get_max_tx_rate();
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   822  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   823  		dev_dbg(hwa742.fbdev->dev, "max_tx_rate %ld HZ\n",
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   824  			max_tx_rate);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   825  		min_tx_time = 1000000000 / (max_tx_rate / 1000);  /* ps */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   826  		if (hwa742.pix_tx_time < min_tx_time)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   827  			hwa742.pix_tx_time = min_tx_time;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   828  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   829  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   830  	/* time to update one line in ps */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   831  	hwa742.line_upd_time = (hdisp + hndp) * 1000000 / (pix_clk / 1000);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   832  	hwa742.line_upd_time *= 1000;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   833  	if (hdisp * hwa742.pix_tx_time > hwa742.line_upd_time)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   834  		/*
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   835  		 * transfer speed too low, we might have to use both
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   836  		 * HS and VS
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   837  		 */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   838  		use_hsvs = 1;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   839  	else
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   840  		/* decent transfer speed, we'll always use only VS */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   841  		use_hsvs = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   842  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   843  	if (use_hsvs && (hs_pol_inv || vs_pol_inv)) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   844  		/*
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   845  		 * HS or'ed with VS doesn't work, use the active high
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   846  		 * TE signal based on HNDP / VNDP
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   847  		 */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   848  		use_ndp = 1;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   849  		hs_pol_inv = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   850  		vs_pol_inv = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   851  		hs = hndp;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   852  		vs = vndp;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   853  	} else {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   854  		/*
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   855  		 * Use HS or'ed with VS as a TE signal if both are needed
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   856  		 * or VNDP if only vsync is needed.
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   857  		 */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   858  		use_ndp = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   859  		hs = hsw;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   860  		vs = vsw;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   861  		if (!use_hsvs) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   862  			hs_pol_inv = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   863  			vs_pol_inv = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   864  		}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   865  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   866  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   867  	hs = hs * 1000000 / (pix_clk / 1000);			/* ps */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   868  	hs *= 1000;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   869  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   870  	vs = vs * (hdisp + hndp) * 1000000 / (pix_clk / 1000);	/* ps */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   871  	vs *= 1000;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   872  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   873  	if (vs <= hs)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   874  		return -EDOM;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   875  	/* set VS to 120% of HS to minimize VS detection time */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   876  	vs = hs * 12 / 10;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   877  	/* minimize HS too */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   878  	hs = 10000;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   879  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   880  	b = hwa742_read_reg(HWA742_NDP_CTRL);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   881  	b &= ~0x3;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   882  	b |= use_hsvs ? 1 : 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   883  	b |= (use_ndp && use_hsvs) ? 0 : 2;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   884  	hwa742_write_reg(HWA742_NDP_CTRL, b);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   885  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   886  	hwa742.vsync_only = !use_hsvs;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   887  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   888  	dev_dbg(hwa742.fbdev->dev,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   889  		"pix_clk %ld HZ pix_tx_time %ld ps line_upd_time %ld ps\n",
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   890  		pix_clk, hwa742.pix_tx_time, hwa742.line_upd_time);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   891  	dev_dbg(hwa742.fbdev->dev,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   892  		"hs %d ps vs %d ps mode %d vsync_only %d\n",
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   893  		hs, vs, (b & 0x3), !use_hsvs);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   894  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   895  	return hwa742.extif->setup_tearsync(1, hs, vs,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   896  					    hs_pol_inv, vs_pol_inv, extif_div);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   897  }
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   898  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   899  static void hwa742_get_caps(int plane, struct omapfb_caps *caps)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   900  {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   901  	hwa742.int_ctrl->get_caps(plane, caps);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   902  	caps->ctrl |= OMAPFB_CAPS_MANUAL_UPDATE |
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   903  		      OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   904  	if (hwa742.te_connected)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   905  		caps->ctrl |= OMAPFB_CAPS_TEARSYNC;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   906  	caps->wnd_color |= (1 << OMAPFB_COLOR_RGB565) |
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   907  			   (1 << OMAPFB_COLOR_YUV420);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   908  }
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   909  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   910  static void hwa742_suspend(void)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   911  {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   912  	hwa742.update_mode_before_suspend = hwa742.update_mode;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   913  	hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   914  	/* Enable sleep mode */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   915  	hwa742_write_reg(HWA742_POWER_SAVE, 1 << 1);
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   916  	clk_disable(hwa742.sys_ck);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   917  }
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   918  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   919  static void hwa742_resume(void)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   920  {
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   921  	clk_enable(hwa742.sys_ck);
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   922  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   923  	/* Disable sleep mode */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   924  	hwa742_write_reg(HWA742_POWER_SAVE, 0);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   925  	while (1) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   926  		/* Loop until PLL output is stabilized */
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   927  		if (hwa742_read_reg(HWA742_PLL_DIV_REG) & (1 << 7))
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   928  			break;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   929  		set_current_state(TASK_UNINTERRUPTIBLE);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   930  		schedule_timeout(msecs_to_jiffies(5));
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   931  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   932  	hwa742_set_update_mode(hwa742.update_mode_before_suspend);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   933  }
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   934  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   935  static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   936  		       struct omapfb_mem_desc *req_vram)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   937  {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   938  	int r = 0, i;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   939  	u8 rev, conf;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   940  	unsigned long ext_clk;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   941  	unsigned long sys_clk, pix_clk;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   942  	int extif_mem_div;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  @943  	struct omapfb_platform_data *omapfb_conf;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   944  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   945  	BUG_ON(!fbdev->ext_if || !fbdev->int_ctrl);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   946  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   947  	hwa742.fbdev = fbdev;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   948  	hwa742.extif = fbdev->ext_if;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   949  	hwa742.int_ctrl = fbdev->int_ctrl;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   950  
dffb3b47baf472 drivers/video/omap/hwa742.c       Jingoo Han        2013-09-17   951  	omapfb_conf = dev_get_platdata(fbdev->dev);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   952  
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   953  	hwa742.sys_ck = clk_get(NULL, "hwa_sys_ck");
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   954  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   955  	spin_lock_init(&hwa742.req_lock);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   956  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   957  	if ((r = hwa742.int_ctrl->init(fbdev, 1, req_vram)) < 0)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   958  		goto err1;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   959  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   960  	if ((r = hwa742.extif->init(fbdev)) < 0)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   961  		goto err2;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   962  
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   963  	ext_clk = clk_get_rate(hwa742.sys_ck);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   964  	if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   965  		goto err3;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   966  	hwa742.extif->set_timings(&hwa742.reg_timings);
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28   967  	clk_enable(hwa742.sys_ck);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   968  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   969  	calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   970  	if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   971  		goto err4;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   972  	hwa742.extif->set_timings(&hwa742.reg_timings);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   973  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   974  	rev = hwa742_read_reg(HWA742_REV_CODE_REG);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   975  	if ((rev & 0xfc) != 0x80) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   976  		dev_err(fbdev->dev, "HWA742: invalid revision %02x\n", rev);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   977  		r = -ENODEV;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   978  		goto err4;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   979  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   980  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   981  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   982  	if (!(hwa742_read_reg(HWA742_PLL_DIV_REG) & 0x80)) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   983  		dev_err(fbdev->dev,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   984  		      "HWA742: controller not initialized by the bootloader\n");
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   985  		r = -ENODEV;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   986  		goto err4;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   987  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   988  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   989  	if ((r = setup_tearsync(pix_clk, extif_mem_div)) < 0) {
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   990  		dev_err(hwa742.fbdev->dev,
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   991  			"HWA742: can't setup tearing synchronization\n");
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   992  		goto err4;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   993  	}
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   994  	hwa742.te_connected = 1;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   995  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   996  	hwa742.max_transmit_size = hwa742.extif->max_transmit_size;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   997  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   998  	hwa742.update_mode = OMAPFB_UPDATE_DISABLED;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26   999  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1000  	hwa742.auto_update_window.x = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1001  	hwa742.auto_update_window.y = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1002  	hwa742.auto_update_window.width = fbdev->panel->x_res;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1003  	hwa742.auto_update_window.height = fbdev->panel->y_res;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1004  	hwa742.auto_update_window.format = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1005  
6c78935777d12e drivers/video/fbdev/omap/hwa742.c Kees Cook         2017-11-10  1006  	timer_setup(&hwa742.auto_update_timer, hwa742_update_window_auto, 0);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1007  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1008  	hwa742.prev_color_mode = -1;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1009  	hwa742.prev_flags = 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1010  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1011  	hwa742.fbdev = fbdev;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1012  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1013  	INIT_LIST_HEAD(&hwa742.free_req_list);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1014  	INIT_LIST_HEAD(&hwa742.pending_req_list);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1015  	for (i = 0; i < ARRAY_SIZE(hwa742.req_pool); i++)
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1016  		list_add(&hwa742.req_pool[i].entry, &hwa742.free_req_list);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1017  	BUG_ON(i <= IRQ_REQ_POOL_SIZE);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1018  	sema_init(&hwa742.req_sema, i - IRQ_REQ_POOL_SIZE);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1019  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1020  	conf = hwa742_read_reg(HWA742_CONFIG_REG);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1021  	dev_info(fbdev->dev, ": Epson HWA742 LCD controller rev %d "
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1022  			"initialized (CNF pins %x)\n", rev & 0x03, conf & 0x07);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1023  
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1024  	return 0;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1025  err4:
088962c243db42 drivers/video/omap/hwa742.c       Andrew de Quincey 2009-05-28  1026  	clk_disable(hwa742.sys_ck);
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1027  err3:
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1028  	hwa742.extif->cleanup();
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1029  err2:
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1030  	hwa742.int_ctrl->cleanup();
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1031  err1:
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1032  	return r;
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1033  }
aae76ef13e348c drivers/video/omap/hwa742.c       Imre Deak         2007-05-26  1034  

:::::: The code at line 791 was first introduced by commit
:::::: aae76ef13e348cebac225407ea2c452f8d0ff862 OMAP: add external Epson HWA742 LCD controller support

:::::: TO: Imre Deak <imre.deak@...idboot.com>
:::::: CC: Linus Torvalds <torvalds@...dy.linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (145111 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ