From 9ff0aa52d61cae84663cc64caa7a9768cad06f70 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Fri, 15 Feb 2019 15:10:51 +0200 Subject: lib/debugfs: Nuke enum intel_pipe_crc_source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No one is using anything but the "auto" crc source, so the enum listing other options is quite pointless. Let's switch to just using the string instead of the enum. That way any hypothetical test that wants to use a more specific crc source can just pass in the proper string. v2: Assert the string isn't NULL (Chris) Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson --- lib/igt_debugfs.h | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'lib/igt_debugfs.h') diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index b9cf0f81..f8e57a6b 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -82,39 +82,7 @@ typedef struct { uint32_t crc[DRM_MAX_CRC_NR]; } igt_crc_t; -/** - * intel_pipe_crc_source: - * @INTEL_PIPE_CRC_SOURCE_NONE: No source - * @INTEL_PIPE_CRC_SOURCE_PLANE1: Plane 1 - * @INTEL_PIPE_CRC_SOURCE_PLANE2: Plane 2 - * @INTEL_PIPE_CRC_SOURCE_PF: Panel Filter - * @INTEL_PIPE_CRC_SOURCE_PIPE: Pipe - * @INTEL_PIPE_CRC_SOURCE_TV: TV - * @INTEL_PIPE_CRC_SOURCE_DP_B: DisplayPort B - * @INTEL_PIPE_CRC_SOURCE_DP_C: DisplayPort C - * @INTEL_PIPE_CRC_SOURCE_DP_D: DisplayPort D - * @INTEL_PIPE_CRC_SOURCE_AUTO: Automatic source selection - * @INTEL_PIPE_CRC_SOURCE_MAX: Number of available sources - * - * Enumeration of all supported pipe CRC sources. Not all platforms and all - * outputs support all of them. Generic tests should just use - * INTEL_PIPE_CRC_SOURCE_AUTO. It should always map to an end-of-pipe CRC - * suitable for checking planes, cursor, color correction and any other - * output-agnostic features. - */ -enum intel_pipe_crc_source { - INTEL_PIPE_CRC_SOURCE_NONE, - INTEL_PIPE_CRC_SOURCE_PLANE1, - INTEL_PIPE_CRC_SOURCE_PLANE2, - INTEL_PIPE_CRC_SOURCE_PF, - INTEL_PIPE_CRC_SOURCE_PIPE, - INTEL_PIPE_CRC_SOURCE_TV, - INTEL_PIPE_CRC_SOURCE_DP_B, - INTEL_PIPE_CRC_SOURCE_DP_C, - INTEL_PIPE_CRC_SOURCE_DP_D, - INTEL_PIPE_CRC_SOURCE_AUTO, - INTEL_PIPE_CRC_SOURCE_MAX, -}; +#define INTEL_PIPE_CRC_SOURCE_AUTO "auto" void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b); bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b); @@ -123,9 +91,9 @@ char *igt_crc_to_string(igt_crc_t *crc); void igt_require_pipe_crc(int fd); igt_pipe_crc_t * -igt_pipe_crc_new(int fd, enum pipe pipe, enum intel_pipe_crc_source source); +igt_pipe_crc_new(int fd, enum pipe pipe, const char *source); igt_pipe_crc_t * -igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, enum intel_pipe_crc_source source); +igt_pipe_crc_new_nonblock(int fd, enum pipe pipe, const char *source); void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); -- cgit v1.2.3