linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Finn Thain <fthain@telegraphics.com.au>,
	Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paulburton@kernel.org>,
	James Hogan <jhogan@kernel.org>
Cc: linux-fbdev@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] fbdev/g364fb: Fix build failure
Date: Sat, 08 Feb 2020 17:16:58 +0000	[thread overview]
Message-ID: <22d69fb6-ef2c-e4db-43e0-bf34a8fc17dc@amsat.org> (raw)
In-Reply-To: <5504c0c416525ed8c7b8440e5f9971f2a7b59f28.1581030073.git.fthain@telegraphics.com.au>

On 2/7/20 12:01 AM, Finn Thain wrote:
> This patch resolves these compiler errors and warnings --
> 
>   CC      drivers/video/fbdev/g364fb.o
> drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
> drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
> drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
> drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
> 
> The MIPS Magnum framebuffer console now works when tested in QEMU.
> 
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
>  drivers/video/fbdev/g364fb.c | 29 +++--------------------------
>  1 file changed, 3 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c
> index 845b79da2a7c..05837a3b985c 100644
> --- a/drivers/video/fbdev/g364fb.c
> +++ b/drivers/video/fbdev/g364fb.c
> @@ -108,7 +108,6 @@ static int g364fb_pan_display(struct fb_var_screeninfo *var,
>  static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>  			    u_int blue, u_int transp,
>  			    struct fb_info *info);
> -static int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
>  static int g364fb_blank(int blank, struct fb_info *info);
>  
>  static const struct fb_ops g364fb_ops = {
> @@ -119,28 +118,8 @@ static const struct fb_ops g364fb_ops = {
>  	.fb_fillrect	= cfb_fillrect,
>  	.fb_copyarea	= cfb_copyarea,
>  	.fb_imageblit	= cfb_imageblit,
> -	.fb_cursor	= g364fb_cursor,
>  };
>  
> -int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
> -{
> -	
> -	switch (cursor->enable) {
> -	case CM_ERASE:
> -		*(unsigned int *) CTLA_REG |= CURS_TOGGLE;
> -		break;
> -
> -	case CM_MOVE:
> -	case CM_DRAW:
> -		*(unsigned int *) CTLA_REG &= ~CURS_TOGGLE;
> -		*(unsigned int *) CURS_POS_REG > -		    ((x * fontwidth(p)) << 12) | ((y * fontheight(p)) -
> -						  info->var.yoffset);
> -		break;
> -	}
> -	return 0;
> -}
> -
>  /*
>   *  Pan or Wrap the Display
>   *
> @@ -194,11 +173,9 @@ static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>   */
>  int __init g364fb_init(void)
>  {
> -	volatile unsigned int *pal_ptr > -	    (volatile unsigned int *) CLR_PAL_REG;
>  	volatile unsigned int *curs_pal_ptr >  	    (volatile unsigned int *) CURS_PAL_REG;
> -	int mem, i, j;
> +	int mem, i;
>  
>  	if (fb_get_options("g364fb", NULL))
>  		return -ENODEV;
> @@ -230,8 +207,8 @@ int __init g364fb_init(void)
>  	 */
>  	*(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff;
>  	*(unsigned short *) (CURS_PAT_REG + 15 * 64) = 0xffff;
> -	fb_var.xres_virtual = fbvar.xres;
> -	fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel;
> +	fb_var.xres_virtual = fb_var.xres;
> +	fb_fix.line_length = fb_var.xres_virtual * fb_var.bits_per_pixel / 8;
>  	fb_fix.smem_start = 0x40000000;	/* physical address */
>  	/* get size of video memory; this is special for the JAZZ hardware */
>  	mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;
> 

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

  parent reply	other threads:[~2020-02-08 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
2020-02-07 14:41   ` Bartlomiej Zolnierkiewicz
2020-02-08 17:16   ` Philippe Mathieu-Daudé [this message]
2020-02-19 19:03 ` [PATCH v2 0/3] Improve MIPS Magnum support Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22d69fb6-ef2c-e4db-43e0-bf34a8fc17dc@amsat.org \
    --to=f4bug@amsat.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fthain@telegraphics.com.au \
    --cc=jhogan@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).