Skip to contentSkip to conversation

tests/pm_rpm: Don't compare edid blob IDs

PATCH In review Daniel Vetter 3 participants 5 messages Dec 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/pm_rpm: Don't compare edid blob IDs

The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)
tests/pm_rpm.c +0 -1
index 37aef96ed267..55fdb31cb723 100644
@@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
 		return;
 	igt_assert(e1 && e2);
 
-	COMPARE(e1, e2, id);
 	COMPARE(e1, e2, length);
 
 	igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 8 lines · Daniel Vetter

The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546

Paulo, can you please ack? This seems to fail all over. -Daniel

Quoted 19 lines
---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)
tests/pm_rpm.c +0 -1
index 37aef96ed267..55fdb31cb723 100644
@@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
 		return;
 	igt_assert(e1 && e2);
 
-	COMPARE(e1, e2, id);
 	COMPARE(e1, e2, length);
 
 	igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
Signature · 1 line
2.1.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to Daniel Vetter

2015-12-01 14:37 GMT-02:00 Daniel Vetter <[email protected]>:

Quoted 5 lines

The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

The main question here is: why did this work reliably before?

Quoted 26 lines
---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)
tests/pm_rpm.c +0 -2
index 37aef96ed267..55fdb31cb723 100644
@@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
                return;
        igt_assert(e1 && e2);
 
-       COMPARE(e1, e2, id);
        COMPARE(e1, e2, length);
 
        igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
--

2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 8 lines · Paulo Zanoni

2015-12-01 14:37 GMT-02:00 Daniel Vetter <[email protected]>:

Quoted 5 lines

The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

The main question here is: why did this work reliably before?

Mostly luck - if you reprobe then there's a good chance that the kernel will give you the same numbers again. But that was always just luck.

Now with atomic we use blob props a lot more, so chances for being lucky went down drastically. At least that's my theory.
-Daniel

Quoted 32 lines
Quoted 27 lines
---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)
tests/pm_rpm.c +0 -2
index 37aef96ed267..55fdb31cb723 100644
@@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
                return;
        igt_assert(e1 && e2);
 
-       COMPARE(e1, e2, id);
        COMPARE(e1, e2, length);
 
        igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
--

2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by
#4 lore raw

2015-12-01 14:47 GMT-02:00 Daniel Vetter <[email protected]>:

Quoted 8 lines · Paulo Zanoni
Quoted 7 lines

2015-12-01 14:37 GMT-02:00 Daniel Vetter <[email protected]>:

Quoted 5 lines

The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

Quoted 7 lines
Quoted 1 line

The main question here is: why did this work reliably before?

Mostly luck - if you reprobe then there's a good chance that the kernel will give you the same numbers again. But that was always just luck.

Now with atomic we use blob props a lot more, so chances for being lucky went down drastically. At least that's my theory.

Quoted 39 lines

-Daniel

Quoted 23 lines
Quoted 23 lines
---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)
tests/pm_rpm.c +0 -2
index 37aef96ed267..55fdb31cb723 100644
@@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
                return;
        igt_assert(e1 && e2);
 
-       COMPARE(e1, e2, id);
        COMPARE(e1, e2, length);
 
        igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
--

2.1.0

Quoted 9 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Paulo Zanoni

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Signature · 5 lines
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx