Skip to content

Commit 1a1f3d2

Browse files
author
Devarsh Thakkar
committed
feat(DSS7): Document SELF_REFRESH and ALWAYS_ON_DISPLAY properties
Add the SELF_REFRESH (plane) and ALWAYS_ON_DISPLAY (crtc) DRM properties to the tidss properties table, along with usage sections describing their behaviour and modetest examples, following the format used for the other documented properties. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
1 parent 599dcca commit 1a1f3d2

1 file changed

Lines changed: 131 additions & 0 deletions

File tree

  • source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,12 @@ tidss supports configuration via DRM properties. These are standard DRM properti
508508
+--------------------+----------+------------------------------------------------------------------------------------------------------+
509509
| GAMMA_LUT_SIZE | crtc | Number of elements in gammma lookup table. |
510510
+--------------------+----------+------------------------------------------------------------------------------------------------------+
511+
| SELF_REFRESH | plane | Boolean property. When set, plays the last displayed frame in a loop from the DSS internal buffer; |
512+
| | | the driver ignores new framebuffers submitted by userspace until userspace clears the property. |
513+
+--------------------+----------+------------------------------------------------------------------------------------------------------+
514+
| ALWAYS_ON_DISPLAY | crtc | Boolean property. When set, keeps the video port, along with its associated bridges and PHYs, |
515+
| | | powered on even after the last DRM client exits. |
516+
+--------------------+----------+------------------------------------------------------------------------------------------------------+
511517

512518
.. _testing_tidss_properties:
513519

@@ -770,6 +776,131 @@ For further information on gamma correction:
770776
* `<https://www.w3.org/TR/PNG-GammaAppendix.html>`__
771777
* `<https://www.benq.com/en-us/knowledge-center/knowledge/gamma-monitor.html>`__
772778

