Lines Matching refs:_res
556 #define free_resource(_res, type, Type) \ in free_resources() argument
558 if (!(_res)->type##s) \ in free_resources()
560 for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \ in free_resources()
561 if (!(_res)->type##s[i].type) \ in free_resources()
563 drmModeFree##Type((_res)->type##s[i].type); \ in free_resources()
565 free((_res)->type##s); \ in free_resources()
568 #define free_properties(_res, type) \ in free_resources() argument
570 for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \ in free_resources()
598 drmModeRes *_res; in get_resources() local
609 _res = drmModeGetResources(dev->fd); in get_resources()
610 if (!_res) { in get_resources()
617 res->count_crtcs = _res->count_crtcs; in get_resources()
618 res->count_encoders = _res->count_encoders; in get_resources()
619 res->count_connectors = _res->count_connectors; in get_resources()
620 res->count_fbs = _res->count_fbs; in get_resources()
628 drmModeFreeResources(_res); in get_resources()
632 #define get_resource(_res, __res, type, Type) \ in get_resources() argument
634 for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \ in get_resources()
636 (_res)->type##s[i].type = \ in get_resources()
638 if (!(_res)->type##s[i].type) \ in get_resources()
645 get_resource(res, _res, crtc, Crtc); in get_resources()
646 get_resource(res, _res, encoder, Encoder); in get_resources()
647 get_resource(res, _res, connector, Connector); in get_resources()
648 get_resource(res, _res, fb, FB); in get_resources()
650 drmModeFreeResources(_res); in get_resources()
665 #define get_properties(_res, type, Type) \ in get_resources() argument
667 for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \ in get_resources()
991 #define find_object(_res, type, Type) \ in set_property() argument
993 for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \ in set_property()
994 struct type *obj = &(_res)->type##s[i]; \ in set_property()