From owner-svn-src-user@FreeBSD.ORG Tue Nov 5 23:01:58 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 68F68F08; Tue, 5 Nov 2013 23:01:58 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C9AE2E0D; Tue, 5 Nov 2013 23:01:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5N1wIr081547; Tue, 5 Nov 2013 23:01:58 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5N1vQR081545; Tue, 5 Nov 2013 23:01:57 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201311052301.rA5N1vQR081545@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 5 Nov 2013 23:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r257725 - user/ed/newcons/sys/dev/vt/hw/fb X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 23:01:58 -0000 Author: ray Date: Tue Nov 5 23:01:57 2013 New Revision: 257725 URL: http://svnweb.freebsd.org/changeset/base/257725 Log: Export vt_fb VT driver methods to allow reuse. Sponsored by: The FreeBSD Foundation Modified: user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.c user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.h Modified: user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.c Tue Nov 5 23:00:26 2013 (r257724) +++ user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.c Tue Nov 5 23:01:57 2013 (r257725) @@ -41,11 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -static vd_init_t vt_fb_init; -static vd_blank_t vt_fb_blank; -static vd_bitbltchr_t vt_fb_bitbltchr; -static vd_postswitch_t vt_fb_postswitch; - static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, @@ -54,7 +49,7 @@ static struct vt_driver vt_fb_driver = { .vd_priority = VD_PRIORITY_GENERIC+10, }; -static void +void vt_fb_blank(struct vt_device *vd, term_color_t color) { struct fb_info *info; @@ -63,6 +58,7 @@ vt_fb_blank(struct vt_device *vd, term_c info = vd->vd_softc; c = info->fb_cmap[color]; + switch (FBTYPE_GET_BYTESPP(info)) { case 1: for (o = 0; o < info->fb_stride; o++) @@ -95,7 +91,7 @@ vt_fb_blank(struct vt_device *vd, term_c } } -static void +void vt_fb_bitbltchr(struct vt_device *vd, const uint8_t *src, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) @@ -147,7 +143,7 @@ vt_fb_bitbltchr(struct vt_device *vd, co } } -static void +void vt_fb_postswitch(struct vt_device *vd) { struct fb_info *info; @@ -181,7 +177,7 @@ vt_fb_init_cmap(uint32_t *cmap, int dept } } -static int +int vt_fb_init(struct vt_device *vd) { struct fb_info *info; @@ -212,5 +208,6 @@ vt_fb_attach(struct fb_info *info) { vt_allocate(&vt_fb_driver, info); + return (0); } Modified: user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.h Tue Nov 5 23:00:26 2013 (r257724) +++ user/ed/newcons/sys/dev/vt/hw/fb/vt_fb.h Tue Nov 5 23:01:57 2013 (r257725) @@ -34,4 +34,12 @@ /* Generic framebuffer interface call vt_fb_attach to init VT(9) */ int vt_fb_attach(struct fb_info *info); +int fb_probe(struct fb_info *info); + +vd_init_t vt_fb_init; +vd_blank_t vt_fb_blank; +vd_bitbltchr_t vt_fb_bitbltchr; +vd_postswitch_t vt_fb_postswitch; + + #endif /* _DEV_VT_HW_FB_VT_FB_H_ */