Skip to content

Commit fade2fb

Browse files
committed
docs(linux): Add documentation regaring DSS feature: cropping
This documentation includes examples showing the cropped part of a frame. Signed-off-by: Swamil Jain <[email protected]>
1 parent 92f23db commit fade2fb

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed
130 KB
Loading
119 KB
Loading
136 KB
Loading

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

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ tidss supports configuration via DRM properties. These are standard DRM properti
490490
| GAMMA_LUT_SIZE | crtc | Number of elements in gammma lookup table. |
491491
+--------------------+----------+------------------------------------------------------------------------------------------------------+
492492

493-
Testing tidss properties with modetest
494-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
493+
Testing tidss properties with modetest and kmstest
494+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
495495

496496
As the name suggests, ``modetest`` is DRM based mode setting test program available along with libdrm.
497497
It is an easy-to-use tool to test different features provided by display HWs. The DRM driver for,
@@ -663,6 +663,54 @@ The following example was run on DSS7-UL and hence the pipe with scaling capabil
663663
664664
Note that the ``*2`` at the end of ``-P 41@38:400x400*2`` is the scaling factor.
665665

666+
- **Cropping**
667+
668+
Show only a part of the frame.
669+
670+
User can specify a frame of size ``w x h``, with an input color format ``cf``, a view ``w1 x h1`` starting at coordinates ``x1,y1`` and a plane ``w2 x h2`` to be displayed starting at coordinates ``x2,y2``. To display a cropped part of the frame(``w x h``), the below command can be used:
671+
672+
.. code-block:: console
673+
674+
$ kmstest -p <plane_number>:<x-coordinate>,<ycoordinate>-<plane_width>x<plane_height> -f <frame_width>x<frame_height>-<color-format> -v <view_number>:<x-coordinate>,<ycoordinate>-<view_width>x<view_height>
675+
676+
$ kmstest -p 0:x2,y2-w2xh2 -f wxh-cf -v x1,y1-w1xh1
677+
678+
679+
.. code-block:: console
680+
681+
$ kmstest -c hdmi -p 0:0,0-1000x1000 -f 1000x1000-XR24 -v 0,0-1000x1000
682+
Connector 1/@50: HDMI-A-1
683+
Crtc 1/@48: [email protected] 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48
684+
Plane 0/@31: 0,0-800x800
685+
Fb 55 1000x1000-XR24
686+
687+
The above example views a ``1000x1000`` frame on a ``1000x1000`` plane starting at ``0,0``.
688+
689+
.. Image:: /images/DSS_cropping_example_1.jpg
690+
691+
.. code-block:: console
692+
693+
$ kmstest -c hdmi -p 0:0,0-800x800 -f 1000x1000 -v 0,0-800x800
694+
Connector 1/@50: HDMI-A-1
695+
Crtc 1/@48: [email protected] 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48
696+
Plane 0/@31: 0,0-400x400
697+
Fb 55 1000x1000-XR24
698+
699+
The first example shows the whole ``800x800`` frame and second example shows cropped part ``(400x400)`` of the ``800x800`` frame.
700+
701+
.. Image:: /images/DSS_cropping_example_2.jpg
702+
703+
.. code-block:: console
704+
705+
$ kmstest -c hdmi -p 0:500,200-800x800 -f 1000x1000 -v 200,100-800x800
706+
Connector 1/@50: HDMI-A-1
707+
Crtc 1/@48: [email protected] 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48
708+
Plane 0/@31: 500,200-800x800
709+
Fb 54 1000x1000-XR24
710+
This example views the ``800x800`` cropped part of the frame starting at ``200,100`` on a ``800x800`` plane starting at ``500,200``.
711+
712+
.. Image:: /images/DSS_cropping_example_3.jpg
713+
666714

667715
Buffers
668716
-------

0 commit comments

Comments
 (0)