summaryrefslogtreecommitdiff
path: root/tests/kms_color.c
AgeCommit message (Collapse)Author
2018-10-01igt: Require a display (KMS enabled) for KMS testsChris Wilson
Simple rule of thumb, if a kms_* test calls igt_display_init() in its global fixture, skip the entire test if the driver has disabled KMS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-04-14tests/kms_color: Enable color tests for AMDGPULeo (Sunpeng) Li
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-14tests/kms_color: Do not mask LUT for non i915 drivers.Leo (Sunpeng) Li
Masking assumes a direct relationship between the software LUT structure, and hardware LUT. This is not always the case. On AMD hardware for example, the hardware LUT is composed of piecewise-linear segments, with end-point spaced exponentially along the X axis, while software LUT is spaced linearly. Masking the LUT for the purpose of truncating the resulting colors won't work here. v2: Add commit message and sign off. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-14tests/kms_color: Fill entire frame when painting rectanglesLeo (Sunpeng) Li
Fill entire frame to avoid garbage data from being included in CRC calculations. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-01lib/igt_fb: Add igt_put_cairo_ctx as counter to igt_get_cairo_ctxMaarten Lankhorst
This will allow support for NV12 in the future, where igt_get_cairo_ctx will return a RGB image to draw with, which will be converted in igt_put_cairo_ctx so tests don't have to add special support for NV12. This is the same as cairo_destroy + checking for errors, but not all tests use this correctly so it's better to have a single handler for it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-12-19tests/kms_color: Rename pipe tests to standard notationMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> #irc Acked-by: Acked-by: Marta Lofstedt <marta.lofstedt@intel.com> #irc
2017-10-20tests/kms_color: Rework tests slightly to work better with new atomic apiMaarten Lankhorst
igt_pipe_get_property is about to be removed, so use igt_pipe_obj_get_prop instead. This requires adding 2 more properties to the crtc property list. Also get rid of the Broadcast RGB call, this is already handled in igt_kms. Change order for DEGAMMA_LUT and GAMMA_LUT around, else this test will fail if legacy gamma is set. In the legacy path, this will update GAMMA_LUT to the new size before DEGAMMA_LUT is set. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Export property blob functions for output/pipe/plane, v2.Maarten Lankhorst
With the replace_prop_blob functions we can safely replace the blob for any property, without having to care about error handling ourselves. This will for example allow overriding color management blobs, or for kms_atomic set invalid mode blobs. The color management blob functions are removed, they can now be replaced by direct calls to replace the properties. Changes since v1: - Fix chamelium tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-04tests/kms_color: Unset plane fb on teardown, v2.Maarten Lankhorst
Valgrind is slightly unhappy when we leave the fb set: ==1804== Invalid read of size 4 ==1804== at 0x122F83: igt_plane_get_fb_id (igt_kms.c:2074) ==1804== by 0x122F83: igt_primary_plane_commit_legacy (igt_kms.c:2339) ==1804== by 0x122F83: igt_plane_commit (igt_kms.c:2394) ==1804== by 0x122F83: igt_pipe_commit (igt_kms.c:2435) ==1804== by 0x122F83: do_display_commit (igt_kms.c:2667) ==1804== by 0x12338D: igt_display_commit2 (igt_kms.c:2777) ==1804== by 0x112F83: run_tests_for_pipe (kms_color.c:1053) ==1804== by 0x11360F: __real_main1189 (kms_color.c:1206) ==1804== by 0x110BC6: main (kms_color.c:1189) ==1804== Address 0x1ffeffeb20 is on thread 1's stack ==1804== 160 bytes below stack pointer Add the missing calls to igt_plane_set_fb, and fix the crash. Changes since v1: - Fix compilation! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-02tests: Rename kms_pipe_color to kms_colorMaarten Lankhorst
Rename kms_pipe_color to kms_color, and rename the invalid tests to pipe-invalid. To prepare for adding support for plane color management. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>