intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 7/9] drm/i915/sdvo: Make SDVO deal with HDMI pixel repeat
Date: Thu, 9 Jul 2020 14:47:10 +0300	[thread overview]
Message-ID: <20200709114710.GD16776@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20200108181242.13650-7-ville.syrjala@linux.intel.com>

On Wed, Jan 08, 2020 at 08:12:40PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> With SDVO the pipe config pixel_multiplier only concerns itself with the
> data on the SDVO bus. Any HDMI specific pixel repeat must be handled by
> the SDVO device itself. To do that simply configure the SDVO pixel
> replication factor appropriately. We already set up the infoframe PRB
> values correctly via the infoframe helpers.
> 
> There is no cap we can check for this. The spec says that 1X,2X,4X are
> mandatory, anything else is optional. 1X and 2X are all we need so
> we should be able to assume they work.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

Shouldn't DRM_MODE_FLAG_DBLCLK be set for the read-out mode in
intel_sdvo_get_config()?

> ---
>  drivers/gpu/drm/i915/display/intel_sdvo.c | 27 +++++++++++++++++++----
>  1 file changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index a0bbd728aa54..34d5bd750de8 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -943,6 +943,13 @@ static bool intel_sdvo_set_colorimetry(struct intel_sdvo *intel_sdvo,
>  	return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_COLORIMETRY, &mode, 1);
>  }
>  
> +static bool intel_sdvo_set_pixel_replication(struct intel_sdvo *intel_sdvo,
> +					     u8 pixel_repeat)
> +{
> +	return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_PIXEL_REPLI,
> +				    &pixel_repeat, 1);
> +}
> +
>  static bool intel_sdvo_set_audio_state(struct intel_sdvo *intel_sdvo,
>  				       u8 audio_state)
>  {
> @@ -1493,6 +1500,9 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
>  					   SDVO_COLORIMETRY_RGB220 :
>  					   SDVO_COLORIMETRY_RGB256);
>  		intel_sdvo_set_avi_infoframe(intel_sdvo, crtc_state);
> +		intel_sdvo_set_pixel_replication(intel_sdvo,
> +						 !!(adjusted_mode->flags &
> +						    DRM_MODE_FLAG_DBLCLK));
>  	} else
>  		intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_DVI);
>  
> @@ -1839,17 +1849,26 @@ intel_sdvo_mode_valid(struct drm_connector *connector,
>  	struct intel_sdvo_connector *intel_sdvo_connector =
>  		to_intel_sdvo_connector(connector);
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> +	bool has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo, connector->state);
> +	int clock = mode->clock;
>  
>  	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
>  		return MODE_NO_DBLESCAN;
>  
> -	if (intel_sdvo->pixel_clock_min > mode->clock)
> -		return MODE_CLOCK_LOW;
>  
> -	if (intel_sdvo->pixel_clock_max < mode->clock)
> +	if (clock > max_dotclk)
>  		return MODE_CLOCK_HIGH;
>  
> -	if (mode->clock > max_dotclk)
> +	if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
> +		if (!has_hdmi_sink)
> +			return MODE_CLOCK_LOW;
> +		clock *= 2;
> +	}
> +
> +	if (intel_sdvo->pixel_clock_min > clock)
> +		return MODE_CLOCK_LOW;
> +
> +	if (intel_sdvo->pixel_clock_max < clock)
>  		return MODE_CLOCK_HIGH;
>  
>  	if (IS_LVDS(intel_sdvo_connector)) {
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-07-09 11:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 18:12 [Intel-gfx] [PATCH 1/9] drm/i915/sdvo: Reduce the size of the on stack buffers Ville Syrjala
2020-01-08 18:12 ` [Intel-gfx] [PATCH 2/9] drm/i915: Consolidate HDMI force_dvi handling Ville Syrjala
2020-01-14 14:51   ` Jani Nikula
2020-01-08 18:12 ` [Intel-gfx] [PATCH 3/9] drm/i915/sdvo: Consolidate SDVO " Ville Syrjala
2020-01-14 14:52   ` Jani Nikula
2020-01-08 18:12 ` [Intel-gfx] [PATCH 4/9] drm/i915/sdvo: Fix SDVO colorimetry bit defines Ville Syrjala
2020-07-09  9:57   ` Imre Deak
2020-01-08 18:12 ` [Intel-gfx] [PATCH 5/9] drm/i915/sdvo: Implement limited color range for SDVO HDMI properly Ville Syrjala
2020-07-09 10:51   ` Imre Deak
2020-01-08 18:12 ` [Intel-gfx] [PATCH 6/9] drm/i915: Reject DRM_MODE_FLAG_DBLCLK with DVI sinks Ville Syrjala
2020-07-09 11:01   ` Imre Deak
2020-07-09 12:04     ` Ville Syrjälä
2020-01-08 18:12 ` [Intel-gfx] [PATCH 7/9] drm/i915/sdvo: Make SDVO deal with HDMI pixel repeat Ville Syrjala
2020-07-09 11:47   ` Imre Deak [this message]
2020-07-09 12:20     ` Ville Syrjälä
2020-01-08 18:12 ` [Intel-gfx] [PATCH 8/9] drm/i915/sdvo: Make .get_modes() return the number of modes Ville Syrjala
2020-07-09 11:51   ` Imre Deak
2020-01-08 18:12 ` [Intel-gfx] [PATCH 9/9] drm/i915/dvo: " Ville Syrjala
2020-07-09 11:52   ` Imre Deak
2020-01-09 11:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/sdvo: Reduce the size of the on stack buffers Patchwork
2020-01-09 12:00 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-01-14 14:52 ` [Intel-gfx] [PATCH 1/9] " Jani Nikula
2020-01-16 11:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/sdvo: Reduce the size of the on stack buffers (rev2) Patchwork
2020-01-16 11:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-16 11:56 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-01-18 23:44 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork

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=20200709114710.GD16776@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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).