[PATCH 21/25] drm/edid: convert cea_db_iter_edid_begin() to drm_edid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We'll need to propagate drm_edid everywhere.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 drivers/gpu/drm/drm_edid.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 706552ae00ea..82a242a71ecf 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4430,12 +4430,13 @@ static bool cea_db_is_vendor(const struct cea_db *db, int vendor_oui)
 		oui(data[2], data[1], data[0]) == vendor_oui;
 }
 
-static void cea_db_iter_edid_begin(const struct edid *edid, struct cea_db_iter *iter)
+static void cea_db_iter_edid_begin(const struct drm_edid *drm_edid,
+				   struct cea_db_iter *iter)
 {
 	memset(iter, 0, sizeof(*iter));
 
-	drm_edid_iter_begin(edid, &iter->edid_iter);
-	displayid_iter_edid_begin(edid, &iter->displayid_iter);
+	drm_edid_iter_begin(drm_edid->edid, &iter->edid_iter);
+	displayid_iter_edid_begin(drm_edid->edid, &iter->displayid_iter);
 }
 
 static const struct cea_db *
@@ -4657,7 +4658,7 @@ static int add_cea_modes(struct drm_connector *connector,
 	struct cea_db_iter iter;
 	int modes = 0;
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		const u8 *hdmi = NULL, *video = NULL;
 		u8 hdmi_len = 0, video_len = 0;
@@ -4908,7 +4909,7 @@ static void drm_edid_to_eld(struct drm_connector *connector,
 	eld[DRM_ELD_PRODUCT_CODE0] = drm_edid->edid->prod_code[0];
 	eld[DRM_ELD_PRODUCT_CODE1] = drm_edid->edid->prod_code[1];
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		const u8 *data = cea_db_data(db);
 		int len = cea_db_payload_len(db);
@@ -4961,7 +4962,7 @@ static int _drm_edid_to_sad(const struct drm_edid *drm_edid,
 	struct cea_db_iter iter;
 	int count = 0;
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		if (cea_db_tag(db) == CTA_DB_AUDIO) {
 			int j;
@@ -5017,7 +5018,7 @@ static int _drm_edid_to_speaker_allocation(const struct drm_edid *drm_edid,
 	struct cea_db_iter iter;
 	int count = 0;
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		if (cea_db_tag(db) == CTA_DB_SPEAKER &&
 		    cea_db_payload_len(db) == 3) {
@@ -5110,7 +5111,7 @@ static bool _drm_detect_hdmi_monitor(const struct drm_edid *drm_edid)
 	 * Because HDMI identifier is in Vendor Specific Block,
 	 * search it from all data blocks of CEA extension.
 	 */
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		if (cea_db_is_hdmi_vsdb(db)) {
 			hdmi = true;
@@ -5167,7 +5168,7 @@ static bool _drm_detect_monitor_audio(const struct drm_edid *drm_edid)
 		goto end;
 	}
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		if (cea_db_tag(db) == CTA_DB_AUDIO) {
 			const u8 *data = cea_db_data(db);
@@ -5529,7 +5530,7 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 	}
 	drm_edid_iter_end(&edid_iter);
 
-	cea_db_iter_edid_begin(drm_edid->edid, &iter);
+	cea_db_iter_edid_begin(drm_edid, &iter);
 	cea_db_iter_for_each(db, &iter) {
 		/* FIXME: convert parsers to use struct cea_db */
 		const u8 *data = (const u8 *)db;
-- 
2.30.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux