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 3/5] drm/i915: Treat HDMI as DVI when cloning
Date: Tue, 08 Nov 2022 13:51:54 +0200 [thread overview]
Message-ID: <87v8np8y05.fsf@intel.com> (raw)
In-Reply-To: <20221107194604.15227-4-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>
>
> When doing HDMI+non-HDMI cloing the other sink can't get
*cloning
> the inframes/etc. so stuff like limited range output is
*infoframes
> not a good idea.
>
> Similarly when doing HDMI+HDMI cloning on g4x (only platform
> where we allow it) only one of the ports can receive infoframes
> and so again using any fancy stuff is a bad idea. We also don't
> track the inforames/audio state per-port so we'd end up with
> some kind of random mismash state when multipled encoders try
> to compute the same stuff. And the hardware will in fact
> automagically disable audio/infoframe transmission if you try
> to enable it for multiple HDMI ports at the same time.
>
> Thus disable all HDMI specific features when cloning.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index d3692c9a1d80..31927f8238d1 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2057,13 +2057,6 @@ static bool hdmi_bpc_possible(const struct intel_crtc_state *crtc_state, int bpc
> if (!intel_hdmi_source_bpc_possible(dev_priv, bpc))
> return false;
>
> - /*
> - * HDMI deep color affects the clocks, so it's only possible
> - * when not cloning with other encoder types.
> - */
> - if (bpc > 8 && crtc_state->output_types != BIT(INTEL_OUTPUT_HDMI))
> - return false;
> -
> /* Display Wa_1405510057:icl,ehl */
> if (intel_hdmi_is_ycbcr420(crtc_state) &&
> bpc == 10 && DISPLAY_VER(dev_priv) == 11 &&
> @@ -2238,6 +2231,12 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
> return ret;
> }
>
> +static bool intel_hdmi_is_cloned(const struct intel_crtc_state *crtc_state)
> +{
> + return crtc_state->uapi.encoder_mask &&
> + !is_power_of_2(crtc_state->uapi.encoder_mask);
> +}
> +
> int intel_hdmi_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state)
> @@ -2253,8 +2252,9 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
> return -EINVAL;
>
> pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
> - pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_hdmi,
> - conn_state);
> + pipe_config->has_hdmi_sink =
> + intel_has_hdmi_sink(intel_hdmi, conn_state) &&
> + !intel_hdmi_is_cloned(pipe_config);
>
> if (pipe_config->has_hdmi_sink)
> pipe_config->has_infoframe = true;
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-11-08 11:52 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
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 [this message]
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=87v8np8y05.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox