You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
@@ -27,21 +27,24 @@ In addition to the SoC's DSS, boards often contain external display bridges (for
27
27
28
28
.. ifconfig:: CONFIG_part_variant in ('J721E', 'J721S2', 'J784S4','J742S2')
29
29
30
-
.. Image:: /images/DSS7_HW.png
30
+
.. figure:: /images/DSS7_HW.png
31
31
32
-
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM65X', 'AM62AX', 'AM62PX', 'J722S')
32
+
Overview of DSS Hardware
33
33
34
-
.. Image:: /images/DSS7Lite_HW.png
34
+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM65X', 'AM62AX', 'AM62PX', 'J722S')
35
35
36
+
.. figure:: /images/DSS7Lite_HW.png
36
37
37
-
The above image gives an overview of the DSS hardware.
38
+
Overview of DSS Hardware
38
39
39
40
.. ifconfig:: CONFIG_part_variant in ('AM62PX', 'J722S')
40
41
41
42
- The |__PART_FAMILY_NAME__| SoC has 2 instances of the DSS7-UL, connected to different display peripherals, inside the SoC.
42
43
- **Note:** The Video Pipelines from one instance of DSS **cannot** overlay image planes via the Overlay Managers of another DSS.
43
44
44
-
The arrows show how pipelines are connected to overlay managers, which are further connected to video-ports, which finally create an encoded pixel stream for display on the LCD or monitor.
The arrows show how pipelines are connected to overlay managers, which are further connected to video-ports, which finally create an encoded pixel stream for display on the LCD or monitor.
45
48
46
49
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
47
50
@@ -239,7 +242,7 @@ The mapping of DRM entities to DSS hardware is roughly as follows:
239
242
+===========+================================+
240
243
| plane | DSS pipeline |
241
244
+-----------+--------------------------------+
242
-
|crtc| DSS videoport |
245
+
|CRTC| DSS videoport |
243
246
+-----------+--------------------------------+
244
247
| encoder | Internal and external bridges |
245
248
+-----------+--------------------------------+
@@ -502,11 +505,17 @@ tidss supports configuration via DRM properties. These are standard DRM properti
If the frame exceeds the internal buffer size for the given SoC, the
813
+
``SELF_REFRESH`` property still reads back as 1, but the driver does not switch
814
+
that plane into self-refresh hardware mode. The plane keeps displaying live
815
+
content as normal; nothing goes blank or freezes. To make self-refresh take
816
+
effect, reduce the plane's resolution or pixel format so the frame fits within
817
+
the internal buffer size. The driver then activates self-refresh automatically
818
+
on the next commit, without needing to clear and re-set the property.
819
+
820
+
.. code-block:: console
821
+
822
+
$ modetest -M tidss -w 35:SELF_REFRESH:1
823
+
824
+
In this example, ``SELF_REFRESH`` is enabled on plane 35. The plane keeps displaying
825
+
whatever frame was on screen when userspace set the property. The driver drops any
826
+
later frame that an application pushes to the plane while the property remains set.
827
+
The combined example under **Always On Display** below shows how ``kmstest``
828
+
exercises ``SELF_REFRESH`` together with ``ALWAYS_ON_DISPLAY``.
829
+
830
+
.. rubric:: Always On Display
831
+
832
+
Keep the display pipeline powered after the application exits. With additional
833
+
firmware-side support, the pipeline also stays powered across system suspend and
834
+
resume; see the note that follows.
835
+
836
+
The ``ALWAYS_ON_DISPLAY`` CRTC property is a boolean property. When set to 1, the
837
+
driver keeps the video port's power domain powered, along with the power domains
838
+
of its bridges and PHYs (for example DSI and D-PHY). This holds for that video
839
+
port's entire pipeline even after the last DRM client that uses the CRTC exits,
840
+
and across system suspend and resume. This avoids incurring the cost of hardware
841
+
reinitialization of the DSI and D-PHY link the next time an application opens the
842
+
device, at the cost of keeping that hardware powered while idle.
843
+
844
+
The driver uses two separate mechanisms to keep tidss and every bridge/PHY device
845
+
in the pipeline powered:
846
+
847
+
- ``pm_runtime_get_noresume()`` on each device, which prevents its runtime PM
848
+
``suspend`` callback from running and therefore blocks runtime autosuspend for
849
+
tidss itself, not only the external bridges/PHYs.
850
+
- ``dev_pm_genpd_set_always_on()``, which marks the device's power domain as
851
+
always-on, blocking both runtime power-off and the power-off that would
852
+
otherwise happen when the system suspends.
853
+
854
+
The driver removes both mechanisms once userspace clears ``ALWAYS_ON_DISPLAY`` on
855
+
all CRTCs that had it set.
856
+
857
+
.. ifconfig:: CONFIG_part_variant in ('AM62LX')
858
+
859
+
.. note::
860
+
861
+
Keeping the display pipeline powered across the Linux driver's own suspend and resume
862
+
calls is handled entirely by the ``ALWAYS_ON_DISPLAY`` property as described above.
863
+
However, surviving an actual system-wide low power state (for example
864
+
``echo mem > /sys/power/state``) additionally requires cooperation from the
865
+
device firmware, which must also be told to keep the display power rails on
866
+
during that low power state. This firmware-side support is available on
867
+
AM62LX as the :ref:`dss-plus-deepsleep` low power mode.
868
+
869
+
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')
870
+
871
+
.. note::
872
+
873
+
Keeping the display pipeline powered across the Linux driver's own suspend/resume
874
+
calls is handled entirely by the ``ALWAYS_ON_DISPLAY`` property as described above.
875
+
However, surviving an actual system-wide low power state (for example
876
+
``echo mem > /sys/power/state``) additionally requires cooperation from the
877
+
device firmware, which must also be told to keep the display power rails on
878
+
during that low power state. This firmware-side support is only available on
879
+
the AM62LX SoC and no other SoC supports it. For other SoCs,
880
+
``ALWAYS_ON_DISPLAY`` keeps the pipeline powered across application handoff,
881
+
thus avoiding runtime suspend even if no application is holding a reference,
882
+
but the display should be assumed to lose power during a full system
883
+
suspend and resume cycle.
884
+
885
+
.. code-block:: console
886
+
887
+
$ modetest -M tidss -w 42:ALWAYS_ON_DISPLAY:1
888
+
889
+
In this example, CRTC 42 has ``ALWAYS_ON_DISPLAY`` set to 1. Once the application
890
+
that uses this CRTC exits, the video port and its associated bridge/PHY power
891
+
domains remain powered on, so a later application can reuse the pipeline without
892
+
incurring the cost of hardware reinitialization of the DSI and D-PHY link.
893
+
894
+
When ``ALWAYS_ON_DISPLAY`` is combined with ``SELF_REFRESH`` on a plane of the same
895
+
CRTC, the video port itself is also kept running (instead of being disabled) once
896
+
the application exits, so the frame looped by ``SELF_REFRESH`` continues to be
897
+
displayed even after application handoff or system suspend/resume.
898
+
899
+
To keep the frame looped by ``SELF_REFRESH`` displayed even after application
900
+
handoff or system suspend and resume, set ``ALWAYS_ON_DISPLAY`` and
901
+
``SELF_REFRESH`` on the same CRTC. This keeps the video port running after the
902
+
application exits.
903
+
904
+
.. code-block:: console
905
+
906
+
$ modetest -M tidss -w 42:ALWAYS_ON_DISPLAY:1
907
+
$ modetest -M tidss -w 35:SELF_REFRESH:1
908
+
$ kmstest --flip
909
+
910
+
In this combined example, CRTC 42 has ``ALWAYS_ON_DISPLAY`` set and plane 35
911
+
(belonging to that CRTC) has ``SELF_REFRESH`` set. ``kmstest --flip`` is then
912
+
run to exercise page-flipping on the display. While ``SELF_REFRESH`` remains
913
+
set, new frames that ``kmstest`` presents get dropped by the driver. The plane
914
+
will instead continue looping the earlier frame. This will continue even after
915
+
``kmstest`` exits because the video port is not torn down.
916
+
773
917
Buffers
774
918
-------
775
919
776
920
The buffers used for tidss can be either allocated from tidss or imported from some other driver (dmabuf import). All buffers must be contiguous.
777
-
778
921
tidss supports generic DRM dumb buffers. Dumb buffers are allocated using the generic DRM_IOCTL_MODE_CREATE_DUMB ioctl.
779
922
780
923
781
924
fbdev emulation (/dev/fb0)
782
925
--------------------------
783
926
784
927
DRM framework supports "emulating" the legacy fbdev API. This feature can be enabled or disabled in the kernel config (CONFIG_DRM_FBDEV_EMULATION). The fbdev emulation offers only basic feature set and the fb is shown on the first display. Fbdev emulation is mainly intended for kernel console or boot splash screens.
0 commit comments