[PATCH i-g-t 04/16] lib/kms: rename struct igt_display to _igt_display

Jani Nikula
2026-04-14T07:15:36Z

Prefer igt_display_t over struct igt_display, and rename the struct to
avoid accidental use. The named struct is only needed for the typedef
declaration.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
lib/igt_kms.c | 2 +-
lib/igt_kms.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 2dbf9ec38458..2d758b63c043 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4012,7 +4012,7 @@ static int igt_primary_plane_commit_legacy(igt_plane_t *primary,
igt_crtc_t *crtc,
bool fail_on_error)
{
- struct igt_display *display = primary->crtc->display;
+ igt_display_t *display = primary->crtc->display;
igt_output_t *output = igt_crtc_get_output(crtc);
drmModeModeInfo *mode;
uint32_t fb_id, crtc_id;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 9b8614c4e6b8..2e2870854634 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -378,7 +378,7 @@ extern const char * const igt_plane_prop_names[];
*/
extern const char * const igt_colorop_prop_names[];

-typedef struct igt_display igt_display_t;
+typedef struct _igt_display igt_display_t;
typedef struct igt_crtc igt_crtc_t;
typedef uint32_t igt_fixed_t; /* 16.16 fixed point */

@@ -516,7 +516,7 @@ typedef struct {
igt_crtc_t *crtc;
} igt_output_crtc_t;

-struct igt_display {
+struct _igt_display {
int drm_fd;
int log_shift;
int n_crtcs;
--
2.47.3