diff --git a/source/images/DSS_cropping_example_1.jpg b/source/images/DSS_cropping_example_1.jpg new file mode 100644 index 000000000..b2c16c11d Binary files /dev/null and b/source/images/DSS_cropping_example_1.jpg differ diff --git a/source/images/DSS_cropping_example_2.jpg b/source/images/DSS_cropping_example_2.jpg new file mode 100644 index 000000000..94ecfd230 Binary files /dev/null and b/source/images/DSS_cropping_example_2.jpg differ diff --git a/source/images/DSS_cropping_example_3.jpg b/source/images/DSS_cropping_example_3.jpg new file mode 100644 index 000000000..7bd72213f Binary files /dev/null and b/source/images/DSS_cropping_example_3.jpg differ diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst index d0f4b3894..37bc29c92 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst @@ -490,8 +490,8 @@ tidss supports configuration via DRM properties. These are standard DRM properti | GAMMA_LUT_SIZE | crtc | Number of elements in gammma lookup table. | +--------------------+----------+------------------------------------------------------------------------------------------------------+ -Testing tidss properties with modetest -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Testing tidss properties with modetest and kmstest +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As the name suggests, ``modetest`` is DRM based mode setting test program available along with libdrm. 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 Note that the ``*2`` at the end of ``-P 41@38:400x400*2`` is the scaling factor. +- **Cropping** + +Show only a part of the frame. + +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: + +.. code-block:: console + + $ kmstest -p :,-x -f x- -v :,-x + + $ kmstest -p 0:x2,y2-w2xh2 -f wxh-cf -v x1,y1-w1xh1 + + +.. code-block:: console + + $ kmstest -c hdmi -p 0:0,0-1000x1000 -f 1000x1000-XR24 -v 0,0-1000x1000 + Connector 1/@50: HDMI-A-1 + Crtc 1/@48: 1920x1080@59.93 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48 + Plane 0/@31: 0,0-800x800 + Fb 55 1000x1000-XR24 + +The above example views a ``1000x1000`` frame on a ``1000x1000`` plane starting at ``0,0``. + + .. Image:: /images/DSS_cropping_example_1.jpg + +.. code-block:: console + + $ kmstest -c hdmi -p 0:0,0-800x800 -f 1000x1000 -v 0,0-800x800 + Connector 1/@50: HDMI-A-1 + Crtc 1/@48: 1920x1080@59.93 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48 + Plane 0/@31: 0,0-400x400 + Fb 55 1000x1000-XR24 + +The first example shows the whole ``800x800`` frame and second example shows cropped part ``(400x400)`` of the ``800x800`` frame. + + .. Image:: /images/DSS_cropping_example_2.jpg + +.. code-block:: console + + $ kmstest -c hdmi -p 0:500,200-800x800 -f 1000x1000 -v 200,100-800x800 + Connector 1/@50: HDMI-A-1 + Crtc 1/@48: 1920x1080@59.93 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48 + Plane 0/@31: 500,200-800x800 + Fb 54 1000x1000-XR24 +This example views the ``800x800`` cropped part of the frame starting at ``200,100`` on a ``800x800`` plane starting at ``500,200``. + + .. Image:: /images/DSS_cropping_example_3.jpg + Buffers -------