From patchwork Tue Feb 9 18:56:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 8265001 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D773FBEEE5 for ; Tue, 9 Feb 2016 18:57:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9EF220251 for ; Tue, 9 Feb 2016 18:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8383B20254 for ; Tue, 9 Feb 2016 18:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754610AbcBIS4b (ORCPT ); Tue, 9 Feb 2016 13:56:31 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34361 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbcBIS43 (ORCPT ); Tue, 9 Feb 2016 13:56:29 -0500 Received: by mail-wm0-f44.google.com with SMTP id 128so208928619wmz.1 for ; Tue, 09 Feb 2016 10:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XasKIl7JZs0E5sk5NwYm78G/tG7JYmj09YBl84tmJgM=; b=T9JGAdY7tMMPxanIR6inl0/fzbX5CgzIR4tHmwo7YjchEvN+8rFoCUW7AgAHuQKXqB 9E+VECoFfIATlmFFnfn3TRwiDm10jnLuAbi5q5OCy1wltCgW8UBthLVN4UFO9Hnxus5K VfSCDeIXt0WdsbxK82Xyi/NrDciOQyfF8KVM4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XasKIl7JZs0E5sk5NwYm78G/tG7JYmj09YBl84tmJgM=; b=QFuD5hFXIVdka5Sq604s1ryVbAr14OBWTFHcDpLtSWMcVKni2GkaQOWuZ10qU0+Q/6 HLTpEdOfeFj3rj5wU+pIspJkm0boTnbbvVE+y/8Xd2mp5gbpviAXs1+D0AdjzAvb07S5 03BuVA/6aZjBcqockhWqE4awwGS7PKcwLV3UpkfEEREMyiQOeCz/3gKQaBdy1HkzobkP 5Q/JsK1UvgxTLUvTyv/nv5i2N3MklqMsCXsN5h3SbJ/zwByUTGglbN5YqVP79BspNFMo y1b5vYdd92tGHPfv01Gl9Hay+H3JUQkvQgrtHE0WD/sEontf7sIb4xckG6tWYISsTjm/ ehzg== X-Gm-Message-State: AG10YORUgT0zaYLn6lTemE35E8njynnvy/Ev0l/zV3LjQ3mfXrF17+6fqNR8uThWxKxYAQ== X-Received: by 10.28.125.77 with SMTP id y74mr6319010wmc.21.1455044187790; Tue, 09 Feb 2016 10:56:27 -0800 (PST) Received: from wildmoose.dk (lvps87-230-87-209.dedicated.hosteurope.de. [87.230.87.209]) by smtp.gmail.com with ESMTPSA id h132sm18777403wmf.9.2016.02.09.10.56.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Feb 2016 10:56:27 -0800 (PST) From: Rasmus Villemoes To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rasmus Villemoes , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH] fbdev: kill fb_rotate Date: Tue, 9 Feb 2016 19:56:11 +0100 Message-Id: <1455044172-17488-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <87d1swdk90.fsf@rasmusvillemoes.dk> References: <87d1swdk90.fsf@rasmusvillemoes.dk> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The fb_rotate method in struct fb_ops is never actually invoked, and it's been that way in the entire history of git (in fact, the last occurrence of the string '->fb_rotate' vanished over 10 years ago, with b4d8aea6d6, and that merely tested whether the callback existed). So remove some dead code and make struct fb_obs a little smaller. Signed-off-by: Rasmus Villemoes --- drivers/video/fbdev/atafb.c | 3 --- drivers/video/fbdev/au1100fb.c | 22 ---------------------- drivers/video/fbdev/bf537-lq035.c | 23 ----------------------- drivers/video/fbdev/omap/omapfb_main.c | 22 ---------------------- drivers/video/fbdev/skeletonfb.c | 17 ----------------- include/linux/fb.h | 3 --- 6 files changed, 90 deletions(-) diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index d6ce613e12ad..fcd2dd670a65 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -313,9 +313,6 @@ extern unsigned char fontdata_8x16[]; * * Draws cursor * * int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); * - * * Rotates the display * - * void (*fb_rotate)(struct fb_info *info, int angle); - * * * wait for blit idle, optional * * int (*fb_sync)(struct fb_info *info); * diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 59560189b24a..35df2c1a8a63 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -334,27 +334,6 @@ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) return 0; } -/* fb_rotate - * Rotate the display of this angle. This doesn't seems to be used by the core, - * but as our hardware supports it, so why not implementing it... - */ -void au1100fb_fb_rotate(struct fb_info *fbi, int angle) -{ - struct au1100fb_device *fbdev = to_au1100fb_device(fbi); - - print_dbg("fb_rotate %p %d", fbi, angle); - - if (fbdev && (angle > 0) && !(angle % 90)) { - - fbdev->regs->lcd_control &= ~LCD_CONTROL_GO; - - fbdev->regs->lcd_control &= ~(LCD_CONTROL_SM_MASK); - fbdev->regs->lcd_control |= ((angle/90) << LCD_CONTROL_SM_BIT); - - fbdev->regs->lcd_control |= LCD_CONTROL_GO; - } -} - /* fb_mmap * Map video memory in user space. We don't use the generic fb_mmap method mainly * to allow the use of the TLB streaming flag (CCA=6) @@ -380,7 +359,6 @@ static struct fb_ops au1100fb_ops = .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, - .fb_rotate = au1100fb_fb_rotate, .fb_mmap = au1100fb_fb_mmap, }; diff --git a/drivers/video/fbdev/bf537-lq035.c b/drivers/video/fbdev/bf537-lq035.c index 7db3052b471d..ef29fb425122 100644 --- a/drivers/video/fbdev/bf537-lq035.c +++ b/drivers/video/fbdev/bf537-lq035.c @@ -554,28 +554,6 @@ static int bfin_lq035_fb_check_var(struct fb_var_screeninfo *var, return 0; } -/* fb_rotate - * Rotate the display of this angle. This doesn't seems to be used by the core, - * but as our hardware supports it, so why not implementing it... - */ -static void bfin_lq035_fb_rotate(struct fb_info *fbi, int angle) -{ - pr_debug("%s: %p %d", __func__, fbi, angle); -#if (defined(UD) && defined(LBR)) - switch (angle) { - - case 180: - gpio_set_value(LBR, 0); - gpio_set_value(UD, 1); - break; - default: - gpio_set_value(LBR, 1); - gpio_set_value(UD, 0); - break; - } -#endif -} - static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) { if (nocursor) @@ -623,7 +601,6 @@ static struct fb_ops bfin_lq035_fb_ops = { .fb_open = bfin_lq035_fb_open, .fb_release = bfin_lq035_fb_release, .fb_check_var = bfin_lq035_fb_check_var, - .fb_rotate = bfin_lq035_fb_rotate, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 393ae1bc07e8..6429f33167f5 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -594,27 +594,6 @@ static int set_fb_var(struct fb_info *fbi, } -/* Set rotation (0, 90, 180, 270 degree), and switch to the new mode. */ -static void omapfb_rotate(struct fb_info *fbi, int rotate) -{ - struct omapfb_plane_struct *plane = fbi->par; - struct omapfb_device *fbdev = plane->fbdev; - - omapfb_rqueue_lock(fbdev); - if (rotate != fbi->var.rotate) { - struct fb_var_screeninfo *new_var = &fbdev->new_var; - - memcpy(new_var, &fbi->var, sizeof(*new_var)); - new_var->rotate = rotate; - if (set_fb_var(fbi, new_var) == 0 && - memcmp(new_var, &fbi->var, sizeof(*new_var))) { - memcpy(&fbi->var, new_var, sizeof(*new_var)); - ctrl_change_mode(fbi); - } - } - omapfb_rqueue_unlock(fbdev); -} - /* * Set new x,y offsets in the virtual display for the visible area and switch * to the new mode. @@ -1256,7 +1235,6 @@ static struct fb_ops omapfb_ops = { .fb_ioctl = omapfb_ioctl, .fb_check_var = omapfb_check_var, .fb_set_par = omapfb_set_par, - .fb_rotate = omapfb_rotate, .fb_pan_display = omapfb_pan_display, }; diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c index fefde7c6add7..f948baa16d82 100644 --- a/drivers/video/fbdev/skeletonfb.c +++ b/drivers/video/fbdev/skeletonfb.c @@ -614,22 +614,6 @@ int xxxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) } /** - * xxxfb_rotate - NOT a required function. If your hardware - * supports rotation the whole screen then - * you would provide a hook for this. - * - * @info: frame buffer structure that represents a single frame buffer - * @angle: The angle we rotate the screen. - * - * This operation is used to set or alter the properities of the - * cursor. - */ -void xxxfb_rotate(struct fb_info *info, int angle) -{ -/* Will be deprecated */ -} - -/** * xxxfb_sync - NOT a required function. Normally the accel engine * for a graphics card take a specific amount of time. * Often we have to wait for the accelerator to finish @@ -665,7 +649,6 @@ static struct fb_ops xxxfb_ops = { .fb_copyarea = xxxfb_copyarea, /* Needed !!! */ .fb_imageblit = xxxfb_imageblit, /* Needed !!! */ .fb_cursor = xxxfb_cursor, /* Optional !!! */ - .fb_rotate = xxxfb_rotate, .fb_sync = xxxfb_sync, .fb_ioctl = xxxfb_ioctl, .fb_mmap = xxxfb_mmap, diff --git a/include/linux/fb.h b/include/linux/fb.h index 55433f86f0a3..dfe88351341f 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -296,9 +296,6 @@ struct fb_ops { /* Draws cursor */ int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); - /* Rotates the display */ - void (*fb_rotate)(struct fb_info *info, int angle); - /* wait for blit idle, optional */ int (*fb_sync)(struct fb_info *info);