<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/vt_kern.h, branch v4.10.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.10.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.10.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-10-27T14:37:44Z</updated>
<entry>
<title>tty: vgacon+sisusb, move scrolldelta to a common helper</title>
<updated>2016-10-27T14:37:44Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-10-03T09:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=35cc56f9a30480c8a0cca809cf341614a2144758'/>
<id>urn:sha1:35cc56f9a30480c8a0cca809cf341614a2144758</id>
<content type='text'>
The code is mirrorred in scrolldelta implementations of both vgacon
and sisusb. Let's move the code to a separate helper where we will
perform a common cleanup and further changes.

While we are moving the code, make it linear and save one indentation
level. This is done by returning from the "!lines" then-branch
immediatelly. This allows flushing the else-branch 1 level to the
left, obviously.

Few more new lines and comments were added too.

And do not forget to export the helper function given sisusb can be
built as module.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: &lt;linux-fbdev@vger.kernel.org&gt;
Cc: &lt;linux-usb@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: vt, ignore PIO_UNIMAPCLR param</title>
<updated>2016-06-25T16:04:48Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-06-23T11:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f8b0c2e688f086d22157afc734755ed370e288dc'/>
<id>urn:sha1:f8b0c2e688f086d22157afc734755ed370e288dc</id>
<content type='text'>
We do not do hashtables for unicode fonts since 1995 (1.3.28). So it
is time to remove the second parameter of con_clear_unimap and ignore
the advice from userspace completely.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: remove lines parameter from scrollback</title>
<updated>2016-06-25T16:04:48Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-06-23T11:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1b0ec88ac1cb0413a717bc3cefea72d6f2533672'/>
<id>urn:sha1:1b0ec88ac1cb0413a717bc3cefea72d6f2533672</id>
<content type='text'>
It is always called with 0, so remove the parameter and pass the
default down to scrolldelta without checking.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.10-rc3 into tty-next</title>
<updated>2013-05-27T01:57:53Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-05-27T01:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8095e4e81b4bc38eef7e0be99f9ecc744eaa1683'/>
<id>urn:sha1:8095e4e81b4bc38eef7e0be99f9ecc744eaa1683</id>
<content type='text'>
We want these fixes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: delete unneeded function unbind_con_driver</title>
<updated>2013-05-20T19:27:59Z</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2013-05-08T18:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1f5e38a5d3583b877619f95a922b607966dfc2e'/>
<id>urn:sha1:c1f5e38a5d3583b877619f95a922b607966dfc2e</id>
<content type='text'>
Now there is no place use unbind_con_driver,
and we can achieve unbind_con_driver's function
with do_unbind_con_driver easily, so just delete
it to reduce code size and duplication.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: Fix vc_deallocate() lock order</title>
<updated>2013-05-20T19:15:59Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-05-17T16:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=421b40a6286ee343d77d5e51f5ee6d04d7a2a90f'/>
<id>urn:sha1:421b40a6286ee343d77d5e51f5ee6d04d7a2a90f</id>
<content type='text'>
Now that the tty port owns the flip buffers and i/o is allowed
from the driver even when no tty is attached, the destruction
of the tty port (and the flip buffers) must ensure that no
outstanding work is pending.

Unfortunately, this creates a lock order problem with the
console_lock (see attached lockdep report [1] below).

For single console deallocation, drop the console_lock prior
to port destruction. When multiple console deallocation,
defer port destruction until the consoles have been
deallocated.

tty_port_destroy() is not required if the port has not
been used; remove from vc_allocate() failure path.

