Lines Matching refs:iter
76 struct displayid_iter *iter) in displayid_iter_edid_begin() argument
78 memset(iter, 0, sizeof(*iter)); in displayid_iter_edid_begin()
80 iter->drm_edid = drm_edid; in displayid_iter_edid_begin()
84 displayid_iter_block(const struct displayid_iter *iter) in displayid_iter_block() argument
88 if (!iter->section) in displayid_iter_block()
91 block = (const struct displayid_block *)&iter->section[iter->idx]; in displayid_iter_block()
93 if (iter->idx + sizeof(*block) <= iter->length && in displayid_iter_block()
94 iter->idx + sizeof(*block) + block->num_bytes <= iter->length) in displayid_iter_block()
101 __displayid_iter_next(struct displayid_iter *iter) in __displayid_iter_next() argument
105 if (!iter->drm_edid) in __displayid_iter_next()
108 if (iter->section) { in __displayid_iter_next()
110 block = displayid_iter_block(iter); in __displayid_iter_next()
112 iter->section = NULL; in __displayid_iter_next()
113 iter->drm_edid = NULL; in __displayid_iter_next()
118 iter->idx += sizeof(*block) + block->num_bytes; in __displayid_iter_next()
120 block = displayid_iter_block(iter); in __displayid_iter_next()
127 bool base_section = !iter->section; in __displayid_iter_next()
129 iter->section = drm_find_displayid_extension(iter->drm_edid, in __displayid_iter_next()
130 &iter->length, in __displayid_iter_next()
131 &iter->idx, in __displayid_iter_next()
132 &iter->ext_index); in __displayid_iter_next()
133 if (!iter->section) { in __displayid_iter_next()
134 iter->drm_edid = NULL; in __displayid_iter_next()
142 base = displayid_get_header(iter->section, iter->length, in __displayid_iter_next()
143 iter->idx); in __displayid_iter_next()
145 iter->version = base->rev; in __displayid_iter_next()
146 iter->primary_use = base->prod_id; in __displayid_iter_next()
150 iter->idx += sizeof(struct displayid_header); in __displayid_iter_next()
152 block = displayid_iter_block(iter); in __displayid_iter_next()
158 void displayid_iter_end(struct displayid_iter *iter) in displayid_iter_end() argument
160 memset(iter, 0, sizeof(*iter)); in displayid_iter_end()
164 u8 displayid_version(const struct displayid_iter *iter) in displayid_version() argument
166 return iter->version; in displayid_version()
173 u8 displayid_primary_use(const struct displayid_iter *iter) in displayid_primary_use() argument
175 return iter->primary_use; in displayid_primary_use()