From: abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Jeykumar Sankaran <jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [DPU PATCH] drm: Remove duplicate ycbcr420 parsing
Date: Thu, 08 Mar 2018 16:49:53 -0800 [thread overview]
Message-ID: <bdcf22fe7f66b72301b4439852c85a0a@codeaurora.org> (raw)
In-Reply-To: <9ed08db588c946d77eb4c06c7b990360-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On 2018-03-08 16:48, Jeykumar Sankaran wrote:
> On 2018-02-21 10:30, Sean Paul wrote:
>> Introduced in the dpu patch series, this duplicaates the already
>> existing do_y420vdb_modes function.
>>
>> Signed-off-by: Sean Paul <seanpaul@chromium.org>
>
> Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.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);
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
prev parent reply other threads:[~2018-03-09 0:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=bdcf22fe7f66b72301b4439852c85a0a@codeaurora.org \
--to=abhinavk-sgv2jx0feol9jmxxk+q4oq@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-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.