779+
.. rubric:: Self Refresh
780+
781+
Self refresh plays the last displayed frame in a loop by using the DSS internal buffer.
782+
783+
The ``SELF_REFRESH`` plane property is a boolean property. When userspace sets it
784+
to 1, the DSS hardware loops the last frame the plane received from its internal
785+
buffer. The driver silently ignores any new framebuffer that userspace submits
786+
while the property remains set. The display resumes normal operation, taking new
787+
framebuffers into account, only after userspace clears the property (sets it back
788+
to 0).
789+
790+
The size of this internal buffer varies per SoC family, and therefore so does the
791+
maximum frame size (width x height x bytes-per-pixel) that self-refresh can loop:
792+
793+
+----------------------------------+-----------------------------------+
794+
| SoC Family | Self-Refresh Internal Buffer Size |
795+
+==================================+===================================+
796+
| AM65X | 40 KB |
797+
+----------------------------------+-----------------------------------+
798+
| AM62X | 40 KB |
799+
+----------------------------------+-----------------------------------+
800+
| AM62AX | 40 KB |
801+
+----------------------------------+-----------------------------------+
802+
| AM62PX / J722S | 40 KB |
803+
+----------------------------------+-----------------------------------+
804+
| AM62LX | 20 KB |
805+
+----------------------------------+-----------------------------------+
806+
| J721E / J721S2 / J784S4 / J742S2 | 64 KB |
807+
+----------------------------------+-----------------------------------+
808+
809+
If the frame exceeds the internal buffer size for the given SoC, ``SELF_REFRESH``
810+
will not activate for that plane.
811+
812+
.. code-block:: console
813+
814+
$ modetest -M tidss -w 35:SELF_REFRESH:1
815+
816+
In this example, ``SELF_REFRESH`` is enabled on plane 35. The plane keeps displaying
817+
whatever frame was on screen when userspace set the property. The driver drops any
818+
later frame that an application pushes to the plane while the property remains set.
819+
The combined example under **Always On Display** below shows how ``kmstest``
820+
exercises ``SELF_REFRESH`` together with ``ALWAYS_ON_DISPLAY``.
821+
822+
.. rubric:: Always On Display
823+
824+
Keep the display pipeline powered after the application exits. With additional
825+
firmware-side support, the pipeline also stays powered across system suspend and
826+
resume; see the note that follows.
827+
828+
The ``ALWAYS_ON_DISPLAY`` crtc property is a boolean property. When set to 1, the
829+
driver keeps the video port's power domain powered, along with the power domains
830+
of its bridges and PHYs (for example DSI and D-PHY). This holds for that video
831+
port's entire pipeline even after the last DRM client using the crtc exits, and
832+
across system suspend and resume. This avoids incurring the cost of hardware
833+
reinitialisation of the DSI/D-PHY link the next time an application opens the
834+
device, at the cost of keeping that hardware powered while idle.
835+
836+
This is implemented with two complementary PM holds applied to tidss and to every
837+
bridge/PHY device in the pipeline:
838+
839+
- A ``pm_runtime_get_noresume()`` hold on each device, which prevents its runtime
840+
PM ``suspend`` callback from running and therefore gates runtime autosuspend for
841+
tidss itself, not only the external bridges/PHYs.
842+
- ``dev_pm_genpd_set_always_on()``, which marks the device's power domain as
843+
always-on, blocking both runtime power-off and the power-off that would
844+
otherwise happen when the system is suspended.
845+
846+
Both holds are released once ``ALWAYS_ON_DISPLAY`` is cleared on all crtcs that had
847+
it set.
848+
849+
.. ifconfig:: CONFIG_part_variant in ('AM62LX')
850+
851+
.. note::
852+
853+
Keeping the display pipeline powered across the Linux driver's own suspend/resume
854+
calls is handled entirely by the ``ALWAYS_ON_DISPLAY`` property as described above.
855+
However, surviving an actual system-wide low power state (for example
856+
``echo mem > /sys/power/state``) additionally requires cooperation from the
857+
device firmware, which must also be told to keep the display power rails on
858+
during that low power state. This firmware-side support is available on
859+
AM62LX as the :ref:`dss-plus-deepsleep` low power mode.
860+
861+
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')
862+
863+
.. note::
864+
865+
Keeping the display pipeline powered across the Linux driver's own suspend/resume
866+
calls is handled entirely by the ``ALWAYS_ON_DISPLAY`` property as described above.
867+
However, surviving an actual system-wide low power state (for example
868+
``echo mem > /sys/power/state``) additionally requires cooperation from the
869+
device firmware, which must also be told to keep the display power rails on
870+
during that low power state. This firmware-side support is currently only
871+
available on AM62LX. For other SoCs,``ALWAYS_ON_DISPLAY`` keeps the pipeline
872+
powered across application handoff, thus avoiding runtime suspend even if no
873+
application is holding a reference, but the display should be assumed to
874+
lose power during a full system suspend/resume cycle.
875+
876+
.. code-block:: console
877+
878+
$ modetest -M tidss -w 42:ALWAYS_ON_DISPLAY:1
879+
880+
In this example, crtc 42 has ``ALWAYS_ON_DISPLAY`` set to 1. Once the application
881+
using this crtc exits, the video port and its associated bridge/PHY power domains
882+
remain powered on, so a subsequent application can reuse the pipeline without
883+
incurring the cost of hardware reinitialisation of the DSI/D-PHY link.
884+
885+
When ``ALWAYS_ON_DISPLAY`` is combined with ``SELF_REFRESH`` on a plane of the same
886+
crtc, the video port itself is also kept running (instead of being disabled) once
887+
the application exits, so the frame looped by ``SELF_REFRESH`` continues to be
888+
displayed even after application handoff or system suspend/resume.
889+
890+
.. code-block:: console
891+
892+
$ modetest -M tidss -w 42:ALWAYS_ON_DISPLAY:1
893+
$ modetest -M tidss -w 35:SELF_REFRESH:1
894+
$ kmstest --flip
895+
896+
In this combined example, crtc 42 is first set to ``ALWAYS_ON_DISPLAY`` and plane 35
897+
(belonging to that crtc) is set to ``SELF_REFRESH``. ``kmstest --flip`` is then run to
898+
exercise page-flipping on the display. While ``SELF_REFRESH`` remains set, the new
899+
frames that ``kmstest`` flips in are dropped by the driver and the plane keeps
900+
looping the frame it was set to. When ``kmstest`` exits, the video port is not
901+
torn down (because both properties are set together), so the same frame keeps
902+
looping on screen even after the application exits.
903+
773904
Buffers
774905
-------
775906

0 commit comments

Comments
 (0)