-
Notifications
You must be signed in to change notification settings - Fork 78
docs(linux): Add documentation regaring DSS feature: cropping #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -387,7 +387,7 @@ libdrm is included in TI releases and its sources can be found from: :: | |
|
|
||
| https://gitlab.freedesktop.org/mesa/drm | ||
|
|
||
| libdrm also contains 'modetest' tool, which can be used to get basic information about DRM state, and to show a test pattern on a display. Refer to the section `Testing tidss properties with modetest` below for some examples. | ||
| libdrm also contains 'modetest' tool, which can be used to get basic information about DRM state, and to show a test pattern on a display. Refer to the section :ref:`testing_tidss_properties` below for some examples. | ||
|
|
||
| Another option is kms++, a C++11 library for kernel mode setting which includes a bunch of test utilities and also V4L2 classes and Python bindings for DRM and V4L2. Some kms++ tools are included in TI releases. kms++ can be found from: :: | ||
|
|
||
|
|
@@ -490,8 +490,10 @@ 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: | ||
|
|
||
| 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 +665,52 @@ 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** | ||
|
|
||
| ``kmstest`` utility can be used to demonstrate cropping in a video frame using a test pattern. | ||
| The user can specify the main video frame size and an input color format using the ``-f`` argument. Then the source region, also known as a view region, can be specified using the ``-v`` argument. This takes a secondary width and height to create a rectangle starting at a given coordinate. The destination region, or plane region, for the view can be specified using ``-p`` argument. This takes a third width, height and coordinate position to place an overlay with the associated view region's content. | ||
|
|
||
| .. 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: [email protected] 138.500 1920/48/32/80/+ 1080/3/5/23/- 60 (59.93) 0x9 0x48 | ||
| Plane 0/@31: 0,0-1000x1000 | ||
| Fb 55 1000x1000-XR24 | ||
|
|
||
| The above example displays a ``1000x1000`` video frame on the screen at coordinates ``0,0``. | ||
|
|
||
| .. figure:: /images/DSS_cropping_example_1.jpg | ||
| :height: 600 | ||
| :width: 1020 | ||
|
|
||
| .. code-block:: console | ||
cshilwant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| $ kmstest -c hdmi -p 0:0,0-800x800 -f 1000x1000 -v 0,0-800x800 | ||
| Connector 1/@50: HDMI-A-1 | ||
| Crtc 1/@48: [email protected] 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 | ||
|
|
||
| Taking as an input a video frame of dimensions ``1000x1000``,the example creates a cropped source rectangle of dimensions ``800x800``, starting at coordinates ``0,0`` and displays it on screen at coordinates ``0,0``. | ||
|
|
||
| .. figure:: /images/DSS_cropping_example_2.jpg | ||
| :height: 600 | ||
| :width: 1020 | ||
|
|
||
| .. 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: [email protected] 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 | ||
|
|
||
| Taking as an input a video frame of dimensions ``1000x1000``, this example creates a cropped source rectangle of dimensions ``800x800``, starting at coordinates ``500,200`` and displays it on screen at coordinates ``200,100`` keeping the same dimensions as source rectangle i.e ``800x800`` without scaling. | ||
|
|
||
| .. figure:: /images/DSS_cropping_example_3.jpg | ||
| :height: 600 | ||
| :width: 1020 | ||
|
|
||
| Buffers | ||
| ------- | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.