blob: d68bc49d1b6ca185894b442e817561f490c8fb11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From a4f7a5f0dd287895461cd007b23094459b6b88cb Mon Sep 17 00:00:00 2001
From: Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com>
Date: Wed, 28 Dec 2022 15:17:24 +0900
Subject: [PATCH 17/17] drm-lease: Fix incorrect drawing with portrait
orientation
Signed-off-by: Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com>
---
psplash-drm.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/psplash-drm.c b/psplash-drm.c
index a5aff90..c20df13 100644
--- a/psplash-drm.c
+++ b/psplash-drm.c
@@ -736,6 +736,23 @@ PSplashDRM* psplash_drm_new(int angle, int dev_id)
drm->canvas.angle = angle;
drm->canvas.rgbmode = RGB888;
+ /*
+ * There seems some difference about handling portrait angle between
+ * pure drm vs drm-lease. We'd use a method as same with psplash-fb
+ * for drm-lease devices.
+ */
+ if (drm_lease_name) {
+ switch (angle) {
+ case 270:
+ case 90:
+ drm->canvas.width = modeset_list->height;
+ drm->canvas.height = modeset_list->width;
+ break;
+ default:
+ break;
+ }
+ }
+
return drm;
error:
psplash_drm_destroy(drm);
--
2.25.1
|