5e5a30b7 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: simplify getting active_console size
We can get the active console dimension regardless of its kind, by simply giving NULL as argument. It will fallback with the given value when the dim
ui/console: simplify getting active_console size
We can get the active console dimension regardless of its kind, by simply giving NULL as argument. It will fallback with the given value when the dimensions aren't known.
This will also allow to move the code in a separate unit more easily.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-33-marcandre.lureau@redhat.com>
show more ...
|
60cb14b4 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: move some text console initialization to qom handlers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <2023083
ui/vc: move some text console initialization to qom handlers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-32-marcandre.lureau@redhat.com>
show more ...
|
98ee9dab | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: fold text_console_do_init() in vc_chr_open()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230830093843.3531473-31-marcandre.lureau@redhat.com> |
58d58708 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: move graphic fields to QemuGraphicConsole
Move fields specific to graphic console to the console subclass.
qemu_console_get_head() is adapated to accomodate QemuTextConsole, and always
ui/console: move graphic fields to QemuGraphicConsole
Move fields specific to graphic console to the console subclass.
qemu_console_get_head() is adapated to accomodate QemuTextConsole, and always returns 0.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-30-marcandre.lureau@redhat.com>
show more ...
|
b2bb9cc4 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: move text fields to QemuTextConsole
Now we can instantiate the specific console with its own fields. Pass the most appropriate type to the various functions, and cast up to QEMU_CONSOLE as ne
ui/vc: move text fields to QemuTextConsole
Now we can instantiate the specific console with its own fields. Pass the most appropriate type to the various functions, and cast up to QEMU_CONSOLE as necessary.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-29-marcandre.lureau@redhat.com>
show more ...
|
463c6b19 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: free more QemuConsole resources
This code path is probably not executed at this point, since console aren't being released.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com
ui/console: free more QemuConsole resources
This code path is probably not executed at this point, since console aren't being released.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-28-marcandre.lureau@redhat.com>
show more ...
|
b97a76d0 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: move cursor_timer initialization to QemuTextConsole class
The timer is only relevant when a text console exists.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: D
ui/vc: move cursor_timer initialization to QemuTextConsole class
The timer is only relevant when a text console exists.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-27-marcandre.lureau@redhat.com>
show more ...
|
cfde05d1 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: allocate ui_timer in QemuConsole
Although at this point only QemuGraphicConsole have hw_ops that implements ui_info() callback, it makes sense to keep the code in the base QemuConsole, t
ui/console: allocate ui_timer in QemuConsole
Although at this point only QemuGraphicConsole have hw_ops that implements ui_info() callback, it makes sense to keep the code in the base QemuConsole, to simplify conditions for the caller.
As of now, the code didn't reach a NULL timer because dpy_set_ui_info() checks if dpy_ui_info_supported() (hw_ops->ui_info != NULL), which is false for text_console_ops. This is a bit fragile, let simply allocate and free the timer in the base class.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-26-marcandre.lureau@redhat.com>
show more ...
|
7fa4b804 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: update the head from unused QemuConsole
When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups.
Signed-off-by: Marc-André
ui/console: update the head from unused QemuConsole
When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-25-marcandre.lureau@redhat.com>
show more ...
|
f9411aae | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: specialize console_lookup_unused()
graphics_console_init() is expected to return a graphic console.
The function doesn't need to be exported.
We are going to specialize further QemuGra
ui/console: specialize console_lookup_unused()
graphics_console_init() is expected to return a graphic console.
The function doesn't need to be exported.
We are going to specialize further QemuGraphicConsole & QemuTextConsole. The two will not be interchangeable anymore.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-24-marcandre.lureau@redhat.com>
show more ...
|
34b77515 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: remove new_console()
The constructor helper isn't of much used now.
"head" is only specified for graphic console (and default to 0), and we are going to move it to QemuGraphicConsole ne
ui/console: remove new_console()
The constructor helper isn't of much used now.
"head" is only specified for graphic console (and default to 0), and we are going to move it to QemuGraphicConsole next.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-23-marcandre.lureau@redhat.com>
show more ...
|
ba0ec5c2 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: register the console from qemu_console_init()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <2023083009
ui/console: register the console from qemu_console_init()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-22-marcandre.lureau@redhat.com>
show more ...
|
c105d60f | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: instantiate a specific console type
This will allow to move code/data to the specific console types.
Replace console_type_t with object type check.
QemuConsole can be abstract.
Signed
ui/console: instantiate a specific console type
This will allow to move code/data to the specific console types.
Replace console_type_t with object type check.
QemuConsole can be abstract.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-21-marcandre.lureau@redhat.com>
show more ...
|
b208f745 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: introduce different console objects
Boilerplate code to introduce different object types for the different console types.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
ui/console: introduce different console objects
Boilerplate code to introduce different object types for the different console types.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-20-marcandre.lureau@redhat.com>
show more ...
|
098d57e7 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: change new_console() to use object initialization
Object construction should be done in respective object instance and class handlers.
Introduce qemu_console_register() to split out the
ui/console: change new_console() to use object initialization
Object construction should be done in respective object instance and class handlers.
Introduce qemu_console_register() to split out the registration logic.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-19-marcandre.lureau@redhat.com>
show more ...
|
e265917c | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: use OBJECT_DEFINE_TYPE for QemuConsole
The following patch will move some object initialization to the corresponding handlers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.
ui/console: use OBJECT_DEFINE_TYPE for QemuConsole
The following patch will move some object initialization to the corresponding handlers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-18-marcandre.lureau@redhat.com>
show more ...
|
6505fd8d | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: move VCCharDev specific fields out of QemuConsole
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093
ui/vc: move VCCharDev specific fields out of QemuConsole
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-17-marcandre.lureau@redhat.com>
show more ...
|
4c946b7f | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: pass VCCharDev to VC-specific functions
Even though they actually use more of QemuConsole at this point, it makes it clearer those functions are only used from the chardev implementation.
Si
ui/vc: pass VCCharDev to VC-specific functions
Even though they actually use more of QemuConsole at this point, it makes it clearer those functions are only used from the chardev implementation.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-16-marcandre.lureau@redhat.com>
show more ...
|
d7c634aa | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: fold text_update_xy()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-15-marcandre.lur
ui/vc: fold text_update_xy()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-15-marcandre.lureau@redhat.com>
show more ...
|
3be82c6a | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: replace variable with static text attributes default
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830
ui/vc: replace variable with static text attributes default
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-14-marcandre.lureau@redhat.com>
show more ...
|
8c63667b | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: move VCChardev declaration at the top
To allow easier refactoring in following patches.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berran
ui/vc: move VCChardev declaration at the top
To allow easier refactoring in following patches.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-13-marcandre.lureau@redhat.com>
show more ...
|
6657e41c | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/vc: VC always has a DisplayState now
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-12-ma
ui/vc: VC always has a DisplayState now
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-12-marcandre.lureau@redhat.com>
show more ...
|
dc6984bd | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: new_console() cannot fail
There is no code path that could allow a NULL return there.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <ber
ui/console: new_console() cannot fail
There is no code path that could allow a NULL return there.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-11-marcandre.lureau@redhat.com>
show more ...
|
2fd319cf | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: get the DisplayState from new_console()
There is no obvious reason to defer text console initialization. We can simply take the global display state in new_console().
This simplify some
ui/console: get the DisplayState from new_console()
There is no obvious reason to defer text console initialization. We can simply take the global display state in new_console().
This simplify somewhat the code to allow moving the VC to a separate unit.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-10-marcandre.lureau@redhat.com>
show more ...
|
cbcf0fa8 | 30-Aug-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
ui/console: drop have_gfx
All usages have been removed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093
ui/console: drop have_gfx
All usages have been removed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-9-marcandre.lureau@redhat.com>
show more ...
|