linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [DPU PATCH] drm: Remove duplicate ycbcr420 parsing
@ 2018-02-21 18:30 Sean Paul
       [not found] ` <20180221183041.33247-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Paul @ 2018-02-21 18:30 UTC (permalink / raw)
  To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ, robdclark-Re5JQEeQqe8AvxtiuMwx3w,
	Sean Paul, hoegsberg-F7+t8E8rja9g9hUCZPvPmw

Introduced in the dpu patch series, this duplicaates the already
existing do_y420vdb_modes function.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/drm_edid.c | 77 --------------------------------------
 1 file changed, 77 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 825b169ce0e0..ddd537914575 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -98,14 +98,6 @@ struct detailed_mode_closure {
 #define LEVEL_GTF2	2
 #define LEVEL_CVT	3
 
-/*Enum storing luminance types for HDR blocks in EDID*/
-enum luminance_value {
-	NO_LUMINANCE_DATA = 3,
-	MAXIMUM_LUMINANCE = 4,
-	FRAME_AVERAGE_LUMINANCE = 5,
-	MINIMUM_LUMINANCE = 6
-};
-
 static const struct edid_quirk {
 	char vendor[4];
 	int product_id;
@@ -2809,9 +2801,7 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid,
 #define VIDEO_BLOCK     0x02
 #define VENDOR_BLOCK    0x03
 #define SPEAKER_BLOCK	0x04
-#define HDR_STATIC_METADATA_EXTENDED_DATA_BLOCK 0x06
 #define USE_EXTENDED_TAG 0x07
-#define VIDEO_CAPABILITY_BLOCK	0x07
 #define EXT_VIDEO_CAPABILITY_BLOCK 0x00
 #define EXT_VIDEO_DATA_BLOCK_420	0x0E
 #define EXT_VIDEO_CAP_BLOCK_Y420CMDB 0x0F
@@ -3800,72 +3790,6 @@ drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)
 		      connector->audio_latency[1]);
 }
 
-static u8 *
-drm_edid_find_extended_tag_block(struct edid *edid, int blk_id)
-{
-	u8 *db = NULL;
-	u8 *cea = NULL;
-
-	if (!edid)
-		return NULL;
-
-	cea = drm_find_cea_extension(edid);
-
-	if (cea && cea_revision(cea) >= 3) {
-		int i, start, end;
-
-		if (cea_db_offsets(cea, &start, &end))
-			return NULL;
-
-		for_each_cea_db(cea, i, start, end) {
-			db = &cea[i];
-			if ((cea_db_tag(db) == USE_EXTENDED_TAG) &&
-				(db[1] == blk_id))
-				return db;
-		}
-	}
-	return NULL;
-}
-
-/*
- * add_YCbCr420VDB_modes - add the modes found in Ycbcr420 VDB block
- * @connector: connector corresponding to the HDMI sink
- * @edid: handle to the EDID structure
- * Parses the YCbCr420 VDB block and adds the modes to @connector.
- */
-static int
-add_YCbCr420VDB_modes(struct drm_connector *connector, struct edid *edid)
-{
-
-	const u8 *db = NULL;
-	u32 i = 0;
-	u32 modes = 0;
-	u32 video_format = 0;
-	u8 len = 0;
-
-	/*Find the YCbCr420 VDB*/
-	db = drm_edid_find_extended_tag_block(edid, EXT_VIDEO_DATA_BLOCK_420);
-	/* Offset to byte 3 */
-	if (db) {
-		len = db[0] & 0x1F;
-		db += 2;
-		for (i = 0; i < len - 1; i++) {
-			struct drm_display_mode *mode;
-
-			video_format = *(db + i) & 0x7F;
-			mode = drm_display_mode_from_vic_index(connector,
-					db, len-1, i);
-			if (mode) {
-				DRM_DEBUG_KMS("Adding mode for vic = %d\n",
-				video_format);
-				drm_mode_probed_add(connector, mode);
-				modes++;
-			}
-		}
-	}
-	return modes;
-}
-
 static void
 monitor_name(struct detailed_timing *t, void *data)
 {
@@ -4778,7 +4702,6 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 	num_modes += add_cea_modes(connector, edid);
 	num_modes += add_alternate_cea_modes(connector, edid);
 	num_modes += add_displayid_detailed_modes(connector, edid);
-	num_modes += add_YCbCr420VDB_modes(connector, edid);
 	if (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF)
 		num_modes += add_inferred_modes(connector, edid);
 
-- 
2.16.1.291.g4437f3f132-goog

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-09  0:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 18:30 [DPU PATCH] drm: Remove duplicate ycbcr420 parsing Sean Paul
     [not found] ` <20180221183041.33247-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-03-09  0:48   ` Jeykumar Sankaran
     [not found]     ` <9ed08db588c946d77eb4c06c7b990360-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-09  0:49       ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).