linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Abhinav Kumar <abhinavk@codeaurora.org>, dri-devel@lists.freedesktop.org
Cc: Uma Shankar <uma.shankar@intel.com>,
	linux-arm-msm@vger.kernel.org, robdclark@gmail.com,
	seanpaul@chromium.org, nganji@codeaurora.org,
	aravindh@codeaurora.org, adelva@google.com,
	Abhinav Kumar <abhinavk@codeaurora.org>
Subject: Re: [PATCH] drm: Parse Colorimetry data block from EDID
Date: Mon, 27 Jan 2020 10:46:01 -0800	[thread overview]
Message-ID: <5e2f2fe9.1c69fb81.6d20f.a6b4@mx.google.com> (raw)
In-Reply-To: <1579819245-21913-1-git-send-email-abhinavk@codeaurora.org>

Quoting Abhinav Kumar (2020-01-23 14:40:45)
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 99769d6..148bfa4 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -4199,6 +4200,57 @@ static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
>         mode->clock = clock;
>  }
>  
> +static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db)
> +{
> +       if (cea_db_tag(db) != USE_EXTENDED_TAG)
> +               return false;
> +
> +       if (db[1] != COLORIMETRY_DATA_BLOCK)
> +               return false;
> +
> +       if (cea_db_payload_len(db) < 2)
> +               return false;
> +
> +       return true;
> +}
> +
> +static void
> +drm_parse_colorimetry_data_block(struct drm_connector *connector, const u8 *db)
> +{
> +       struct drm_hdmi_info *info = &connector->display_info.hdmi;
> +
> +       /* As per CEA 861-G spec */
> +       /* Byte 3 Bit 0: xvYCC_601 */
> +       if (db[2] & BIT(0))

Why not use the defines added in drm_edid.h in this patch? Then the
comments can be removed because the code would look like

	if (db[2] & DRM_EDID_CLRMETRY_xvYCC_601)


  parent reply	other threads:[~2020-01-27 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 22:40 [PATCH] drm: Parse Colorimetry data block from EDID Abhinav Kumar
2020-01-24 14:36 ` Ville Syrjälä
2020-01-24 20:43   ` abhinavk
2020-01-27 18:46 ` Stephen Boyd [this message]
2020-01-27 20:42   ` abhinavk

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=5e2f2fe9.1c69fb81.6d20f.a6b4@mx.google.com \
    --to=swboyd@chromium.org \
    --cc=abhinavk@codeaurora.org \
    --cc=adelva@google.com \
    --cc=aravindh@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=nganji@codeaurora.org \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    --cc=uma.shankar@intel.com \
    /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).