瀏覽代碼

drm/exynos: check if raw edid data is fake or not for test

if raw edid data isn't same as fake data then it can't be tested.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Inki Dae 13 年之前
父節點
當前提交
d7b8478aa9
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/gpu/drm/exynos/exynos_drm_vidi.c

+ 6 - 0
drivers/gpu/drm/exynos/exynos_drm_vidi.c

@@ -533,6 +533,12 @@ static int vidi_store_connection(struct device *dev,
 	if (!ctx->raw_edid)
 		ctx->raw_edid = (struct edid *)fake_edid_info;
 
+	/* if raw_edid isn't same as fake data then it can't be tested. */
+	if (ctx->raw_edid != (struct edid *)fake_edid_info) {
+		DRM_DEBUG_KMS("edid data is not fake data.\n");
+		return -EINVAL;
+	}
+
 	DRM_DEBUG_KMS("requested connection.\n");
 
 	drm_helper_hpd_irq_event(ctx->subdrv.drm_dev);