diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-07-08 14:56:54 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-07-11 15:12:21 +0100 |
commit | 143c3a757521de907889803b011ac2bb308b4e1a (patch) | |
tree | 532ccac90b3373d7e80dcd23639b2de03347d8a9 /lib | |
parent | 33842d594044f13d3079d961df2894921be10cc5 (diff) |
igt_kms: Provide a get_plane_property() shorthand
So one doesn't have to write the plane type all the time.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_kms.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 84f29983..f50f27f6 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -633,6 +633,14 @@ out: return found; } +static bool +get_plane_property(igt_display_t *display, uint32_t plane_id, const char *name, + uint32_t *prop_id /* out */, uint64_t *value /* out */) +{ + return get_property(display, plane_id, DRM_MODE_OBJECT_PLANE, + name, prop_id, value); +} + /* * Walk a plane's property list to determine its type. If we don't * find a type property, then the kernel doesn't support universal @@ -643,8 +651,8 @@ static int get_drm_plane_type(igt_display_t *display, uint32_t plane_id) uint64_t value; bool has_prop; - has_prop = get_property(display, plane_id, DRM_MODE_OBJECT_PLANE, - "type", NULL /* prop_id */, &value); + has_prop = get_plane_property(display, plane_id, "type", + NULL /* prop_id */, &value); if (has_prop) return (int)value; |