All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Scot Doyle <lkml14@scotdoyle.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Richard Weinberger <richard.weinberger@gmail.com>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] fbcon: expose cursor blink interval via sysfs
Date: Fri, 20 Feb 2015 12:04:38 +0000	[thread overview]
Message-ID: <54E722D6.9010900@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1501300938070.2359@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

On 30/01/15 11:40, Scot Doyle wrote:
> fbcon toggles cursor display state every 200 milliseconds when blinking.
> Since users prefer different toggle intervals, expose the interval via
> /sys/class/graphics/fbcon/cursor_blink_ms so that it may be customized.
> 
> Values written to the interface set the approximate time interval in
> milliseconds between cursor toggles, from 1 to 32767. Since the interval
> is stored internally as a number of jiffies, the millisecond value read
> from the interface may not exactly match the entered value.
> 
> An outstanding blink timer is reset after a new value is entered.
> 
> If the cursor blink is disabled, either via the 'cursor_blink' boolean
> setting or some other mechanism, the 'cursor_blink_ms' setting may still
> be modified. The new value will be used if the blink is reactivated.
> 
> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
> ---
>  drivers/video/console/fbcon.c | 65 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 7a2030b..7baa333 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -3495,11 +3495,76 @@ err:
>  	return count;
>  }
>  
> +static ssize_t show_cursor_blink_ms(struct device *device,
> +				    struct device_attribute *attr, char *buf)
> +{
> +	struct fbcon_ops *ops;
> +	int idx, ms = -1;
> +
> +	if (fbcon_has_exited)
> +		return -ENODEV;
> +
> +	console_lock();
> +	idx = con2fb_map[fg_console];
> +
> +	if (idx != -1 && registered_fb[idx] != NULL) {
> +		ops = ((struct fb_info *)registered_fb[idx])->fbcon_par;

I don't think the above typecast is needed. I can remove the typecast
when applying to my tree.

So queuing for 3.21. Thanks!

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Scot Doyle <lkml14@scotdoyle.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Richard Weinberger <richard.weinberger@gmail.com>,
	<linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 2/2] fbcon: expose cursor blink interval via sysfs
Date: Fri, 20 Feb 2015 14:04:38 +0200	[thread overview]
Message-ID: <54E722D6.9010900@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1501300938070.2359@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

On 30/01/15 11:40, Scot Doyle wrote:
> fbcon toggles cursor display state every 200 milliseconds when blinking.
> Since users prefer different toggle intervals, expose the interval via
> /sys/class/graphics/fbcon/cursor_blink_ms so that it may be customized.
> 
> Values written to the interface set the approximate time interval in
> milliseconds between cursor toggles, from 1 to 32767. Since the interval
> is stored internally as a number of jiffies, the millisecond value read
> from the interface may not exactly match the entered value.
> 
> An outstanding blink timer is reset after a new value is entered.
> 
> If the cursor blink is disabled, either via the 'cursor_blink' boolean
> setting or some other mechanism, the 'cursor_blink_ms' setting may still
> be modified. The new value will be used if the blink is reactivated.
> 
> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
> ---
>  drivers/video/console/fbcon.c | 65 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 7a2030b..7baa333 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -3495,11 +3495,76 @@ err:
>  	return count;
>  }
>  
> +static ssize_t show_cursor_blink_ms(struct device *device,
> +				    struct device_attribute *attr, char *buf)
> +{
> +	struct fbcon_ops *ops;
> +	int idx, ms = -1;
> +
> +	if (fbcon_has_exited)
> +		return -ENODEV;
> +
> +	console_lock();
> +	idx = con2fb_map[fg_console];
> +
> +	if (idx != -1 && registered_fb[idx] != NULL) {
> +		ops = ((struct fb_info *)registered_fb[idx])->fbcon_par;

I don't think the above typecast is needed. I can remove the typecast
when applying to my tree.

So queuing for 3.21. Thanks!

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-02-20 12:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  8:40 [PATCH v5 0/2] fbcon: user-defined cursor blink interval Scot Doyle
2015-01-30  8:40 ` Scot Doyle
2015-01-30  8:43 ` [PATCH v5 1/2] fbcon: store cursor blink interval in fbcon_ops Scot Doyle
2015-01-30  8:43   ` Scot Doyle
2015-01-30  8:44 ` [PATCH v5 2/2] fbcon: expose cursor blink interval via sysfs Scot Doyle
2015-01-30  8:44   ` Scot Doyle
2015-01-30  9:35   ` [PATCH v6 0/2] fbcon: user-defined cursor blink interval Scot Doyle
2015-01-30  9:35     ` Scot Doyle
2015-01-30  9:37     ` [PATCH v6 1/2] fbcon: store cursor blink interval in fbcon_ops Scot Doyle
2015-01-30  9:37       ` Scot Doyle
2015-01-30  9:40     ` [PATCH v6 2/2] fbcon: expose cursor blink interval via sysfs Scot Doyle
2015-01-30  9:40       ` Scot Doyle
2015-02-20 12:04       ` Tomi Valkeinen [this message]
2015-02-20 12:04         ` Tomi Valkeinen

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=54E722D6.9010900@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml14@scotdoyle.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=richard.weinberger@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.