From patchwork Sun Feb 2 02:33:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Finn Thain X-Patchwork-Id: 11362175 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6B45924 for ; Mon, 3 Feb 2020 08:11:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F3302070A for ; Mon, 3 Feb 2020 08:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F3302070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=telegraphics.com.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A35496EB3F; Mon, 3 Feb 2020 08:10:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 399 seconds by postgrey-1.36 at gabe; Sun, 02 Feb 2020 02:44:56 UTC Received: from kvm5.telegraphics.com.au (kvm5.telegraphics.com.au [98.124.60.144]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F6DC8985A for ; Sun, 2 Feb 2020 02:44:56 +0000 (UTC) Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id DBC8229AEF; Sat, 1 Feb 2020 21:38:15 -0500 (EST) To: Ralf Baechle , Paul Burton , James Hogan Message-Id: In-Reply-To: References: From: Finn Thain Subject: [PATCH 1/3] fbdev/g364fb: Fix build failure Date: Sun, 02 Feb 2020 13:33:32 +1100 X-Mailman-Approved-At: Mon, 03 Feb 2020 08:10:41 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Thomas Bogendoerfer , Bartlomiej Zolnierkiewicz , linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- 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 223896cc5f7d..fb26230a3c7b 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 struct fb_ops g364fb_ops = { @@ -119,28 +118,8 @@ static 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;