Commit Graph

105 Commits

Author SHA1 Message Date
Lefucjusz
32c6769cb6 [BH-1657][BH-1833][BH-1854] Add WFI and SDRAM self-refresh mode
* Added mechanism enabling CPU to
enter WFI mode when the OS is
in idle, what results in large
power consumption reduction.
* Added mechanism to switch SDRAM to
self-refresh mode before entering
WFI, what resulted in further power
consumption reduction.
2024-01-22 12:32:35 +01:00
Dawid Wojtas
6cc2bc9df4 [BH-1830] Fix eink crash while refreshing
If the previous refresh failed the driver tried to add a new frame
in the front of the vector. In some cases, the updateFrames could
be empty, and adding a frame caused a system crash.
2023-11-23 08:30:05 +01:00
Lukasz Mastalerz
d9a1194e6f [BH-1688] Create a standard for logs
* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
  line number is now before function name
2023-10-23 15:17:44 +02:00
Lukasz Mastalerz
a61fb7a0e2 [MOS-1014] Screen remains black after turning off the phone with dark mode enabled
Regression fixed by adjusting wipeout function.
2023-08-09 13:42:49 +02:00
Lukasz Mastalerz
882a6d0896 [BH-1714] Handling eink initialization errors
Added error detection while eink initialization.
Added mechanism to reinitialize the eink in case of error.
2023-07-25 12:55:06 +02:00
Lukasz Mastalerz
21171bb474 [BH-1714] Eink refactor and error handling
Cleanup and refactor for eink code.
Changed turning on/off procedure.
Add error handling.
2023-07-14 10:23:42 +02:00
Lefucjusz
f79313e397 [BH-1661] E-ink display power management tweaks
Tweaks and changes required to optimize
power consumption for Harmony.
2023-04-14 13:13:52 +02:00
Lefucjusz
c057799904 [MOS-887] Fix black screen left after power off
Fix of the issue that after powering off
the phone with dark mode enabled the
screen remained black instead of being
cleared to white.
2023-01-25 18:59:49 +01:00
Adam Wulkiewicz
61145cf622 [MOS-550] Disable deep partial refresh
Always refresh the whole screen if deep refresh is required.
2022-12-02 15:18:26 +01:00
Adam Wulkiewicz
866f556935 [BH-000] Disable refresh cancel log
Put it behind #ifdef like the rest of eink refresh logs.
2022-10-21 11:19:06 +02:00
Adam Wulkiewicz
49bbaf51a0 [MOS-550] Improve refresh of the display
1. Implement partial refresh.
2. Implement refresh canceling mechanism.
3. Refactor some parts of the gui and display code.

ad 1.
- Detect parts of the screen changed since last update and merge them
  into bigger regions. These regions defines parts of the context sent
  to the display.
- Refresh the region covering all of the parts since this is the most
  time consuming part and the size of the refreshed region doesn't
  change the time much.
- Refresh the whole screen if deep refresh is requested and previously
  fast refresh was used. This is needed to prevent unwanted artifacts
  in some cases.

ad 2.
- Separate display update and refresh logic.
- Divide image display message handling into two handlers, one updating
  and other one refreshing the screen.
- Add cancel refresh message and use it to cancel refresh during update.
- Store sum of refresh regions gathered during updates to refresh them
  all at once at the end.
2022-10-11 20:00:33 +02:00
Adam Wulkiewicz
f7771013f9 [MOS-550] Revert - Implement eink partial refresh
This reverts commit 41d6e786b6.
2022-09-27 13:14:54 +02:00
Adam Wulkiewicz
41d6e786b6 [MOS-550] Implement eink partial refresh
Detect parts of the screen changed since last update and merge them into
bigger regions. These regions defines parts of the context sent to the
display.
Refresh the region covering all of the parts since this is the most time
consuming part and the size of the refreshed region doesn't change the
time much.
Refresh the whole screen if deep refresh is requested and previously
fast refresh was used. This is needed to prevent unwanted artifacts in
some cases.

