sde_edid_parser.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
  4. */
  5. #include <drm/drm_edid.h>
  6. #include <linux/hdmi.h>
  7. #include "sde_kms.h"
  8. #include "sde_edid_parser.h"
  9. #include "sde/sde_connector.h"
  10. #define DBC_START_OFFSET 4
  11. #define EDID_DTD_LEN 18
  12. enum data_block_types {
  13. RESERVED,
  14. AUDIO_DATA_BLOCK,
  15. VIDEO_DATA_BLOCK,
  16. VENDOR_SPECIFIC_DATA_BLOCK,
  17. SPEAKER_ALLOCATION_DATA_BLOCK,
  18. VESA_DTC_DATA_BLOCK,
  19. RESERVED2,
  20. USE_EXTENDED_TAG
  21. };
  22. static u8 *sde_find_edid_extension(struct edid *edid, int ext_id)
  23. {
  24. u8 *edid_ext = NULL;
  25. int i;
  26. /* No EDID or EDID extensions */
  27. if (edid == NULL || edid->extensions == 0)
  28. return NULL;
  29. /* Find CEA extension */
  30. for (i = 0; i < edid->extensions; i++) {
  31. edid_ext = (u8 *)edid + EDID_LENGTH * (i + 1);
  32. if (edid_ext[0] == ext_id)
  33. break;
  34. }
  35. if (i == edid->extensions)
  36. return NULL;
  37. return edid_ext;
  38. }
  39. static u8 *sde_find_cea_extension(struct edid *edid)
  40. {
  41. return sde_find_edid_extension(edid, SDE_CEA_EXT);
  42. }
  43. static int
  44. sde_cea_db_payload_len(const u8 *db)
  45. {
  46. return db[0] & 0x1f;
  47. }
  48. static int
  49. sde_cea_db_tag(const u8 *db)
  50. {
  51. return db[0] >> 5;
  52. }
  53. static int
  54. sde_cea_revision(const u8 *cea)
  55. {
  56. return cea[1];
  57. }
  58. static int
  59. sde_cea_db_offsets(const u8 *cea, int *start, int *end)
  60. {
  61. /* Data block offset in CEA extension block */
  62. *start = 4;
  63. *end = cea[2];
  64. if (*end == 0)
  65. *end = 127;
  66. if (*end < 4 || *end > 127)
  67. return -ERANGE;
  68. return 0;
  69. }
  70. #define sde_for_each_cea_db(cea, i, start, end) \
  71. for ((i) = (start); \
  72. (i) < (end) && (i) + sde_cea_db_payload_len(&(cea)[(i)]) < (end); \
  73. (i) += sde_cea_db_payload_len(&(cea)[(i)]) + 1)
  74. static bool sde_cea_db_is_hdmi_hf_vsdb(const u8 *db)
  75. {
  76. int hdmi_id;
  77. if (sde_cea_db_tag(db) != VENDOR_SPECIFIC_DATA_BLOCK)
  78. return false;
  79. if (sde_cea_db_payload_len(db) < 7)
  80. return false;
  81. hdmi_id = db[1] | (db[2] << 8) | (db[3] << 16);
  82. return hdmi_id == HDMI_FORUM_IEEE_OUI;
  83. }
  84. static const u8 *_sde_edid_find_block(const u8 *in_buf, u32 start_offset,
  85. u8 type, u8 *len)
  86. {
  87. /* the start of data block collection, start of Video Data Block */
  88. u32 offset = start_offset;
  89. u32 dbc_offset = in_buf[2];
  90. SDE_EDID_DEBUG("%s +", __func__);
  91. /*
  92. * * edid buffer 1, byte 2 being 4 means no non-DTD/Data block
  93. * collection present.
  94. * * edid buffer 1, byte 2 being 0 means no non-DTD/DATA block
  95. * collection present and no DTD data present.
  96. */
  97. if ((dbc_offset == 0) || (dbc_offset == 4)) {
  98. SDE_EDID_DEBUG("EDID: no DTD or non-DTD data present\n");
  99. return NULL;
  100. }
  101. while (offset < dbc_offset) {
  102. u8 block_len = in_buf[offset] & 0x1F;
  103. if ((offset + block_len <= dbc_offset) &&
  104. (in_buf[offset] >> 5) == type) {
  105. *len = block_len;
  106. SDE_EDID_DEBUG("block=%d found @ 0x%x w/ len=%d\n",
  107. type, offset, block_len);
  108. return in_buf + offset;
  109. }
  110. offset += 1 + block_len;
  111. }
  112. return NULL;
  113. }
  114. static void sde_edid_extract_vendor_id(struct sde_edid_ctrl *edid_ctrl)
  115. {
  116. char *vendor_id;
  117. u32 id_codes;
  118. SDE_EDID_DEBUG("%s +", __func__);
  119. if (!edid_ctrl) {
  120. SDE_ERROR("%s: invalid input\n", __func__);
  121. return;
  122. }
  123. vendor_id = edid_ctrl->vendor_id;
  124. id_codes = ((u32)edid_ctrl->edid->mfg_id[0] << 8) +
  125. edid_ctrl->edid->mfg_id[1];
  126. vendor_id[0] = 'A' - 1 + ((id_codes >> 10) & 0x1F);
  127. vendor_id[1] = 'A' - 1 + ((id_codes >> 5) & 0x1F);
  128. vendor_id[2] = 'A' - 1 + (id_codes & 0x1F);
  129. vendor_id[3] = 0;
  130. SDE_EDID_DEBUG("vendor id is %s ", vendor_id);
  131. SDE_EDID_DEBUG("%s -", __func__);
  132. }
  133. static void _sde_edid_update_dc_modes(
  134. struct drm_connector *connector, struct sde_edid_ctrl *edid_ctrl)
  135. {
  136. int i, start, end;
  137. u8 *edid_ext, *hdmi;
  138. struct drm_display_info *disp_info;
  139. u32 hdmi_dc_yuv_modes = 0;
  140. SDE_EDID_DEBUG("%s +\n", __func__);
  141. if (!connector || !edid_ctrl) {
  142. SDE_ERROR("invalid input\n");
  143. return;
  144. }
  145. disp_info = &connector->display_info;
  146. edid_ext = sde_find_cea_extension(edid_ctrl->edid);
  147. if (!edid_ext) {
  148. SDE_DEBUG("no cea extension\n");
  149. return;
  150. }
  151. if (sde_cea_db_offsets(edid_ext, &start, &end))
  152. return;
  153. sde_for_each_cea_db(edid_ext, i, start, end) {
  154. if (sde_cea_db_is_hdmi_hf_vsdb(&edid_ext[i])) {
  155. hdmi = &edid_ext[i];
  156. if (sde_cea_db_payload_len(hdmi) < 7)
  157. continue;
  158. if (hdmi[7] & DRM_EDID_YCBCR420_DC_30) {
  159. hdmi_dc_yuv_modes |= DRM_EDID_YCBCR420_DC_30;
  160. SDE_EDID_DEBUG("Y420 30-bit supported\n");
  161. }
  162. if (hdmi[7] & DRM_EDID_YCBCR420_DC_36) {
  163. hdmi_dc_yuv_modes |= DRM_EDID_YCBCR420_DC_36;
  164. SDE_EDID_DEBUG("Y420 36-bit supported\n");
  165. }
  166. if (hdmi[7] & DRM_EDID_YCBCR420_DC_48) {
  167. hdmi_dc_yuv_modes |= DRM_EDID_YCBCR420_DC_36;
  168. SDE_EDID_DEBUG("Y420 48-bit supported\n");
  169. }
  170. }
  171. }
  172. disp_info->edid_hdmi_dc_modes |= hdmi_dc_yuv_modes;
  173. SDE_EDID_DEBUG("%s -\n", __func__);
  174. }
  175. static void _sde_edid_extract_audio_data_blocks(
  176. struct sde_edid_ctrl *edid_ctrl)
  177. {
  178. u8 len = 0;
  179. u8 adb_max = 0;
  180. const u8 *adb = NULL;
  181. u32 offset = DBC_START_OFFSET;
  182. u8 *cea = NULL;
  183. if (!edid_ctrl) {
  184. SDE_ERROR("invalid edid_ctrl\n");
  185. return;
  186. }
  187. SDE_EDID_DEBUG("%s +", __func__);
  188. cea = sde_find_cea_extension(edid_ctrl->edid);
  189. if (!cea) {
  190. SDE_DEBUG("CEA extension not found\n");
  191. return;
  192. }
  193. edid_ctrl->adb_size = 0;
  194. memset(edid_ctrl->audio_data_block, 0,
  195. sizeof(edid_ctrl->audio_data_block));
  196. do {
  197. len = 0;
  198. adb = _sde_edid_find_block(cea, offset, AUDIO_DATA_BLOCK,
  199. &len);
  200. if ((adb == NULL) || (len > MAX_AUDIO_DATA_BLOCK_SIZE ||
  201. adb_max >= MAX_NUMBER_ADB)) {
  202. if (!edid_ctrl->adb_size) {
  203. SDE_DEBUG("No/Invalid Audio Data Block\n");
  204. return;
  205. }
  206. continue;
  207. }
  208. memcpy(edid_ctrl->audio_data_block + edid_ctrl->adb_size,
  209. adb + 1, len);
  210. offset = (adb - cea) + 1 + len;
  211. edid_ctrl->adb_size += len;
  212. adb_max++;
  213. } while (adb);
  214. SDE_EDID_DEBUG("%s -", __func__);
  215. }
  216. static void sde_edid_parse_hdr_plus_info(struct drm_connector *connector,
  217. const u8 *db)
  218. {
  219. struct sde_connector *c_conn;
  220. c_conn = to_sde_connector(connector);
  221. c_conn->hdr_plus_app_ver = db[5] & VSVDB_HDR10_PLUS_APP_VER_MASK;
  222. }
  223. static void sde_edid_parse_vsvdb_info(struct drm_connector *connector,
  224. const u8 *db)
  225. {
  226. u8 db_len = 0;
  227. u32 ieee_code = 0;
  228. SDE_EDID_DEBUG("%s +\n", __func__);
  229. db_len = sde_cea_db_payload_len(db);
  230. if (db_len < 5)
  231. return;
  232. /* Bytes 2-4: IEEE 24-bit code, LSB first */
  233. ieee_code = db[2] | (db[3] << 8) | (db[4] << 16);
  234. if (ieee_code == VSVDB_HDR10_PLUS_IEEE_CODE)
  235. sde_edid_parse_hdr_plus_info(connector, db);
  236. SDE_EDID_DEBUG("%s -\n", __func__);
  237. }
  238. static bool sde_edid_is_luminance_value_present(u32 block_length,
  239. enum luminance_value value)
  240. {
  241. return block_length > NO_LUMINANCE_DATA && value <= block_length;
  242. }
  243. /*
  244. * sde_edid_parse_hdr_db - Parse the HDR extended block
  245. * @connector: connector for the external sink
  246. * @db: start of the HDR extended block
  247. *
  248. * Parses the HDR extended block to extract sink info for @connector.
  249. */
  250. static void
  251. sde_edid_parse_hdr_db(struct drm_connector *connector, const u8 *db)
  252. {
  253. u8 len = 0;
  254. struct sde_connector *c_conn;
  255. c_conn = to_sde_connector(connector);
  256. if (!db)
  257. return;
  258. len = db[0] & 0x1f;
  259. /* Byte 3: Electro-Optical Transfer Functions */
  260. c_conn->hdr_eotf = db[2] & 0x3F;
  261. /* Byte 4: Static Metadata Descriptor Type 1 */
  262. c_conn->hdr_metadata_type_one = (db[3] & BIT(0));
  263. /* Byte 5: Desired Content Maximum Luminance */
  264. if (sde_edid_is_luminance_value_present(len, MAXIMUM_LUMINANCE))
  265. c_conn->hdr_max_luminance = db[MAXIMUM_LUMINANCE];
  266. /* Byte 6: Desired Content Max Frame-average Luminance */
  267. if (sde_edid_is_luminance_value_present(len, FRAME_AVERAGE_LUMINANCE))
  268. c_conn->hdr_avg_luminance = db[FRAME_AVERAGE_LUMINANCE];
  269. /* Byte 7: Desired Content Min Luminance */
  270. if (sde_edid_is_luminance_value_present(len, MINIMUM_LUMINANCE))
  271. c_conn->hdr_min_luminance = db[MINIMUM_LUMINANCE];
  272. c_conn->hdr_supported = true;
  273. SDE_EDID_DEBUG("HDR electro-optical %d\n", c_conn->hdr_eotf);
  274. SDE_EDID_DEBUG("metadata desc 1 %d\n", c_conn->hdr_metadata_type_one);
  275. SDE_EDID_DEBUG("max luminance %d\n", c_conn->hdr_max_luminance);
  276. SDE_EDID_DEBUG("avg luminance %d\n", c_conn->hdr_avg_luminance);
  277. SDE_EDID_DEBUG("min luminance %d\n", c_conn->hdr_min_luminance);
  278. }
  279. /*
  280. * drm_extract_clrmetry_db - Parse the HDMI colorimetry extended block
  281. * @connector: connector corresponding to the HDMI sink
  282. * @db: start of the HDMI colorimetry extended block
  283. *
  284. * Parses the HDMI colorimetry block to extract sink info for @connector.
  285. */
  286. static void
  287. sde_parse_clrmetry_db(struct drm_connector *connector, const u8 *db)
  288. {
  289. struct sde_connector *c_conn;
  290. c_conn = to_sde_connector(connector);
  291. if (!db) {
  292. DRM_ERROR("invalid db\n");
  293. return;
  294. }
  295. /* Byte 3 Bit 0: xvYCC_601 */
  296. if (db[2] & BIT(0))
  297. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_xvYCC_601;
  298. /* Byte 3 Bit 1: xvYCC_709 */
  299. if (db[2] & BIT(1))
  300. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_xvYCC_709;
  301. /* Byte 3 Bit 2: sYCC_601 */
  302. if (db[2] & BIT(2))
  303. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_sYCC_601;
  304. /* Byte 3 Bit 3: ADOBE_YCC_601 */
  305. if (db[2] & BIT(3))
  306. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_ADOBE_YCC_601;
  307. /* Byte 3 Bit 4: ADOBE_RGB */
  308. if (db[2] & BIT(4))
  309. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_ADOBE_RGB;
  310. /* Byte 3 Bit 5: BT2020_CYCC */
  311. if (db[2] & BIT(5))
  312. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_BT2020_CYCC;
  313. /* Byte 3 Bit 6: BT2020_YCC */
  314. if (db[2] & BIT(6))
  315. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_BT2020_YCC;
  316. /* Byte 3 Bit 7: BT2020_RGB */
  317. if (db[2] & BIT(7))
  318. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_BT2020_RGB;
  319. /* Byte 4 Bit 7: DCI-P3 */
  320. if (db[3] & BIT(7))
  321. c_conn->color_enc_fmt |= DRM_EDID_CLRMETRY_DCI_P3;
  322. DRM_DEBUG_KMS("colorimetry fmts = 0x%x\n", c_conn->color_enc_fmt);
  323. }
  324. /*
  325. * sde_edid_parse_extended_blk_info - Parse the HDMI extended tag blocks
  326. * @connector: connector corresponding to external sink
  327. * @edid: handle to the EDID structure
  328. * Parses the all extended tag blocks extract sink info for @connector.
  329. */
  330. static void
  331. sde_edid_parse_extended_blk_info(struct drm_connector *connector,
  332. struct edid *edid)
  333. {
  334. const u8 *cea = sde_find_cea_extension(edid);
  335. const u8 *db = NULL;
  336. if (cea && sde_cea_revision(cea) >= 3) {
  337. int i, start, end;
  338. if (sde_cea_db_offsets(cea, &start, &end))
  339. return;
  340. sde_for_each_cea_db(cea, i, start, end) {
  341. db = &cea[i];
  342. if (sde_cea_db_tag(db) == USE_EXTENDED_TAG) {
  343. SDE_EDID_DEBUG("found ext tag block = %d\n",
  344. db[1]);
  345. switch (db[1]) {
  346. case VENDOR_SPECIFIC_VIDEO_DATA_BLOCK:
  347. sde_edid_parse_vsvdb_info(connector,
  348. db);
  349. break;
  350. case HDR_STATIC_METADATA_DATA_BLOCK:
  351. sde_edid_parse_hdr_db(connector, db);
  352. break;
  353. case COLORIMETRY_EXTENDED_DATA_BLOCK:
  354. sde_parse_clrmetry_db(connector, db);
  355. default:
  356. break;
  357. }
  358. }
  359. }
  360. }
  361. }
  362. static void _sde_edid_extract_speaker_allocation_data(
  363. struct sde_edid_ctrl *edid_ctrl)
  364. {
  365. u8 len;
  366. const u8 *sadb = NULL;
  367. u8 *cea = NULL;
  368. if (!edid_ctrl) {
  369. SDE_ERROR("invalid edid_ctrl\n");
  370. return;
  371. }
  372. SDE_EDID_DEBUG("%s +", __func__);
  373. cea = sde_find_cea_extension(edid_ctrl->edid);
  374. if (!cea) {
  375. SDE_DEBUG("CEA extension not found\n");
  376. return;
  377. }
  378. sadb = _sde_edid_find_block(cea, DBC_START_OFFSET,
  379. SPEAKER_ALLOCATION_DATA_BLOCK, &len);
  380. if ((sadb == NULL) || (len != MAX_SPKR_ALLOC_DATA_BLOCK_SIZE)) {
  381. SDE_DEBUG("No/Invalid Speaker Allocation Data Block\n");
  382. return;
  383. }
  384. memcpy(edid_ctrl->spkr_alloc_data_block, sadb + 1, len);
  385. edid_ctrl->sadb_size = len;
  386. SDE_EDID_DEBUG("speaker alloc data SP byte = %08x %s%s%s%s%s%s%s\n",
  387. sadb[1],
  388. (sadb[1] & BIT(0)) ? "FL/FR," : "",
  389. (sadb[1] & BIT(1)) ? "LFE," : "",
  390. (sadb[1] & BIT(2)) ? "FC," : "",
  391. (sadb[1] & BIT(3)) ? "RL/RR," : "",
  392. (sadb[1] & BIT(4)) ? "RC," : "",
  393. (sadb[1] & BIT(5)) ? "FLC/FRC," : "",
  394. (sadb[1] & BIT(6)) ? "RLC/RRC," : "");
  395. SDE_EDID_DEBUG("%s -", __func__);
  396. }
  397. struct sde_edid_ctrl *sde_edid_init(void)
  398. {
  399. struct sde_edid_ctrl *edid_ctrl = NULL;
  400. SDE_EDID_DEBUG("%s +\n", __func__);
  401. edid_ctrl = kzalloc(sizeof(*edid_ctrl), GFP_KERNEL);
  402. if (!edid_ctrl) {
  403. SDE_ERROR("edid_ctrl alloc failed\n");
  404. return NULL;
  405. }
  406. memset((edid_ctrl), 0, sizeof(*edid_ctrl));
  407. SDE_EDID_DEBUG("%s -\n", __func__);
  408. return edid_ctrl;
  409. }
  410. void sde_free_edid(void **input)
  411. {
  412. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(*input);
  413. SDE_EDID_DEBUG("%s +", __func__);
  414. kfree(edid_ctrl->edid);
  415. edid_ctrl->edid = NULL;
  416. }
  417. void sde_edid_deinit(void **input)
  418. {
  419. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(*input);
  420. SDE_EDID_DEBUG("%s +", __func__);
  421. sde_free_edid((void *)&edid_ctrl);
  422. kfree(edid_ctrl);
  423. SDE_EDID_DEBUG("%s -", __func__);
  424. }
  425. int _sde_edid_update_modes(struct drm_connector *connector,
  426. void *input)
  427. {
  428. int rc = 0;
  429. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(input);
  430. SDE_EDID_DEBUG("%s +", __func__);
  431. if (edid_ctrl->edid) {
  432. drm_connector_update_edid_property(connector,
  433. edid_ctrl->edid);
  434. rc = drm_add_edid_modes(connector, edid_ctrl->edid);
  435. _sde_edid_update_dc_modes(connector, edid_ctrl);
  436. sde_edid_parse_extended_blk_info(connector,
  437. edid_ctrl->edid);
  438. SDE_EDID_DEBUG("%s -", __func__);
  439. return rc;
  440. }
  441. drm_connector_update_edid_property(connector, NULL);
  442. SDE_EDID_DEBUG("%s null edid -", __func__);
  443. return rc;
  444. }
  445. u8 sde_get_edid_checksum(void *input)
  446. {
  447. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(input);
  448. struct edid *edid = NULL, *last_block = NULL;
  449. u8 *raw_edid = NULL;
  450. if (!edid_ctrl || !edid_ctrl->edid) {
  451. SDE_ERROR("invalid edid input\n");
  452. return 0;
  453. }
  454. edid = edid_ctrl->edid;
  455. raw_edid = (u8 *)edid;
  456. raw_edid += (edid->extensions * EDID_LENGTH);
  457. last_block = (struct edid *)raw_edid;
  458. if (last_block)
  459. return last_block->checksum;
  460. SDE_ERROR("Invalid block, no checksum\n");
  461. return 0;
  462. }
  463. bool sde_detect_hdmi_monitor(void *input)
  464. {
  465. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(input);
  466. return drm_detect_hdmi_monitor(edid_ctrl->edid);
  467. }
  468. void sde_parse_edid(void *input)
  469. {
  470. struct sde_edid_ctrl *edid_ctrl;
  471. if (!input) {
  472. SDE_ERROR("Invalid input\n");
  473. return;
  474. }
  475. edid_ctrl = (struct sde_edid_ctrl *)(input);
  476. if (edid_ctrl->edid) {
  477. sde_edid_extract_vendor_id(edid_ctrl);
  478. _sde_edid_extract_audio_data_blocks(edid_ctrl);
  479. _sde_edid_extract_speaker_allocation_data(edid_ctrl);
  480. } else {
  481. SDE_ERROR("edid not present\n");
  482. }
  483. }
  484. void sde_get_edid(struct drm_connector *connector,
  485. struct i2c_adapter *adapter, void **input)
  486. {
  487. struct sde_edid_ctrl *edid_ctrl = (struct sde_edid_ctrl *)(*input);
  488. edid_ctrl->edid = drm_get_edid(connector, adapter);
  489. SDE_EDID_DEBUG("%s +\n", __func__);
  490. if (!edid_ctrl->edid)
  491. SDE_ERROR("EDID read failed\n");
  492. if (edid_ctrl->edid)
  493. sde_parse_edid(edid_ctrl);
  494. SDE_EDID_DEBUG("%s -\n", __func__);
  495. };