From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC v2] WIP: fbconsole: not so dirty font selection via param_enum
Date: Wed, 15 Jul 2015 07:45:32 +0200 [thread overview]
Message-ID: <20150715054532.GU18700@pengutronix.de> (raw)
In-Reply-To: <1436867794-15409-1-git-send-email-antonynpavlov@gmail.com>
Hi Antony,
On Tue, Jul 14, 2015 at 12:56:34PM +0300, Antony Pavlov wrote:
> Alas I can't find any tab-complition for param_enum,
> so addition 'fonts' command is introduced.
>
> Usage example:
> ==============
>
> barebox@barebox sandbox:/ fonts
> VGA8x16
> MINI4x6
> barebox@barebox sandbox:/ fbconsole0.font=MINI4x6
> barebox@barebox sandbox:/ fbconsole0.active=o
> fb0: framebuffer console 160x80 activated
> barebox@barebox sandbox:/ fbconsole0.font=VGA8x16
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> drivers/video/fbconsole.c | 60 +++++++++++++++++++++++++++++++++++++++--------
> include/linux/font.h | 11 ++++++---
> lib/fonts/fonts.c | 39 ++++++++++++++++--------------
> 3 files changed, 80 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index 36fd138..7df89ab 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -20,6 +20,10 @@ struct fbc_priv {
> struct fb_info *fb;
>
> struct screen *sc;
> +
> + struct param_d *par_font;
> + int par_font_val;
> +
> /* FIXME */
> #define VIDEO_FONT_CHARS 256
> struct image *chars[VIDEO_FONT_CHARS];
> @@ -47,6 +51,16 @@ static int fbc_tstc(struct console_device *cdev)
> return 0;
> }
>
> +static void cls(struct fbc_priv *priv)
> +{
> + void *buf = gui_screen_render_buffer(priv->sc);
> +
> + memset(buf, 0, priv->fb->line_length * priv->fb->yres);
> +
> + priv->x = 0;
> + priv->y = 0;
I found out this is not entirely correct. Clearing the screen (\e[2J)
and putting the cursor top left (\e[;H) are two different things.
I integrated the changes from this patch, but changed cls() not to put
the cursor in home position.
Also I integrated some other changes:
- Fix fbc_set_active, no longer lose memory when called multiple times
- Add 7x14 font
- properly export get_pixel
- Add fb_enable/fb_disable function so that we do not have to call into
the fb_info ops directly
- Make splash screen work again, was broken by "graphics_utils: Let
fb_open allocate the screen"
Checkout the result on -next.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-07-15 5:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 9:56 Antony Pavlov
2015-07-15 5:45 ` Sascha Hauer [this message]
2015-07-15 8:45 ` Antony Pavlov
2015-07-15 10:27 ` Sascha Hauer
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=20150715054532.GU18700@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/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