linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: [DPU PATCH] drm: Remove duplicate ycbcr420 parsing
Date: Wed, 21 Feb 2018 13:30:25 -0500	[thread overview]
Message-ID: <20180221183041.33247-1-seanpaul@chromium.org> (raw)

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

             reply	other threads:[~2018-02-21 18:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 18:30 Sean Paul [this message]
     [not found] ` <20180221183041.33247-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-03-09  0:48   ` [DPU PATCH] drm: Remove duplicate ycbcr420 parsing Jeykumar Sankaran
     [not found]     ` <9ed08db588c946d77eb4c06c7b990360-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-09  0:49       ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180221183041.33247-1-seanpaul@chromium.org \
    --to=seanpaul-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).