Refactor some parts of the gui and display code.
2022-09-22 15:50:30 +02:00
Dawid Wojtas
b7330da36c [MOS-662][MOS-301] Fix E-ink shutdown while restoring data
While restoring system data the timer can turn off power of E-ink
to save the power. To avoid this situation we need to power on
the E-ink before wiping out the display. The restore procedure
also performs reversing services list to close. In this case
we do it twice so the order is wrong.
2022-08-30 11:00:04 +02:00
Maciej Gibowicz
ed079151ac [MOS-638] Fix poor phone responsiveness
Sometimes it took a long time to redraw
the screen with the USB cable unplugged.
2022-08-04 11:28:26 +02:00
Paweł Joński
870250433a [MOS-298] HALize ServiceEink
Add HAL to ServiceEink
Remove dead code from Linux eink substitute
Fix LUTS.bin refresh problems on simulator
2022-06-29 13:37:20 +02:00
Mateusz Piesta
97e9d7b79f [BH-1449] Fix gui/eink dependencies
* Dependencies between service-gui and service-eink
have been correctly defined.
* System close routine was replaced with the sequential one
which should solve many bell issues.
* It also fixes BH-1406 and BH-1442.
* Fixed some weird CMake issues in module-audio and
several other modules.
* Fixed service-gui closing routine
* Removed unneeded messages/states from service-gui/eink.
* Enhanced app-mgr closing routine. Fixed closing action handling.
2022-04-26 13:47:12 +02:00
Paweł Joński
3ad2e0f7da [BH-1442] Eliminate race on shutdown screen
There is another race still possible, but far less likely
2022-04-14 12:48:03 +02:00
Maciej Gibowicz
dbde19f8d8 [MOS-117] Faster eInk sleep after screen redraw
eInk is turned on for 2 sec to redraw the screen
- so far it was 3.8 sec
2022-03-25 09:31:00 +01:00
GravisZro
e59cd4036b [MOS-245] Fix errant spaces
It appears in the past a major edit was made but had used a regex to
change some text which resulted in an errant space between the
enumuneration/struct/class name and the scope resolution operator.
These errant spaces have been removed.
2022-02-24 08:47:20 +01:00
Alek Rudnik
3e7b94dc05 [EGD-8137] Fix system pre closure procedure
Added some services specific implementations of pre closure procedure.
If one request pre closre, all mesagges (except system ones) recieved
by service are ignored.
2022-01-18 16:28:33 +01:00
Piotr Tański
bc7dc5b634 [EGD-7779] Dark mode implemented
Experimental dark mode feature implemented.
2021-10-26 15:31:32 +02:00
Maciej Janicki
8a3b2e2a89 [BH-943] Fix screen clean after exit
Remove cleaning screan after shutdown.
2021-10-15 11:34:20 +02:00
Marcin Smoczyński
57874cab33 [BH-912] Improve sys module structure
Improve structure of the module sys. Problems within this module
prevents from linking others.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-24 10:01:19 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-23 15:14:40 +02:00
Marcin Smoczyński
e6db00cb0c [EGD-7486] Increase stack sizes
Increase stack sizes of the eink service and the system watchdog. During
stability tests stack-overflows were observed for both threads.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
(cherry picked from commit f9a23a7b58)
2021-09-15 19:18:58 +02:00
Piotr Tański
90e7a48198 [EGD-7362] Merge release/0.76.1 into master
Merge release/0.76.1 into master.
2021-09-02 11:12:59 +02:00
Lukasz Skrzypczak
7fee0d9cfb [BH-378] Utils move log to library
Moved log to separate library
2021-06-08 12:24:29 +02:00
Paweł Joński
5ad878c6c4 [BH-371] Replace gsl with mainline submodule and move to third-party
Replacing loose gsl files with gsl mainline project as submodule
and moving it to third-party
2021-06-07 09:30:04 +02:00
Pawel.Paprocki
db8c1d35e5 [EGD-6739] Fix Enable change of display resolution on simulator
Define screen dimesions in one place
2021-05-14 08:50:11 +02:00
Radoslaw Wicik
8b24846b92 [BH-422] Fix CMake in service GUI
Refactor CMakeLists.txt for cleaner and simpler code.
2021-05-13 13:51:08 +02:00
Piotr Tański
efef7dcf7f [EGD-6111] Timers refactored
Deep refactor of system timers.
2021-03-19 14:09:35 +01:00
Maciej Gibowicz
677e18cada [EGD-5658] Add eInk CPU frequency hold
While the screen is being redrawn,
we block CPU frequency decreasing
2021-03-15 08:54:40 +01:00
Piotr Tański
4de9970108 [EGD-5952] Changed service stack depths acc. to real usage
Stack depth changed for:
- Application Manager
- Service Bluetooth
- Bluetooth Worker
- Service Eink
- Service GUI
- Application Special Input
2021-03-11 11:15:29 +01:00
Wojtek Rzepecki
ef63ee267c [EGD-5304] Add new way of system close
Unified method of closing
the system orchestrated by
system manager
2021-03-04 15:55:55 +01:00
Wojtek Rzepecki
4d20ed0971 [EGD-5967] Add blank screen when off
Present blank screen to
inform the user that phone
is off
2021-03-02 15:29:15 +01:00
Maciej-Mudita
11aa4c7ffb [EGD-5382] Add LowPower CpuSentinels
In order to synchronize the Low Power mode, the services were
immediately informed about the frequency change,
so that they can update their resources (e.g. PWM filling)
and services may request the maximum CPU frequency in order
to perform a task (e.g. screen redraw, telephone conversation)
2021-02-12 09:40:36 +01:00
Mateusz Grzywacz
d98e789a8d [EGD-5193] Eink - Power off the display
The eink has to be powered off sometimes. Implement a
timer of arbitrary timeout (3,8s) to power off the
display if it's not used.
2021-02-10 23:16:51 +01:00
Maciej-Mudita
ec56afc933 [EGD-5381] Add Low Power Drivers
Peripherals clock synchronization dependent on PLL2
2021-02-10 08:46:13 +01:00
Piotr Tański
bc4d32c7d8 [EGD-5158] Change access to the bus methods
The bus is now accessible only via Service object.
2021-02-08 16:56:42 +01:00
Mateusz Grzywacz
4f9cd7a11f [EGD-5394] Eink - reuse temperature for waveforms
Do not waste time right before refresh of the eink
display to measure new temperature. Assume that
the measurement from early frame prepare stage is valid.
It has only to be valid for only <time of rendering the frame>,
which is less than a 1000ms.
2021-01-29 15:05:29 +01:00
Mateusz Grzywacz
65023ca120 [EGD-5256] Eink display - speed up in some scenarios
Causes slight speed-up in specific scenarios
(changing windows, also: then rapid navigation)
also: on a regular basis (shaky temperature measumt.)
2021-01-22 20:03:26 +01:00
Piotr Tański
3f29c30bed [EGD-4968] Change GUI service to optimize flow and memory management
Gui and Eink services refactor.
Displaying frames performance optimization.
Critical resources management.
2021-01-08 16:36:12 +01:00
Piotr Tański
402a741637 [EGD-5026] Change Eink service code structure
Refactor.
2021-01-08 16:36:12 +01:00
jimmorrisson
6ce0dc4df3 [EGD-4751] Change: new filesystem handling implementation in module services. (#1151)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module services. It also contains minor fixes in module-services.
2020-12-10 21:04:51 +01:00
Piotr Tanski
22102c4ba5 [EGD-4200] Message handling refactored. (#974) 2020-11-06 15:24:59 +01:00
Adam
8bab7f0031 EGD-3585 ServiceGUI and ServiceEink initial cleanup (#953)
* EGD-3585 SerwiceGUI and ServiceEink initial cleanup

* moved code to one function per message handling
* removed dead code from comments
* added Service.cpp demangling to debug messages for clear output
* added Response value to return messages to `connect()`
2020-11-03 17:27:00 +01:00
Adam
0422d48f46 EGD-4178 EINK inverted mode (#915)
* EGD-4178 Added simplistic eink invert mode option
2020-10-30 10:37:56 +01:00
Radosław Wicik
b1736f63ca [EGD-3852] convert to libs services: gui, eink (#933) 2020-10-29 13:06:32 +01:00
Radosław Wicik
d5de12f7ce [EGD-3852] clean include in service (#928) 2020-10-28 15:19:24 +01:00