Message ID | 20210113145009.1272040-1-lee.jones@linaro.org |
---|---|
Headers | show |
Series | Rid W=1 warnings from Video | expand |
On Wed, 13 Jan 2021, Daniël Mantione wrote: > Hi, > > If I remember well, the removed lines have to do with the VGA/accelerator > mode of the chip. The current driver always runs the chip in accelerator > mode. Suppose you would want to support high resolution hardware text modes > with the driver (fbdev bpp=0), then you would need to switch the chip into > VGA mode mode and then the removed lines become relevant. > > I did some experiments with this when I was working on the driver, but > because the documentation was silent about the behaviour of extended CRTC > registers in VGA mode, I failed to make hardware text modes to work > properly. > > The #if 0 was there so code was already there in case me or someone else > would pick it up again. This code has been commented out for *at least* 16 years. Probably time to let it go. :) > Best regards, > > Daniël Mantione > > Op Wed, 13 Jan 2021, schreef Lee Jones: > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/video/fbdev/aty/mach64_ct.c: In function ‘aty_init_pll_ct’: > > drivers/video/fbdev/aty/mach64_ct.c:405:46: warning: variable ‘vga_dsp_on_off’ set but not used [-Wunused-but-set-variable] > > drivers/video/fbdev/aty/mach64_ct.c:405:30: warning: variable ‘vga_dsp_config’ set but not used [-Wunused-but-set-variable] > > drivers/video/fbdev/aty/mach64_ct.c:405:18: warning: variable ‘dsp_on_off’ set but not used [-Wunused-but-set-variable] > > > > Cc: daniel.mantione@freepascal.org > > Cc: dri-devel@lists.freedesktop.org > > Cc: linux-fbdev@vger.kernel.org > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > --- > > drivers/video/fbdev/aty/mach64_ct.c | 19 ++----------------- > > 1 file changed, 2 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/video/fbdev/aty/mach64_ct.c b/drivers/video/fbdev/aty/mach64_ct.c > > index f87cc81f4fa2b..23eececa1e9d7 100644 > > --- a/drivers/video/fbdev/aty/mach64_ct.c > > +++ b/drivers/video/fbdev/aty/mach64_ct.c > > @@ -402,7 +402,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) > > struct atyfb_par *par = (struct atyfb_par *) info->par; > > u8 mpost_div, xpost_div, sclk_post_div_real; > > u32 q, memcntl, trp; > > - u32 dsp_config, dsp_on_off, vga_dsp_config, vga_dsp_on_off; > > + u32 dsp_config; > > #ifdef DEBUG > > int pllmclk, pllsclk; > > #endif > > @@ -488,25 +488,10 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) > > > > /* Allow BIOS to override */ > > dsp_config = aty_ld_le32(DSP_CONFIG, par); > > - dsp_on_off = aty_ld_le32(DSP_ON_OFF, par); > > - vga_dsp_config = aty_ld_le32(VGA_DSP_CONFIG, par); > > - vga_dsp_on_off = aty_ld_le32(VGA_DSP_ON_OFF, par); > > > > if (dsp_config) > > pll->ct.dsp_loop_latency = (dsp_config & DSP_LOOP_LATENCY) >> 16; > > -#if 0 > > - FIXME: is it relevant for us? > > - if ((!dsp_on_off && !M64_HAS(RESET_3D)) || > > - ((dsp_on_off == vga_dsp_on_off) && > > - (!dsp_config || !((dsp_config ^ vga_dsp_config) & DSP_XCLKS_PER_QW)))) { > > - vga_dsp_on_off &= VGA_DSP_OFF; > > - vga_dsp_config &= VGA_DSP_XCLKS_PER_QW; > > - if (ATIDivide(vga_dsp_on_off, vga_dsp_config, 5, 1) > 24) > > - pll->ct.fifo_size = 32; > > - else > > - pll->ct.fifo_size = 24; > > - } > > -#endif > > + > > /* Exit if the user does not want us to tamper with the clock > > rates of her chip. */ > > if (par->mclk_per == 0) {
On Wed, 13 Jan 2021, Sam Ravnborg wrote: > Hi Lee, > > On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote: > > This set is part of a larger effort attempting to clean-up W=1 > > kernel builds, which are currently overwhelmingly riddled with > > niggly little warnings. > > > > This patch-set clears all of the W=1 warnings currently residing > > in drivers/video. > > I am sorry to say that I expect most of your nice patches to clash > with patches that is already present in drm-misc-next. > > drivers/video/ are warning free with W=1 in drm-misc-next today. > > I do not know why drm-misc-next is not yet pullled into linux-next. Well that kinda sucks. What are the chances of that? Most of my patches fix issues that have been there for years!
On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote: > On Wed, 13 Jan 2021, Sam Ravnborg wrote: > >> Hi Lee, >> >> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote: >> > This set is part of a larger effort attempting to clean-up W=1 >> > kernel builds, which are currently overwhelmingly riddled with >> > niggly little warnings. >> > >> > This patch-set clears all of the W=1 warnings currently residing >> > in drivers/video. >> >> I am sorry to say that I expect most of your nice patches to clash >> with patches that is already present in drm-misc-next. >> >> drivers/video/ are warning free with W=1 in drm-misc-next today. >> >> I do not know why drm-misc-next is not yet pullled into linux-next. > > Well that kinda sucks. What are the chances of that? > > Most of my patches fix issues that have been there for years! We auto-update the for-linux-next and for-linux-next-fixes branches, and they seem to be up-to-date [1]. How recent are the fixes, maybe because of this: [2]? BR, Jani. [1] https://cgit.freedesktop.org/drm/drm-misc [2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au
On Thu, Jan 14, 2021 at 10:04 AM Jani Nikula <jani.nikula@linux.intel.com> wrote: > > On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote: > > On Wed, 13 Jan 2021, Sam Ravnborg wrote: > > > >> Hi Lee, > >> > >> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote: > >> > This set is part of a larger effort attempting to clean-up W=1 > >> > kernel builds, which are currently overwhelmingly riddled with > >> > niggly little warnings. > >> > > >> > This patch-set clears all of the W=1 warnings currently residing > >> > in drivers/video. > >> > >> I am sorry to say that I expect most of your nice patches to clash > >> with patches that is already present in drm-misc-next. > >> > >> drivers/video/ are warning free with W=1 in drm-misc-next today. > >> > >> I do not know why drm-misc-next is not yet pullled into linux-next. > > > > Well that kinda sucks. What are the chances of that? > > > > Most of my patches fix issues that have been there for years! I planned to go through them all today, let's see what's still needed. > We auto-update the for-linux-next and for-linux-next-fixes branches, and > they seem to be up-to-date [1]. It only happened last week instead of right after -rc1 due to some confusion, but it should have been in linux-next for a few days already. > How recent are the fixes, maybe because of this: [2]? > > BR, > Jani. > > > [1] https://cgit.freedesktop.org/drm/drm-misc > [2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au Patch for that just got committted, so this shouldn't be too big a window for drm-misc-next to be excluded should have been very small. -Daniel > > -- > Jani Nikula, Intel Open Source Graphics Center > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Thu, Jan 14, 2021 at 10:11:01AM +0100, Daniel Vetter wrote: > On Thu, Jan 14, 2021 at 10:04 AM Jani Nikula > <jani.nikula@linux.intel.com> wrote: > > > > On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote: > > > On Wed, 13 Jan 2021, Sam Ravnborg wrote: > > > > > >> Hi Lee, > > >> > > >> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote: > > >> > This set is part of a larger effort attempting to clean-up W=1 > > >> > kernel builds, which are currently overwhelmingly riddled with > > >> > niggly little warnings. > > >> > > > >> > This patch-set clears all of the W=1 warnings currently residing > > >> > in drivers/video. > > >> > > >> I am sorry to say that I expect most of your nice patches to clash > > >> with patches that is already present in drm-misc-next. > > >> > > >> drivers/video/ are warning free with W=1 in drm-misc-next today. > > >> > > >> I do not know why drm-misc-next is not yet pullled into linux-next. > > > > > > Well that kinda sucks. What are the chances of that? > > > > > > Most of my patches fix issues that have been there for years! > > I planned to go through them all today, let's see what's still needed. First bunch of patches are all not needed anymore, I think this is quicker if you're rebasing. Unfortunate this happened :-/ -Daniel > > > We auto-update the for-linux-next and for-linux-next-fixes branches, and > > they seem to be up-to-date [1]. > > It only happened last week instead of right after -rc1 due to some > confusion, but it should have been in linux-next for a few days > already. > > > How recent are the fixes, maybe because of this: [2]? > > > > BR, > > Jani. > > > > > > [1] https://cgit.freedesktop.org/drm/drm-misc > > [2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au > > Patch for that just got committted, so this shouldn't be too big a > window for drm-misc-next to be excluded should have been very small. > -Daniel > > > > > -- > > Jani Nikula, Intel Open Source Graphics Center > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch