public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 07/13] drm/i915/sdvo: stop caching has_hdmi_monitor in struct intel_sdvo
Date: Mon, 29 May 2023 11:35:09 +0530	[thread overview]
Message-ID: <5b1dc901-ef72-9c7e-8f26-190e8097520d@intel.com> (raw)
In-Reply-To: <e3ae4d0b7472eb71b4be2e4017a48d3a7880cd2e.1682077472.git.jani.nikula@intel.com>

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 4/21/2023 5:17 PM, Jani Nikula wrote:
> Use the information stored in display info.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_sdvo.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index e12ba458636c..0bbfab95ca37 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -117,7 +117,6 @@ struct intel_sdvo {
>   
>   	enum port port;
>   
> -	bool has_hdmi_monitor;
>   	bool has_hdmi_audio;
>   
>   	/* DDC bus used by this SDVO encoder */
> @@ -1303,10 +1302,13 @@ static void i9xx_adjust_sdvo_tv_clock(struct intel_crtc_state *pipe_config)
>   	pipe_config->clock_set = true;
>   }
>   
> -static bool intel_has_hdmi_sink(struct intel_sdvo *sdvo,
> +static bool intel_has_hdmi_sink(struct intel_sdvo_connector *intel_sdvo_connector,
>   				const struct drm_connector_state *conn_state)
>   {
> -	return sdvo->has_hdmi_monitor &&
> +	struct drm_connector *connector = conn_state->connector;
> +
> +	return intel_sdvo_connector->is_hdmi &&
> +		connector->display_info.is_hdmi &&
>   		READ_ONCE(to_intel_digital_connector_state(conn_state)->force_audio) != HDMI_AUDIO_OFF_DVI;
>   }
>   
> @@ -1400,7 +1402,7 @@ static int intel_sdvo_compute_config(struct intel_encoder *encoder,
>   	pipe_config->pixel_multiplier =
>   		intel_sdvo_get_pixel_multiplier(adjusted_mode);
>   
> -	pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo, conn_state);
> +	pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo_connector, conn_state);
>   
>   	pipe_config->has_audio =
>   		intel_sdvo_has_audio(encoder, pipe_config, conn_state) &&
> @@ -1906,7 +1908,7 @@ 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);
> +	bool has_hdmi_sink = intel_has_hdmi_sink(intel_sdvo_connector, connector->state);
>   	int clock = mode->clock;
>   
>   	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
> @@ -2095,7 +2097,6 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
>   		if (edid->input & DRM_EDID_INPUT_DIGITAL) {
>   			status = connector_status_connected;
>   			if (intel_sdvo_connector->is_hdmi) {
> -				intel_sdvo->has_hdmi_monitor = drm_detect_hdmi_monitor(edid);
>   				intel_sdvo->has_hdmi_audio = drm_detect_monitor_audio(edid);
>   			}
>   		} else
> @@ -2147,7 +2148,6 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
>   
>   	intel_sdvo->attached_output = response;
>   
> -	intel_sdvo->has_hdmi_monitor = false;
>   	intel_sdvo->has_hdmi_audio = false;
>   
>   	if ((intel_sdvo_connector->output_flag & response) == 0)

  reply	other threads:[~2023-05-29  6:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 11:47 [Intel-gfx] [PATCH 00/13] drm/display & drm/i915: more struct drm_edid conversions Jani Nikula
2023-04-21 11:47 ` [Intel-gfx] [PATCH 01/13] drm/edid: parse display info has_audio similar to is_hdmi Jani Nikula
2023-05-29  4:56   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 02/13] drm/display/dp_mst: drop has_audio from struct drm_dp_mst_port Jani Nikula
2023-05-29  5:10   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 03/13] drm/i915/dp: stop caching has_audio in struct intel_dp Jani Nikula
2023-05-29  5:15   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 04/13] drm/i915/dp: stop caching has_hdmi_sink " Jani Nikula
2023-05-29  5:22   ` Nautiyal, Ankit K
2023-05-29  5:32     ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 05/13] drm/i915/hdmi: stop caching has_audio in struct intel_hdmi Jani Nikula
2023-05-29  5:43   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 06/13] drm/i915/hdmi: stop caching has_hdmi_sink " Jani Nikula
2023-05-29  5:49   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 07/13] drm/i915/sdvo: stop caching has_hdmi_monitor in struct intel_sdvo Jani Nikula
2023-05-29  6:05   ` Nautiyal, Ankit K [this message]
2023-04-21 11:47 ` [Intel-gfx] [PATCH 08/13] drm/i915/sdvo: stop caching has_hdmi_audio " Jani Nikula
2023-05-29  6:06   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 09/13] drm/edid: add drm_edid_read_switcheroo() Jani Nikula
2023-05-30  4:09   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 10/13] drm/i915/lvds: switch to drm_edid_read_switcheroo() Jani Nikula
2023-04-23  8:10   ` Lukas Wunner
2023-04-21 11:47 ` [Intel-gfx] [PATCH 11/13] drm/edid: make drm_edid_duplicate() safe to call with NULL parameter Jani Nikula
2023-05-29 13:11   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 12/13] drm/display/dp_mst: convert to struct drm_edid Jani Nikula
2023-05-29 13:08   ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 13/13] drm/i915/display: switch the rest of the connectors " Jani Nikula
2023-05-30  4:38   ` Nautiyal, Ankit K
2023-04-21 14:11 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/display & drm/i915: more struct drm_edid conversions Patchwork
2023-04-21 14:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-21 22:34 ` [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=5b1dc901-ef72-9c7e-8f26-190e8097520d@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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