Page MenuHomeFreeBSD

Implement "vidcontrol -c <normal|blink|destructive>" for vt(4)
Needs RevisionPublic

Authored by smahadevan_freebsdfoundation.org on Jul 27 2017, 7:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 7:22 PM
Unknown Object (File)
Thu, Apr 4, 6:25 PM
Unknown Object (File)
Dec 20 2023, 4:46 AM
Unknown Object (File)
Dec 10 2023, 10:27 PM
Unknown Object (File)
Sep 6 2023, 9:58 AM
Unknown Object (File)
Aug 27 2023, 2:40 PM
Unknown Object (File)
Aug 15 2023, 9:13 AM
Unknown Object (File)
Jul 7 2023, 12:35 AM
Subscribers

Details

Summary

Fixes bug 210413.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste added inline comments.
sys/dev/vt/vt_buf.c
641–643

minor style(9) nit, convention is to in general not initialize variables in declarations. Also a blank line should follow the declarations.

sys/dev/vt/vt_core.c
1068

This fn could be simplified slightly by just naming this parameter invert, and making the TF_REVERSE check do invert = !invert;

2884

minor whitespace issue: extra blank line

style(9) issues still here (but in different functions), but there is a lot from very first vt project release.

This revision is now accepted and ready to land.Jul 28 2017, 11:03 PM

One callout per window, plus flushing all windows twice per second is probably inefficient, on top of a vt(4) which is already slower than syscons(4).

Could you please experiment with something integrated to the vt_flush() and vt_timer() functions instead? The former could handle blinking, while the latter could schedule a new flush in hz / 2 if there are no changes reported by vt_flush(). Note that you would need to improve the vt_resume_flush_timer() and vt_suspend_flush_timer() functions to take care of scheduling a flush earlier if the currently scheduled one would fire in hz / 2. Otherwise, there will be an apparent lag for the user.

sys/dev/vt/vt_core.c
2617

Using one callout per window is overkill: only one cursor is displayed at a time.

2880

You are abusing the VBF_CURSOR flag here: it is meant to configure if the cursor should be displayed at all, whether it blinks or not. With the patch, the user can't tell anymore if the cursor should be hidden.

Also, the access to vw->vw_buf should be locked.

2881

Flushing the entire window is a bit too much just for changing the cursor state.

This revision now requires changes to proceed.Jun 10 2018, 4:08 PM