All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 1/9] drm: Remove duplicate drm_mode_cea_vic()
Date: Thu, 21 Feb 2013 17:04:31 +0200	[thread overview]
Message-ID: <20130221150431.GG4469@intel.com> (raw)
In-Reply-To: <1361458218-14464-2-git-send-email-thierry.reding@avionic-design.de>

On Thu, Feb 21, 2013 at 03:50:10PM +0100, Thierry Reding wrote:
> The same function had already been merged with a different name. Remove
> the duplicate one but reuse some of its kerneldoc fragments for the
> existing implementation.

We have a few more uses of this in i915 since my RGB quant range
stuff got merged.

> 
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> ---
> Changes in v4:
> - replace drm_mode_cea_vic() usage in i915 HDMI code
> - move to front of patch series
> 
>  drivers/gpu/drm/drm_edid.c        | 30 +++++++-----------------------
>  drivers/gpu/drm/i915/intel_hdmi.c |  2 +-
>  include/drm/drm_crtc.h            |  3 +--
>  3 files changed, 9 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 67aa0dd..02da919 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1516,11 +1516,14 @@ u8 *drm_find_cea_extension(struct edid *edid)
>  }
>  EXPORT_SYMBOL(drm_find_cea_extension);
>  
> -/*
> - * Looks for a CEA mode matching given drm_display_mode.
> - * Returns its CEA Video ID code, or 0 if not found.
> +/**
> + * drm_match_cea_mode - look for a CEA mode matching given mode
> + * @to_match: display mode
> + *
> + * Returns the CEA Video ID (VIC) of the mode or 0 if it isn't a CEA-861
> + * mode.
>   */
> -u8 drm_match_cea_mode(struct drm_display_mode *to_match)
> +u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>  {
>  	struct drm_display_mode *cea_mode;
>  	u8 mode;
> @@ -2114,22 +2117,3 @@ int drm_add_modes_noedid(struct drm_connector *connector,
>  	return num_modes;
>  }
>  EXPORT_SYMBOL(drm_add_modes_noedid);
> -
> -/**
> - * drm_mode_cea_vic - return the CEA-861 VIC of a given mode
> - * @mode: mode
> - *
> - * RETURNS:
> - * The VIC number, 0 in case it's not a CEA-861 mode.
> - */
> -uint8_t drm_mode_cea_vic(const struct drm_display_mode *mode)
> -{
> -	uint8_t i;
> -
> -	for (i = 0; i < drm_num_cea_modes; i++)
> -		if (drm_mode_equal(mode, &edid_cea_modes[i]))
> -			return i + 1;
> -
> -	return 0;
> -}
> -EXPORT_SYMBOL(drm_mode_cea_vic);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 3ea0c8b..75d5152 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -348,7 +348,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
>  			avi_if.body.avi.ITC_EC_Q_SC |= DIP_AVI_RGB_QUANT_RANGE_FULL;
>  	}
>  
> -	avi_if.body.avi.VIC = drm_mode_cea_vic(adjusted_mode);
> +	avi_if.body.avi.VIC = drm_match_cea_mode(adjusted_mode);
>  
>  	intel_set_infoframe(encoder, &avi_if);
>  }
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 8b77627..7762718 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -1061,7 +1061,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>  				    void *data, struct drm_file *file_priv);
>  extern u8 *drm_find_cea_extension(struct edid *edid);
> -extern u8 drm_match_cea_mode(struct drm_display_mode *to_match);
> +extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>  extern bool drm_detect_monitor_audio(struct edid *edid);
>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> @@ -1079,7 +1079,6 @@ extern struct drm_display_mode *drm_gtf_mode_complex(struct drm_device *dev,
>  				int GTF_2C, int GTF_K, int GTF_2J);
>  extern int drm_add_modes_noedid(struct drm_connector *connector,
>  				int hdisplay, int vdisplay);
> -extern uint8_t drm_mode_cea_vic(const struct drm_display_mode *mode);
>  
>  extern int drm_edid_header_is_valid(const u8 *raw_edid);
>  extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid);
> -- 
> 1.8.1.2

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-02-21 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 14:50 [PATCH v4 0/9] Add HDMI infoframe helpers Thierry Reding
2013-02-21 14:50 ` [PATCH v4 1/9] drm: Remove duplicate drm_mode_cea_vic() Thierry Reding
2013-02-21 15:04   ` Ville Syrjälä [this message]
2013-02-21 15:13     ` Thierry Reding
2013-02-21 14:50 ` [PATCH v4 2/9] drm: Move mode tables to drm_edid.c Thierry Reding
2013-02-21 14:50 ` [PATCH v4 3/9] drm: Add some missing forward declarations Thierry Reding
2013-02-21 14:50 ` [PATCH v4 4/9] video: Add generic HDMI infoframe helpers Thierry Reding
2013-02-21 14:50 ` [PATCH v4 5/9] drm: Add " Thierry Reding
2013-02-21 14:50 ` [PATCH v4 6/9] drm: Add EDID helper documentation Thierry Reding
2013-02-21 14:50 ` [PATCH v4 7/9] drm/tegra: Use generic HDMI infoframe helpers Thierry Reding
2013-02-21 14:50 ` [PATCH v4 8/9] drm/i915: " Thierry Reding
2013-02-21 14:50 ` [PATCH v4 9/9] drm/radeon: " Thierry Reding
2013-02-21 17:38 ` [PATCH v4 0/9] Add " Alex Deucher

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=20130221150431.GG4469@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=thierry.reding@avionic-design.de \
    /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.