summaryrefslogtreecommitdiff
path: root/tests/kms_dither.c
AgeCommit message (Collapse)Author
2022-07-06tests/kms_dither: Reset max_bpc before exiting the subtestBhanuprakash Modem
Before exiting the subtest, we must reset the connector's "max_bpc" property to it's default value, else it may effect the consequent subtests. V2: * Don't trigger a subtest if requested bpc > connecot's max_bpc. Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Karthik B S <karthik.b.s@intel.com>
2022-06-22tests/kms_dither: Skip if current & requested BPC doesn't matchBhanuprakash Modem
The "max bpc" property only ensures that the bpc will not go beyond the value set through this property. It does not guarantee that the same bpc will be used for the given mode. If clock/bandwidth constraints permit, the max bpc will be used to show the mode, otherwise the bpc will be reduced. So, if we really want a particular bpc set, we can try reducing the resolution, till we get the bpc that we set in max bpc property. This patch will skip the test, if there is no valid resolution to get the same bpc as set by max_bpc property. Cc: Swati Sharma <swati2.sharma@intel.com> CC: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
2022-06-15tests/kms_dither: Rename dynamic testsBhanuprakash Modem
Instead of using dynamic subtests as <output name>-<pipe name>, update as <pipe name>-<output name>. Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
2022-05-17tests/kms_dither: Adopt to use updated debugfs functionsBhanuprakash Modem
Instead of writing our own wrappers of debugfs read, use updated functions from lib. Cc: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
2021-10-11igt: s/DRM_FORMAT_MOD_NONE/DRM_FORMAT_MOD_LINEAR/Ville Syrjälä
DRM_FORMAT_MOD_LINEAR is the more sensible name for DRM_FORMAT_MOD_NONE. Use the better name. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-07-19tests/kms_dither: Make dither tests genericBhanuprakash Modem
As dithering is not Intel specific, it would be good to make these tests generic, so that it can be easy to extend/re-use for other platforms. V2: * Use igt_require_intel() instead of igt_require(is_i915_device()) Cc: Uma Shankar <uma.shankar@intel.com> Cc: Mark Yacoub <markyacoub@chromium.org> Cc: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Mark Yacoub <markyacoub@chromium.org>
2021-07-15Nuke local versions of DRM_FORMAT and DRM_MODELucas De Marchi
Use the definition from kernel headers. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-09tests/kms_dither: New IGT to validate crtc DitheringBhanuprakash Modem
Many of the display devices have color format support less than the color format of the input data (Ex: 8-bit input data and 6-bit display color depth). Then the input data will be either truncated or rounded, but this approach usually causes loss of detail and also produce large banded areas of a single color that significantly differs from the original image. Dithering is a technique used to enhance these colors by creating the illusion of smoothness by adjusting the nearby pixel color. For Eg: Converting 8-bit to 6-bit by modifying the pixel information. Dithering should be enabled when a panel color depth is lower than the color depth of the framebuffer. Even though feature Dithering is there since legacy, there is no specific IGT for this. This patch will create New IGT for Dithering. And below is the truth table for CRTC Dithering. |----------------|---------|-------------| | Frame buffer | Panel | Dithering | |----------------|---------|-------------| | 8 BPC | 6 BPC | Yes | |----------------|---------|-------------| | 8 BPC | 8 BPC | No | |----------------|---------|-------------| | 8 BPC | 10 BPC | No | |----------------|---------|-------------| | 10 BPC | 6 BPC | Yes | |----------------|---------|-------------| | 10 BPC | 8 BPC | Yes | |----------------|---------|-------------| | 10 BPC | 10 BPC | No | |----------------|---------|-------------| | 16 BPC | 6 BPC | Yes | |----------------|---------|-------------| | 16 BPC | 8 BPC | Yes | |----------------|---------|-------------| | 16 BPC | 10 BPC | Yes | |----------------|---------|-------------| As i915 enables dithering for 6 bpc panels only, we need to limit the execution to 6 & 8 bpc panels (Negative testing) only. V2: * Connector MAX_BPC prop is mandatory (Uma) * Test commit for connector caps (Uma) Cc: Swati Sharma <swati2.sharma@intel.com> Cc: Uma Shankar <uma.shankar@intel.com> Cc: Nischal Varide <nischal.varide@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com>