* [PATCH igt] tests/kms_properties: Don't set immutable properties
@ 2017-08-04 13:38 Daniel Stone
2017-08-04 14:07 ` Daniel Stone
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Stone @ 2017-08-04 13:38 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Ben Widawsky
If the kernel tells us it's immutable, trying to set it probably isn't
going to succeed.
Fixes a failure seen with the IN_FORMATS property.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
---
tests/kms_properties.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index 276c07be..23d8a89f 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -88,9 +88,13 @@ static bool ignore_plane_property(const char *name, bool atomic)
return false;
}
-static bool ignore_property(uint32_t type, const char *name, bool atomic)
+static bool ignore_property(uint32_t obj_type, uint32_t prop_flags,
+ const char *name, bool atomic)
{
- switch (type) {
+ if (prop_flags & DRM_MODE_PROP_IMMUTABLE)
+ return true;
+
+ switch (obj_type) {
case DRM_MODE_OBJECT_CRTC:
return ignore_crtc_property(name, atomic);
case DRM_MODE_OBJECT_CONNECTOR:
@@ -122,7 +126,7 @@ static void test_properties(int fd, uint32_t type, uint32_t id, bool atomic)
igt_assert(prop);
- if (ignore_property(type, prop->name, atomic)) {
+ if (ignore_property(type, prop->flags, prop->name, atomic)) {
igt_debug("Ignoring property \"%s\"\n", prop->name);
continue;
--
2.13.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH igt] tests/kms_properties: Don't set immutable properties
2017-08-04 13:38 [PATCH igt] tests/kms_properties: Don't set immutable properties Daniel Stone
@ 2017-08-04 14:07 ` Daniel Stone
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Stone @ 2017-08-04 14:07 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Ben Widawsky
On 4 August 2017 at 14:38, Daniel Stone <daniels@collabora.com> wrote:
> If the kernel tells us it's immutable, trying to set it probably isn't
> going to succeed.
>
> Fixes a failure seen with the IN_FORMATS property.
Pushed a v2 which removed most of the list with Daniel Vetter's R-b from IRC.
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-04 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-04 13:38 [PATCH igt] tests/kms_properties: Don't set immutable properties Daniel Stone
2017-08-04 14:07 ` Daniel Stone
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.