[1] lockdep report from Dave Jones &lt;davej@redhat.com&gt;

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0+ #16 Not tainted
 -------------------------------------------------------
 (agetty)/26163 is trying to acquire lock:
 blocked:  ((&amp;buf-&gt;work)){+.+...}, instance: ffff88011c8b0020, at: [&lt;ffffffff81062065&gt;] flush_work+0x5/0x2e0

 but task is already holding lock:
 blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (console_lock){+.+.+.}:
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810416c7&gt;] console_lock+0x77/0x80
        [&lt;ffffffff813c3dcd&gt;] con_flush_chars+0x2d/0x50
        [&lt;ffffffff813b32b2&gt;] n_tty_receive_buf+0x122/0x14d0
        [&lt;ffffffff813b7709&gt;] flush_to_ldisc+0x119/0x170
        [&lt;ffffffff81064381&gt;] process_one_work+0x211/0x700
        [&lt;ffffffff8106498b&gt;] worker_thread+0x11b/0x3a0
        [&lt;ffffffff8106ce5d&gt;] kthread+0xed/0x100
        [&lt;ffffffff81601cac&gt;] ret_from_fork+0x7c/0xb0

 -&gt; #0 ((&amp;buf-&gt;work)){+.+...}:
        [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
        [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
        [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
        [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
        [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
        [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
        [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
        [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
        [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
        [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

 other info that might help us debug this:

 [ 6760.076175]  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(console_lock);
                                lock((&amp;buf-&gt;work));
                                lock(console_lock);
   lock((&amp;buf-&gt;work));

  *** DEADLOCK ***

 1 lock on stack by (agetty)/26163:
  #0: blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230
 stack backtrace:
 Pid: 26163, comm: (agetty) Not tainted 3.9.0+ #16
 Call Trace:
  [&lt;ffffffff815edb14&gt;] print_circular_bug+0x200/0x20e
  [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a200&gt;] ? native_sched_clock+0x20/0x80
  [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff8113c8a3&gt;] ? __free_pages_ok.part.57+0x93/0xc0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff810652f2&gt;] ? __cancel_work_timer+0x82/0x130
  [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
  [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
  [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
  [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
  [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
  [&lt;ffffffff810aec41&gt;] ? lock_release_holdtime.part.30+0xa1/0x170
  [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
  [&lt;ffffffff812b00f6&gt;] ? inode_has_perm.isra.46.constprop.61+0x56/0x80
  [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
  [&lt;ffffffff812b04db&gt;] ? selinux_file_ioctl+0x5b/0x110
  [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'console-fixes' into drm-next</title>
<updated>2013-02-08T02:13:43Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-02-08T02:13:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62cd2fa82a38cb3d653517822c62a39cdbb5f365'/>
<id>urn:sha1:62cd2fa82a38cb3d653517822c62a39cdbb5f365</id>
<content type='text'>
(not the fbcon maintainer pull 2)

fix bug in vgacon on bootup and fbcon losing fonts on startup.

* console-fixes: (50 commits)
  fbcon: don't lose the console font across generic-&gt;chip driver switch
  vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
</content>
</entry>
<entry>
<title>fb: Yet another band-aid for fixing lockdep mess</title>
<updated>2013-02-08T02:02:41Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2013-01-25T00:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e93a9a868792ad71cdd09d75e5a02d8067473c4e'/>
<id>urn:sha1:e93a9a868792ad71cdd09d75e5a02d8067473c4e</id>
<content type='text'>
I've still got lockdep warnings even after Alan's patch, and it seems that
yet more band aids are required to paper over similar paths for
unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
warnings are finally gone.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>vgacon/vt: clear buffer attributes when we load a 512 character font (v2)</title>
<updated>2013-02-07T02:37:03Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-01-24T04:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a2483072393b27f4336ab068a1f48ca19ff1c1e'/>
<id>urn:sha1:2a2483072393b27f4336ab068a1f48ca19ff1c1e</id>
<content type='text'>
When we switch from 256-&gt;512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.

The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.

A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.

v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>vt: push the tty_lock down into the map handling</title>
<updated>2012-04-24T23:14:14Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-04-24T10:06:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d1a33fa5573702394a4d09a9872f3f930c06d58'/>
<id>urn:sha1:5d1a33fa5573702394a4d09a9872f3f930c06d58</id>
<content type='text'>
When we do this it becomes clear the lock we should be holding is the vc
lock, and in fact many of our other helpers are properly invoked this way.

We don't at this point guarantee not to race the keyboard code but the results
of that appear harmless and that was true before we started as well.

We now have no users of tty_lock in the console driver...

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
