diff mbox series

[SWUpdateGUI] Switch to drm

Message ID 20240809150920.648440-1-stefano.babic@swupdate.org
State New
Delegated to: Stefano Babic
Headers show
Series [SWUpdateGUI] Switch to drm | expand

Commit Message

Stefano Babic Aug. 9, 2024, 3:09 p.m. UTC
Framebuffer is discouraged and drm should be used.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 CMakeLists.txt  | 2 +-
 rec-lvgl-init.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--
2.34.1

Comments

ayoub...@googlemail.com Aug. 12, 2024, 1:10 p.m. UTC | #1
Hi Stefano,

doesn't this change require librm dependency ?

Best regards


On Friday, August 9, 2024 at 5:09:27 PM UTC+2 Stefano Babic wrote:

> Framebuffer is discouraged and drm should be used.
>
> Signed-off-by: Stefano Babic <stefan...@swupdate.org>
> ---
> CMakeLists.txt | 2 +-
> rec-lvgl-init.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 156dfb0..0b2c040 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -1,5 +1,5 @@
>
> -cmake_minimum_required( VERSION 3.1 )
> +cmake_minimum_required( VERSION 3.15 )
> project( recovery_gui )
>
>
> diff --git a/rec-lvgl-init.c b/rec-lvgl-init.c
> index 8f34d4a..6e8f922 100644
> --- a/rec-lvgl-init.c
> +++ b/rec-lvgl-init.c
> @@ -36,13 +36,13 @@ static void gui_lvgl_initializeDisplayDriver(void)
> const struct RecoveryParameters *RecoveryParameters =
> util_config_getRecoveryParameters();
>
> - lv_display_t *displayObj = lv_linux_fbdev_create();
> + lv_display_t *displayObj = lv_linux_drm_create();
> if (NULL == displayObj) {
> LV_LOG_ERROR("lv_linux_fbdev_create() failed.");
> exit(1);
> }
>
> - lv_linux_fbdev_set_file(displayObj, "/dev/fb");
> + lv_linux_drm_set_file(displayObj, "/dev/dri/card0", -1);
> lv_display_set_default(displayObj);
>
> const lv_display_rotation_t displayRotation =
> --
> 2.34.1
>
>
diff mbox series

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 156dfb0..0b2c040 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@ 

-cmake_minimum_required( VERSION 3.1 )
+cmake_minimum_required( VERSION 3.15 )
 project( recovery_gui )


diff --git a/rec-lvgl-init.c b/rec-lvgl-init.c
index 8f34d4a..6e8f922 100644
--- a/rec-lvgl-init.c
+++ b/rec-lvgl-init.c
@@ -36,13 +36,13 @@  static void gui_lvgl_initializeDisplayDriver(void)
 	const struct RecoveryParameters *RecoveryParameters =
 		util_config_getRecoveryParameters();

-	lv_display_t *displayObj = lv_linux_fbdev_create();
+	lv_display_t *displayObj = lv_linux_drm_create();
 	if (NULL == displayObj) {
 		LV_LOG_ERROR("lv_linux_fbdev_create() failed.");
 		exit(1);
 	}

-	lv_linux_fbdev_set_file(displayObj, "/dev/fb");
+	lv_linux_drm_set_file(displayObj, "/dev/dri/card0", -1);
 	lv_display_set_default(displayObj);

 	const lv_display_rotation_t displayRotation =