/* * linux/drivers/video/console/fbcon_rotate.c -- Software Rotation * * Copyright (C) 2005 Antonino Daplas * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. */ #include #include #include #include #include #include #include #include "fbcon.h" #include "fbcon_rotate.h" static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc) { struct fbcon_ops *ops = info->fbcon_par; int len, err = 0; int s_cellsize, d_cellsize, i; const u8 *src; u8 *dst; if (vc->vc_font.data == ops->fontdata && ops->p->con_rotate == ops->cur_rotate) goto finished; src = ops->fontdata = vc->vc_font.data; ops->cur_rotate = ops->p->con_rotate; len = (!ops->p->userfont) ? 256 : FNTCHARCNT(src); s_cellsize = ((vc->vc_font.width + 7)/8) * vc->vc_font.height; d_cellsize = s_cellsize; if (ops->rotate == FB_ROTATE_CW || ops->rotate == FB_ROTATE_CCW) d_cellsize = ((vc->vc_font.height + 7)/8) * vc->vc_font.width; if (info->fbops->fb_sync) info->fbops->fb_sync(info); if (ops->fd_size < d_cellsize * len) { dst = kmalloc(d_cellsize * len, GFP_KERNEL); if (dst == NULL) { err = -ENOMEM; goto finished; } ops->fd_size = d_cellsize * len; kfree(ops->fontbuffer); ops->fontbuffer = dst; } dst = ops->fontbuffer; memset(dst, 0, ops->fd_size); switch (ops->rotate) { case FB_ROTATE_UD: for (i = len; i--; ) { rotate_ud(src, dst, vc->vc_font.width, vc->vc_font.height); src += s_cellsize; dst += d_cellsize; } break; case FB_ROTATE_CW: for (i = len; i--; ) { rotate_cw(src, dst, vc->vc_font.width, vc->vc_font.height); src += s_cellsize; dst += d_cellsize; } break; case FB_ROTATE_CCW: for (i = len; i--; ) { rotate_ccw(src, dst, vc->vc_font.width, vc->vc_font.height); src += s_cellsize; dst += d_cellsize; } break; } finished: return err; } void fbcon_set_rotate(struct fbcon_ops *ops) { ops->rotate_font = fbcon_rotate_font; switch(ops->rotate) { case FB_ROTATE_CW: fbcon_rotate_cw(ops); break; case FB_ROTATE_UD: fbcon_rotate_ud(ops); break; case FB_ROTATE_CCW: fbcon_rotate_ccw(ops); break; } } EXPORT_SYMBOL(fbcon_set_rotate); MODULE_AUTHOR("Antonino Daplas "); MODULE_DESCRIPTION("Console Rotation Support"); MODULE_LICENSE("GPL"); e='range'>range
diff options
context:
space:
mode:
authorJurij Smakov <jurij@wooyd.org>2017-01-30 15:41:36 -0600
committerKalle Valo <kvalo@codeaurora.org>2017-01-31 09:05:25 +0200
commit52f5631a4c056ad01682393be56d2be237e81610 (patch)
tree53d1ddd2c1b179c808df10b6ce731ad26aa9f31b /include/xen/interface/io/xenbus.h
parent2b1d530cb3157f828fcaadd259613f59db3c6d1c (diff)
rtlwifi: rtl8192ce: Fix loading of incorrect firmware
In commit cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859, an error in the edit results in the wrong firmware being loaded for some models of the RTL8188/8192CE. In this condition, the connection suffered from high ping latency, slow transfer rates, and required higher signal strengths to work at all See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853073, https://bugzilla.opensuse.org/show_bug.cgi?id=1017471, and https://github.com/lwfinger/rtlwifi_new/issues/203 for descriptions of the problems. This patch fixes all of those problems. Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859") Signed-off-by: Jurij Smakov <jurij@wooyd.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> # 4.9+ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'include/xen/interface/io/xenbus.h')