All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/5] drm/i915: Force RGB output for DVI sink
Date: Tue, 08 Nov 2022 13:50:58 +0200	[thread overview]
Message-ID: <87y1sl8y1p.fsf@intel.com> (raw)
In-Reply-To: <20221107194604.15227-3-ville.syrjala@linux.intel.com>

On Mon, 07 Nov 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> YCbCr output requires infoframes and whatnot, so don't allow
> it when dealing with a DVI sink (or a HDMI sink we wishc to
> treat as DVI).

*wish

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index f2a4431a7fbf..d3692c9a1d80 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2190,9 +2190,13 @@ static bool intel_hdmi_has_audio(struct intel_encoder *encoder,
>  }
>  
>  static enum intel_output_format
> -intel_hdmi_output_format(struct intel_connector *connector,
> +intel_hdmi_output_format(const struct intel_crtc_state *crtc_state,
> +			 struct intel_connector *connector,
>  			 bool ycbcr_420_output)
>  {
> +	if (!crtc_state->has_hdmi_sink)
> +		return INTEL_OUTPUT_FORMAT_RGB;
> +
>  	if (connector->base.ycbcr_420_allowed && ycbcr_420_output)
>  		return INTEL_OUTPUT_FORMAT_YCBCR420;
>  	else
> @@ -2211,7 +2215,8 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
>  	bool ycbcr_420_only = drm_mode_is_420_only(info, adjusted_mode);
>  	int ret;
>  
> -	crtc_state->output_format = intel_hdmi_output_format(connector, ycbcr_420_only);
> +	crtc_state->output_format =
> +		intel_hdmi_output_format(crtc_state, connector, ycbcr_420_only);
>  
>  	if (ycbcr_420_only && !intel_hdmi_is_ycbcr420(crtc_state)) {
>  		drm_dbg_kms(&i915->drm,
> @@ -2226,7 +2231,7 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
>  		    !drm_mode_is_420_also(info, adjusted_mode))
>  			return ret;
>  
> -		crtc_state->output_format = intel_hdmi_output_format(connector, true);
> +		crtc_state->output_format = intel_hdmi_output_format(crtc_state, connector, true);
>  		ret = intel_hdmi_compute_clock(encoder, crtc_state, respect_downstream_limits);
>  	}

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-11-08 11:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 19:45 [Intel-gfx] [PATCH 0/5] drm/i915: Fix audio/infroframes on g4x Ville Syrjala
2022-11-07 19:46 ` [Intel-gfx] [PATCH 1/5] drm/i915: Introduce g4x_hdmi_compute_config() Ville Syrjala
2022-11-08 11:50   ` Jani Nikula
2022-11-07 19:46 ` [Intel-gfx] [PATCH 2/5] drm/i915: Force RGB output for DVI sink Ville Syrjala
2022-11-08 11:50   ` Jani Nikula [this message]
2022-11-07 19:46 ` [Intel-gfx] [PATCH 3/5] drm/i915: Treat HDMI as DVI when cloning Ville Syrjala
2022-11-08 11:51   ` Jani Nikula
2022-11-07 19:46 ` [Intel-gfx] [PATCH 4/5] drm/i915: Move has_hdmi_sink out from intel_hdmi_compute_config() Ville Syrjala
2022-11-08 12:06   ` Jani Nikula
2022-11-07 19:46 ` [Intel-gfx] [PATCH 5/5] drm/i915: Pick one HDMI port for infoframe/audio transmission on g4x Ville Syrjala
2023-05-04 21:13   ` Shankar, Uma
2023-05-05 11:05     ` Ville Syrjälä
2023-05-05 11:15       ` Shankar, Uma
2023-05-05 17:17         ` Ville Syrjälä
2022-11-08  0:01 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Fix audio/infroframes " Patchwork
2022-11-08  0:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-08  8:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=87y1sl8y1p.fsf@intel.com \
    --to=jani.nikula@linux.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 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.