* [PATCH v1 0/28] drivers/video: W=1 warning fixes @ 2020-11-27 19:57 Sam Ravnborg 2020-11-27 19:58 ` [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base Sam Ravnborg 0 siblings, 1 reply; 2+ messages in thread From: Sam Ravnborg @ 2020-11-27 19:57 UTC (permalink / raw) To: linux-fbdev, dri-devel, Lee Jones Cc: Aditya Pakki, Alexander Klimov, Alex Dewar, Antonino Daplas, Arnd Bergmann, Bartlomiej Zolnierkiewicz, Benjamin Herrenschmidt, Daniel Vetter, Evgeny Novikov, Ferenc Bakonyi, Florian Tobias Schandinat, George Kennedy, Greg Kroah-Hartman, Gustavo Silva, Jani Nikula, Jason Yan, Jingoo Han, Jiri Slaby, Joe Perches, Kristoffer Ericson, Laurent Pinchart, linux-nvidia, Michal Januszewski, Mike Rapoport, Nathan Chancellor, Peilin Ye, Peter Rosin, Qilong Zhang, Randy Dunlap, Saeed Mirzamohammadi, Sam Ravnborg, Tetsuo Handa, Thomas Winischhofer, Thomas Zimemrmann, Vaibhav Gupta, Xiaofei Tan Following the great work of Lee Jones in other subsystems here is a set of patches that address all remaining W=1 warnings in drivers/video/. Lee Jones already fixed all warnings in video/backlight/ so this is mostly fbdev related fixes. The general approach used were: - Fix kernel-doc, this is often very trivial - Drop unused local variables - Use no_printk for local logging support Build tested on a set of architectures with various configs. The patches do not depends on each other and in most cases all fixes for one driver is kept in a single patch. The individual changes are trivial so this is a great starter task to try to review these patches. A timely Reviewed-by: or Acked-by: would be very nice so we can get the warnings fixes before we cut for the merge window. Sam Sam Ravnborg (28): video: Fix W=1 warnings in of_videomode + of_display_timing video: fbcon: Use pr_debug() in fbcon video: fbdev: core: Fix W=1 warnings in fbmon + fb_notify video: fbdev: aty: Delete unused variable in radeon_monitor video: fbdev: aty: Fix W=1 warnings in atyfb_base video: fbdev: aty: Fix W=1 warnings in mach64_ct video: fbdev: sis: Fix W=1 warnings about static symbols video: fbdev: sis: Fix W=1 warning about SiS_TVDelay video: fbdev: sis: Fix W=1 warnings in init.c video: fbdev: sis: Fix W=1 warnings in sis_main video: fbdev: via: Fix W=1 warnings video: fbdev: tdfx: Fix W=1 warnings video: fbdev: riva: Fix W=1 warnings video: fbdev: pm2fb: Fix W=1 warnings video: fbdev: neofb: Fix W=1 warnings video: fbdev: hgafb: Fix W=1 warnings video: fbdev: tgafb: Fix W=1 warnings video: fbdev: mx3fb: Fix W=1 warnings video: fbdev: sstfb: Fix W=1 warnings video: fbdev: nvidia: Fix W=1 warnings video: fbdev: tmiofb: Fix W=1 warnings video: fbdev: omapfb: Fix W=1 warnings in dsi video: fbdev: omapfb: Fix W=1 warnings in hdmi*_core video: fbdev: s3c-fb: Fix W=1 warnings video: fbdev: uvesafb: Fix W=1 warning video: fbdev: uvesafb: Fix W=1 string related warnings video: fbdev: cirrusfb: Fix W=1 warnings video: fbdev: s1d13xxxfb: Fix W=1 warnings drivers/video/fbdev/aty/atyfb_base.c | 12 ++------ drivers/video/fbdev/aty/mach64_ct.c | 15 ++++++---- drivers/video/fbdev/aty/radeon_monitor.c | 4 +-- drivers/video/fbdev/cirrusfb.c | 20 ++++++------- drivers/video/fbdev/core/fb_notify.c | 3 +- drivers/video/fbdev/core/fbcon.c | 20 ++++--------- drivers/video/fbdev/core/fbmon.c | 2 +- drivers/video/fbdev/hgafb.c | 4 +-- drivers/video/fbdev/mx3fb.c | 13 +++++---- drivers/video/fbdev/neofb.c | 4 --- drivers/video/fbdev/nvidia/nv_setup.c | 7 ++--- drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 12 ++------ drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 4 +-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 +-- drivers/video/fbdev/pm2fb.c | 8 +++--- drivers/video/fbdev/riva/fbdev.c | 9 +++--- drivers/video/fbdev/riva/riva_hw.c | 28 ++++++------------- drivers/video/fbdev/s1d13xxxfb.c | 3 +- drivers/video/fbdev/s3c-fb.c | 11 ++++---- drivers/video/fbdev/sis/init.c | 34 ++++------------------- drivers/video/fbdev/sis/oem310.h | 2 ++ drivers/video/fbdev/sis/sis.h | 1 - drivers/video/fbdev/sis/sis_main.c | 9 +++--- drivers/video/fbdev/sstfb.c | 2 +- drivers/video/fbdev/tdfxfb.c | 4 +-- drivers/video/fbdev/tgafb.c | 7 ++--- drivers/video/fbdev/tmiofb.c | 6 ++-- drivers/video/fbdev/uvesafb.c | 8 +++--- drivers/video/fbdev/via/lcd.c | 4 +-- drivers/video/of_display_timing.c | 1 + drivers/video/of_videomode.c | 8 +++--- include/video/sstfb.h | 4 +-- 32 files changed, 104 insertions(+), 169 deletions(-) ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base 2020-11-27 19:57 [PATCH v1 0/28] drivers/video: W=1 warning fixes Sam Ravnborg @ 2020-11-27 19:58 ` Sam Ravnborg 2020-11-27 23:29 ` kernel test robot 0 siblings, 1 reply; 2+ messages in thread From: Sam Ravnborg @ 2020-11-27 19:58 UTC (permalink / raw) To: linux-fbdev, dri-devel, Lee Jones Cc: Aditya Pakki, Alexander Klimov, Alex Dewar, Antonino Daplas, Arnd Bergmann, Bartlomiej Zolnierkiewicz, Benjamin Herrenschmidt, Daniel Vetter, Evgeny Novikov, Ferenc Bakonyi, Florian Tobias Schandinat, George Kennedy, Greg Kroah-Hartman, Gustavo Silva, Jani Nikula, Jason Yan, Jingoo Han, Jiri Slaby, Joe Perches, Kristoffer Ericson, Laurent Pinchart, linux-nvidia, Michal Januszewski, Mike Rapoport, Nathan Chancellor, Peilin Ye, Peter Rosin, Qilong Zhang, Randy Dunlap, Saeed Mirzamohammadi, Sam Ravnborg, Tetsuo Handa, Thomas Winischhofer, Thomas Zimemrmann, Vaibhav Gupta, Xiaofei Tan Fix W=1 warnings about variables assigned but never used. - Drop variables that was never used - Avoid using a local variable by moving the expression to an if condition Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Joe Perches <joe@perches.com> Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com> Cc: Jason Yan <yanaijie@huawei.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Jani Nikula <jani.nikula@intel.com> --- drivers/video/fbdev/aty/atyfb_base.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index c8feff0ee8da..d1eb9218debb 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -2360,22 +2360,20 @@ static int aty_init(struct fb_info *info) #ifdef CONFIG_FB_ATY_GX if (!M64_HAS(INTEGRATED)) { u32 stat0; - u8 dac_type, dac_subtype, clk_type; + u8 dac_subtype, clk_type; stat0 = aty_ld_le32(CNFG_STAT0, par); par->bus_type = (stat0 >> 0) & 0x07; par->ram_type = (stat0 >> 3) & 0x07; ramname = aty_gx_ram[par->ram_type]; /* FIXME: clockchip/RAMDAC probing? */ - dac_type = (aty_ld_le32(DAC_CNTL, par) >> 16) & 0x07; + aty_ld_le32(DAC_CNTL, par); #ifdef CONFIG_ATARI clk_type = CLK_ATI18818_1; - dac_type = (stat0 >> 9) & 0x07; - if (dac_type == 0x07) + if (((stat0 >> 9) & 0x07) == 0x07) dac_subtype = DAC_ATT20C408; else dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type; #else - dac_type = DAC_IBMRGB514; dac_subtype = DAC_IBMRGB514; clk_type = CLK_IBMRGB514; #endif @@ -3062,7 +3060,6 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info, if (dp == of_console_device) { struct fb_var_screeninfo *var = &default_var; unsigned int N, P, Q, M, T, R; - u32 v_total, h_total; struct crtc crtc; u8 pll_regs[16]; u8 clock_cntl; @@ -3078,9 +3075,6 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info, crtc.gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par); aty_crtc_to_var(&crtc, var); - h_total = var->xres + var->right_margin + var->hsync_len + var->left_margin; - v_total = var->yres + var->lower_margin + var->vsync_len + var->upper_margin; - /* * Read the PLL to figure actual Refresh Rate. */ -- 2.27.0 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base 2020-11-27 19:58 ` [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base Sam Ravnborg @ 2020-11-27 23:29 ` kernel test robot 0 siblings, 0 replies; 2+ messages in thread From: kernel test robot @ 2020-11-27 23:29 UTC (permalink / raw) To: Sam Ravnborg, linux-fbdev, dri-devel, Lee Jones Cc: kbuild-all, Vaibhav Gupta, Tetsuo Handa, Peter Rosin, Michal Januszewski, Laurent Pinchart, linux-nvidia, Jiri Slaby [-- Attachment #1: Type: text/plain, Size: 16375 bytes --] Hi Sam, I love your patch! Yet something to improve: [auto build test ERROR on next-20201127] [also build test ERROR on v5.10-rc5] [cannot apply to tegra-drm/drm/tegra/for-next soc/for-next linus/master drm/drm-next v5.10-rc5 v5.10-rc4 v5.10-rc3] [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/Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201128-040131 base: 6174f05255e65622ff3340257879a4c0f858b0df config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 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 # https://github.com/0day-ci/linux/commit/5a1d55cc719a775ae6c8e96aab317cff47068071 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201128-040131 git checkout 5a1d55cc719a775ae6c8e96aab317cff47068071 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from include/linux/timex.h:61, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/compat.h:10, from drivers/video/fbdev/aty/atyfb_base.c:51: include/linux/scatterlist.h: In function 'sg_set_buf': arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra] 174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON' 137 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~ include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid' 137 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~~~~~~~~~~ drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_init': >> drivers/video/fbdev/aty/atyfb_base.c:2375:61: error: 'dac_type' undeclared (first use in this function) 2375 | dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type; | ^~~~~~~~ drivers/video/fbdev/aty/atyfb_base.c:2375:61: note: each undeclared identifier is reported only once for each function it appears in vim +/dac_type +2375 drivers/video/fbdev/aty/atyfb_base.c 1013d26663199f8 drivers/video/aty/atyfb_base.c Antonino A. Daplas 2005-11-07 2348 48c68c4f1b54244 drivers/video/aty/atyfb_base.c Greg Kroah-Hartman 2012-12-21 2349 static int aty_init(struct fb_info *info) ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2350 { ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2351 struct atyfb_par *par = (struct atyfb_par *) info->par; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2352 const char *ramname = NULL, *xtal; 1013d26663199f8 drivers/video/aty/atyfb_base.c Antonino A. Daplas 2005-11-07 2353 int gtb_memsize, has_var = 0; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2354 struct fb_var_screeninfo var; 89c69d2b8eb3ee2 drivers/video/aty/atyfb_base.c Ville Syrjala 2008-07-23 2355 int ret; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2356 ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2357 init_waitqueue_head(&par->vblank.wait); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2358 spin_lock_init(&par->int_lock); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2359 ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2360 #ifdef CONFIG_FB_ATY_GX ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2361 if (!M64_HAS(INTEGRATED)) { ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2362 u32 stat0; 5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg 2020-11-27 2363 u8 dac_subtype, clk_type; fe86175bce50bc3 drivers/video/aty/atyfb_base.c Randy Dunlap 2009-02-04 2364 stat0 = aty_ld_le32(CNFG_STAT0, par); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2365 par->bus_type = (stat0 >> 0) & 0x07; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2366 par->ram_type = (stat0 >> 3) & 0x07; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2367 ramname = aty_gx_ram[par->ram_type]; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2368 /* FIXME: clockchip/RAMDAC probing? */ 5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg 2020-11-27 2369 aty_ld_le32(DAC_CNTL, par); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2370 #ifdef CONFIG_ATARI ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2371 clk_type = CLK_ATI18818_1; 5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg 2020-11-27 2372 if (((stat0 >> 9) & 0x07) == 0x07) ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2373 dac_subtype = DAC_ATT20C408; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2374 else ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 @2375 dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2376 #else ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2377 dac_subtype = DAC_IBMRGB514; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2378 clk_type = CLK_IBMRGB514; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2379 #endif ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2380 switch (dac_subtype) { ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2381 case DAC_IBMRGB514: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2382 par->dac_ops = &aty_dac_ibm514; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2383 break; 3a2842480bbef42 drivers/video/aty/atyfb_base.c Antonino A. Daplas 2007-05-08 2384 #ifdef CONFIG_ATARI ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2385 case DAC_ATI68860_B: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2386 case DAC_ATI68860_C: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2387 par->dac_ops = &aty_dac_ati68860b; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2388 break; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2389 case DAC_ATT20C408: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2390 case DAC_ATT21C498: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2391 par->dac_ops = &aty_dac_att21c498; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2392 break; 3a2842480bbef42 drivers/video/aty/atyfb_base.c Antonino A. Daplas 2007-05-08 2393 #endif ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2394 default: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2395 PRINTKI("aty_init: DAC type not implemented yet!\n"); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2396 par->dac_ops = &aty_dac_unsupported; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2397 break; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2398 } ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2399 switch (clk_type) { 0fa67f84f445e8c drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-06-26 2400 #ifdef CONFIG_ATARI ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2401 case CLK_ATI18818_1: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2402 par->pll_ops = &aty_pll_ati18818_1; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2403 break; 0fa67f84f445e8c drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-06-26 2404 #else eba87e8e8d7024d drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-03-27 2405 case CLK_IBMRGB514: eba87e8e8d7024d drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-03-27 2406 par->pll_ops = &aty_pll_ibm514; eba87e8e8d7024d drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-03-27 2407 break; eba87e8e8d7024d drivers/video/aty/atyfb_base.c Antonino A. Daplas 2006-03-27 2408 #endif ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2409 default: ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2410 PRINTKI("aty_init: CLK type not implemented yet!"); ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2411 par->pll_ops = &aty_pll_unsupported; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2412 break; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2413 } ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2414 } ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2415 #endif /* CONFIG_FB_ATY_GX */ ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2416 #ifdef CONFIG_FB_ATY_CT ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2417 if (M64_HAS(INTEGRATED)) { ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2418 par->dac_ops = &aty_dac_ct; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2419 par->pll_ops = &aty_pll_ct; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2420 par->bus_type = PCI; fe86175bce50bc3 drivers/video/aty/atyfb_base.c Randy Dunlap 2009-02-04 2421 par->ram_type = (aty_ld_le32(CNFG_STAT0, par) & 0x07); ee905d0c58a440a drivers/video/aty/atyfb_base.c Ville Syrjala 2009-06-30 2422 if (M64_HAS(XL_MEM)) ee905d0c58a440a drivers/video/aty/atyfb_base.c Ville Syrjala 2009-06-30 2423 ramname = aty_xl_ram[par->ram_type]; ee905d0c58a440a drivers/video/aty/atyfb_base.c Ville Syrjala 2009-06-30 2424 else ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2425 ramname = aty_ct_ram[par->ram_type]; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2426 /* for many chips, the mclk is 67 MHz for SDRAM, 63 MHz otherwise */ ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2427 if (par->pll_limits.mclk == 67 && par->ram_type < SDRAM) ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2428 par->pll_limits.mclk = 63; 159dde93692ef54 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2429 /* Mobility + 32bit memory interface need halved XCLK. */ 159dde93692ef54 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2430 if (M64_HAS(MOBIL_BUS) && par->ram_type == SDRAM32) 159dde93692ef54 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2431 par->pll_limits.xclk = (par->pll_limits.xclk + 1) >> 1; ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2432 } b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2433 #endif c0887eedb4498e2 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-06-27 2434 #ifdef CONFIG_PPC_PMAC 689620100172e24 drivers/video/aty/atyfb_base.c Ville Syrjala 2009-09-22 2435 /* 689620100172e24 drivers/video/aty/atyfb_base.c Ville Syrjala 2009-09-22 2436 * The Apple iBook1 uses non-standard memory frequencies. 689620100172e24 drivers/video/aty/atyfb_base.c Ville Syrjala 2009-09-22 2437 * We detect it and set the frequency manually. 689620100172e24 drivers/video/aty/atyfb_base.c Ville Syrjala 2009-09-22 2438 */ 71a157e8edca551 drivers/video/aty/atyfb_base.c Grant Likely 2010-02-01 2439 if (of_machine_is_compatible("PowerBook2,1")) { c0887eedb4498e2 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-06-27 2440 par->pll_limits.mclk = 70; c0887eedb4498e2 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-06-27 2441 par->pll_limits.xclk = 53; c0887eedb4498e2 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-06-27 2442 } c0887eedb4498e2 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-06-27 2443 #endif ^1da177e4c3f415 drivers/video/aty/atyfb_base.c Linus Torvalds 2005-04-16 2444 b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2445 /* Allow command line to override clocks. */ b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2446 if (pll) b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2447 par->pll_limits.pll_max = pll; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2448 if (mclk) b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2449 par->pll_limits.mclk = mclk; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2450 if (xclk) b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2451 par->pll_limits.xclk = xclk; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2452 b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2453 aty_calc_mem_refresh(par, par->pll_limits.xclk); b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2454 par->pll_per = 1000000/par->pll_limits.pll_max; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2455 par->mclk_per = 1000000/par->pll_limits.mclk; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2456 par->xclk_per = 1000000/par->pll_limits.xclk; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2457 b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2458 par->ref_clk_per = 1000000000000ULL / 14318180; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2459 xtal = "14.31818"; b4e124c138558a0 drivers/video/aty/atyfb_base.c Ville Syrjala 2007-05-08 2460 --- 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: 59297 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, back to index Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-27 19:57 [PATCH v1 0/28] drivers/video: W=1 warning fixes Sam Ravnborg 2020-11-27 19:58 ` [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base Sam Ravnborg 2020-11-27 23:29 ` kernel test robot
Linux-fbdev Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-fbdev/0 linux-fbdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-fbdev linux-fbdev/ https://lore.kernel.org/linux-fbdev \ linux-fbdev@vger.kernel.org public-inbox-index linux-fbdev Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fbdev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git