Commit 9c138af9 authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/tty3270: convert lines during output

The length of the screen line is variable with the 3270 protocol.
For each attribute (foreground, background color, highlighting etc)
we need 3 bytes: the set attribute order, the attribute number, and
the value of the attribute. This means that depending on screen content,
we might end up 3*3 bytes addtional data for a single character.

Allocating the maximum possible amount of memory is quite a lot, and
we cannot easily extend the lines by allocating memory because we
might get called from atomic context. Failing to extend the memory
would also be bad as that would mean that we could miss kernel messages
in oom conditions. Therefore move the conversion to a 3270 datastream
to tty3270_update(), and use only single line buffer.
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Tested-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent ec1b0a33
This diff is collapsed.
...@@ -219,7 +219,6 @@ void raw3270_unregister_notifier(struct raw3270_notifier *); ...@@ -219,7 +219,6 @@ void raw3270_unregister_notifier(struct raw3270_notifier *);
struct string struct string
{ {
struct list_head list; struct list_head list;
struct list_head update;
unsigned long size; unsigned long size;
unsigned long len; unsigned long len;
char string[]; char string[];
...@@ -245,7 +244,6 @@ alloc_string(struct list_head *free_list, unsigned long len) ...@@ -245,7 +244,6 @@ alloc_string(struct list_head *free_list, unsigned long len)
list_del(&cs->list); list_del(&cs->list);
cs->len = len; cs->len = len;
INIT_LIST_HEAD(&cs->list); INIT_LIST_HEAD(&cs->list);
INIT_LIST_HEAD(&cs->update);
return cs; return cs;
} }
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment