OSDN Git Service

drm_hwcomposer: Choose client layer range to achieve minimal GPU load
authorRoman Stratiienko <roman.stratiienko@globallogic.com>
Fri, 13 Dec 2019 17:28:56 +0000 (19:28 +0200)
committerRoman Stratiienko <roman.stratiienko@globallogic.com>
Tue, 17 Dec 2019 16:50:01 +0000 (18:50 +0200)
commitb7b81cfba252c6dda77356fe5fd9cfd682c63a5d
tree1058c9c8b758b9f93925851a11fb7b4f1a074201
parent12b91a35816c97c640f235fc0ac46e81402270a8
drm_hwcomposer: Choose client layer range to achieve minimal GPU load

1. Allow CLIENT layer at any position.
2. Check all possible layer combination and choose most efficient
   based on total pixel operations value.

Use case 1 - Layer count is greater than available planes
Table shows difference before and after this commit for 4 or 2 planes cases:

```
z_order   layer      size        pixels  before(4)  after(4) before(2) after(2)
-
0         Wallpaper  1960x1080   2MiP    CLIENT     DEVICE   CLIENT    DEVICE
1         Launcher   1960x1080   2MiP    CLIENT     DEVICE   CLIENT    CLIENT
2         Status bar 1960x80     0.15MiP DEVICE     DEVICE   CLIENT    CLIENT
3         Nav. bar   1960x80     0.15MiP DEVICE     CLIENT   CLIENT    CLIENT
4         Cursor     24x24       576P    DEVICE     CLIENT   DEVICE    CLIENT

Total pixels merged by CLIENT (GPU)      4MiP  ->   0.15MiP  4.3MiP -> 2.3MiP
```

Use case 2 - Unsupported layer type in the middle (Dim layer, etc):
Table shows difference before and after this commit for 4 or 2 planes cases:

```
z_order   layer      size        pixels  before(4)  after(4) before(2) after(2)
-
0         App        1960x1080   2MiP    CLIENT     DEVICE   CLIENT    DEVICE
1         Status bar 1960x80     0.15MiP CLIENT     DEVICE   CLIENT    CLIENT
2         Nav. bar   1960x80     0.15MiP CLIENT     DEVICE   CLIENT    CLIENT
3         Dim layer  1960x1080   2MiP    CLIENT     CLIENT   CLIENT    CLIENT
4         Dialog     1000x500    0.5MiP  DEVICE     CLIENT   DEVICE    CLIENT

Total pixels merged by CLIENT (GPU)      4.3MiP ->  2.5MiP   4.3MiP -> 2.8MiP
```

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
drmhwctwo.cpp
include/drmhwctwo.h