diff options
| author | Simon Ser <simon.ser@intel.com> | 2019-07-19 13:48:27 +0300 |
|---|---|---|
| committer | Simon Ser <simon.ser@intel.com> | 2019-08-15 13:03:48 +0300 |
| commit | 8a7b044493e8dcdd7df02a124ea14daf95752cec (patch) | |
| tree | c3167969f34de3739fc79c91828456273a99cb34 /tests | |
| parent | 81df2f22385bc275975cf199d962eed9bc10f916 (diff) | |
lib/igt_kms: use struct edid instead of unsigned char
This has several advantages:
* No more need to convert back and forth between these two (everybody should
use struct edid, the exception being lib/tests/igt_edid which performs sanity
checks)
* Makes it clearer that users can call edid_get_size on a returned EDID blob
* Improves type safety (it's more obvious is a random blob is used as an EDID)
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/kms_3d.c | 2 | ||||
| -rw-r--r-- | tests/kms_chamelium.c | 4 | ||||
| -rw-r--r-- | tests/kms_hdmi_inject.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/kms_3d.c b/tests/kms_3d.c index 6117dfe0..b970b3b5 100644 --- a/tests/kms_3d.c +++ b/tests/kms_3d.c @@ -31,7 +31,7 @@ igt_simple_main int drm_fd; drmModeRes *res; drmModeConnector *connector; - const unsigned char *edid; + const struct edid *edid; int mode_count, connector_id; drm_fd = drm_open_driver_master(DRIVER_INTEL); diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c index f25d13c6..913a4cd8 100644 --- a/tests/kms_chamelium.c +++ b/tests/kms_chamelium.c @@ -261,7 +261,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count) igt_hpd_storm_reset(data->drm_fd); } -static const unsigned char *get_edid(enum test_edid edid); +static const struct edid *get_edid(enum test_edid edid); static void set_edid(data_t *data, struct chamelium_port *port, enum test_edid edid) @@ -2197,7 +2197,7 @@ test_hpd_storm_disable(data_t *data, struct chamelium_port *port, int width) igt_hpd_storm_reset(data->drm_fd); } -static const unsigned char *get_edid(enum test_edid edid) +static const struct edid *get_edid(enum test_edid edid) { switch (edid) { case TEST_EDID_BASE: diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c index 2a52087d..52110506 100644 --- a/tests/kms_hdmi_inject.c +++ b/tests/kms_hdmi_inject.c @@ -78,7 +78,7 @@ get_connector(int drm_fd, drmModeRes *res) static void hdmi_inject_4k(int drm_fd, drmModeConnector *connector) { - const unsigned char *edid; + const struct edid *edid; struct kmstest_connector_config config; int ret, cid, i, crtc_mask = -1; int fb_id; @@ -139,7 +139,7 @@ hdmi_inject_4k(int drm_fd, drmModeConnector *connector) static void hdmi_inject_audio(int drm_fd, drmModeConnector *connector) { - const unsigned char *edid; + const struct edid *edid; int fb_id, cid, ret, crtc_mask = -1; struct igt_fb fb; struct kmstest_connector_config config; |
