From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6133AC433FE for ; Thu, 21 Oct 2021 13:50:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43A6A6112D for ; Thu, 21 Oct 2021 13:50:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbhJUNwZ (ORCPT ); Thu, 21 Oct 2021 09:52:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:31697 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbhJUNwY (ORCPT ); Thu, 21 Oct 2021 09:52:24 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="228907432" X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="228907432" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 06:50:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="444808596" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by orsmga006.jf.intel.com with SMTP; 21 Oct 2021 06:50:00 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 21 Oct 2021 16:49:59 +0300 Date: Thu, 21 Oct 2021 16:49:59 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Claudio Suarez Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org, intel-gfx@lists.freedesktop.org, David Airlie , Daniel Vetter , Laurent Pinchart , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , Pan Xinhui , Emma Anholt , Maxime Ripard , Thierry Reding , Patrik Jakobsson , Jingoo Han , Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Chen-Yu Tsai , Sandy Huang , heiko@sntech.de, Neil Armstrong , Robert Foss , Ben Skeggs , nouveau@lists.freedesktop.org Subject: Re: [PATCH v3 13/13] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi Message-ID: References: <20211016184226.3862-1-cssk@net-c.es> <20211016184226.3862-14-cssk@net-c.es> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Oct 20, 2021 at 12:51:21AM +0200, Claudio Suarez wrote: > drm_get_edid() internally calls to drm_connector_update_edid_property() > and then drm_add_display_info(), which parses the EDID. > This happens in the function intel_hdmi_set_edid() and > intel_sdvo_tmds_sink_detect() (via intel_sdvo_get_edid()). > > Once EDID is parsed, the monitor HDMI support information is available > through drm_display_info.is_hdmi. Retriving the same information with > drm_detect_hdmi_monitor() is less efficient. Change to > drm_display_info.is_hdmi I meant we need to examine all call chains that can lead to .detect() to make sure all of them do in fact update the display_info beforehand. > > This is a TODO task in Documentation/gpu/todo.rst > > Signed-off-by: Claudio Suarez > --- > drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- > drivers/gpu/drm/i915/display/intel_sdvo.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c > index b04685bb6439..008e5b0ba408 100644 > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c > @@ -2355,7 +2355,7 @@ intel_hdmi_set_edid(struct drm_connector *connector) > to_intel_connector(connector)->detect_edid = edid; > if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) { > intel_hdmi->has_audio = drm_detect_monitor_audio(edid); > - intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); > + intel_hdmi->has_hdmi_sink = connector->display_info.is_hdmi; > > connected = true; > } > diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c > index 6cb27599ea03..b4065e4df644 100644 > --- a/drivers/gpu/drm/i915/display/intel_sdvo.c > +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c > @@ -2060,8 +2060,9 @@ 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); > + intel_sdvo->has_hdmi_monitor = > + connector->display_info.is_hdmi; > } > } else > status = connector_status_disconnected; > -- > 2.33.0 > > -- Ville Syrjälä Intel