Lines Matching refs:desc
179 static uint8_t *edid_desc_next(uint8_t *edid, uint8_t *dta, uint8_t *desc) in edid_desc_next() argument
181 if (desc == NULL) { in edid_desc_next()
184 if (desc + 18 + 18 < edid + 127) { in edid_desc_next()
185 return desc + 18; in edid_desc_next()
188 if (desc < edid + 127) { in edid_desc_next()
191 if (desc + 18 + 18 < dta + 127) { in edid_desc_next()
192 return desc + 18; in edid_desc_next()
198 static void edid_desc_type(uint8_t *desc, uint8_t type) in edid_desc_type() argument
200 desc[0] = 0; in edid_desc_type()
201 desc[1] = 0; in edid_desc_type()
202 desc[2] = 0; in edid_desc_type()
203 desc[3] = type; in edid_desc_type()
204 desc[4] = 0; in edid_desc_type()
207 static void edid_desc_text(uint8_t *desc, uint8_t type, in edid_desc_text() argument
212 edid_desc_type(desc, type); in edid_desc_text()
213 memset(desc + 5, ' ', 13); in edid_desc_text()
219 memcpy(desc + 5, text, len); in edid_desc_text()
220 desc[5 + len] = '\n'; in edid_desc_text()
223 static void edid_desc_ranges(uint8_t *desc) in edid_desc_ranges() argument
225 edid_desc_type(desc, 0xfd); in edid_desc_ranges()
228 desc[5] = 50; in edid_desc_ranges()
229 desc[6] = 125; in edid_desc_ranges()
232 desc[7] = 30; in edid_desc_ranges()
233 desc[8] = 160; in edid_desc_ranges()
236 desc[9] = 2550 / 10; in edid_desc_ranges()
239 desc[10] = 0x01; in edid_desc_ranges()
242 desc[11] = '\n'; in edid_desc_ranges()
243 memset(desc + 12, ' ', 6); in edid_desc_ranges()
247 static void edid_desc_xtra3_std(uint8_t *desc) in edid_desc_xtra3_std() argument
249 edid_desc_type(desc, 0xf7); in edid_desc_xtra3_std()
250 desc[5] = 10; in edid_desc_xtra3_std()
253 static void edid_desc_dummy(uint8_t *desc) in edid_desc_dummy() argument
255 edid_desc_type(desc, 0x10); in edid_desc_dummy()
258 static void edid_desc_timing(uint8_t *desc, const Timings *timings, in edid_desc_timing() argument
262 stw_le_p(desc, timings->clock); in edid_desc_timing()
264 desc[2] = xres & 0xff; in edid_desc_timing()
265 desc[3] = timings->xblank & 0xff; in edid_desc_timing()
266 desc[4] = (((xres & 0xf00) >> 4) | in edid_desc_timing()
269 desc[5] = yres & 0xff; in edid_desc_timing()
270 desc[6] = timings->yblank & 0xff; in edid_desc_timing()
271 desc[7] = (((yres & 0xf00) >> 4) | in edid_desc_timing()
274 desc[8] = timings->xfront & 0xff; in edid_desc_timing()
275 desc[9] = timings->xsync & 0xff; in edid_desc_timing()
277 desc[10] = (((timings->yfront & 0x00f) << 4) | in edid_desc_timing()
279 desc[11] = (((timings->xfront & 0x300) >> 2) | in edid_desc_timing()
284 desc[12] = xmm & 0xff; in edid_desc_timing()
285 desc[13] = ymm & 0xff; in edid_desc_timing()
286 desc[14] = (((xmm & 0xf00) >> 4) | in edid_desc_timing()
289 desc[17] = 0x18; in edid_desc_timing()
385 uint8_t *desc = edid + 54; in qemu_edid_generate() local
502 edid_desc_timing(desc, &timings, info->prefx, info->prefy, in qemu_edid_generate()
504 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()
507 xtra3 = desc; in qemu_edid_generate()
509 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()
516 edid_desc_ranges(desc); in qemu_edid_generate()
517 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()
519 if (desc && info->name) { in qemu_edid_generate()
520 edid_desc_text(desc, 0xfc, info->name); in qemu_edid_generate()
521 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()
524 if (desc && info->serial) { in qemu_edid_generate()
525 edid_desc_text(desc, 0xff, info->serial); in qemu_edid_generate()
526 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()
529 while (desc) { in qemu_edid_generate()
530 edid_desc_dummy(desc); in qemu_edid_generate()
531 desc = edid_desc_next(edid, dta, desc); in qemu_edid_generate()