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 3E076C433F5 for ; Fri, 15 Oct 2021 12:59:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23AA060F93 for ; Fri, 15 Oct 2021 12:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239055AbhJONBQ (ORCPT ); Fri, 15 Oct 2021 09:01:16 -0400 Received: from mga04.intel.com ([192.55.52.120]:3690 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234376AbhJONBO (ORCPT ); Fri, 15 Oct 2021 09:01:14 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="226681256" X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="226681256" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 05:59:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="492550362" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by orsmga008.jf.intel.com with SMTP; 15 Oct 2021 05:58:56 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 15 Oct 2021 15:58:55 +0300 Date: Fri, 15 Oct 2021 15:58:55 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula Cc: Claudio Suarez , 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 , 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 , Benjamin Gaignard , Sandy Huang , heiko@sntech.de, Andrzej Hajda , Neil Armstrong , Robert Foss , Ben Skeggs , nouveau@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 15/15] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi Message-ID: References: <20211015113713.630119-1-cssk@net-c.es> <20211015113713.630119-16-cssk@net-c.es> <87a6jav4n3.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87a6jav4n3.fsf@intel.com> X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org On Fri, Oct 15, 2021 at 03:44:48PM +0300, Jani Nikula wrote: > On Fri, 15 Oct 2021, Claudio Suarez wrote: > > 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 where possible. > > > > This is a TODO task in Documentation/gpu/todo.rst > > > > Signed-off-by: Claudio Suarez > > --- > > drivers/gpu/drm/i915/display/intel_connector.c | 5 +++++ > > drivers/gpu/drm/i915/display/intel_connector.h | 1 + > > drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- > > drivers/gpu/drm/i915/display/intel_sdvo.c | 3 ++- > > 4 files changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c > > index 9bed1ccecea0..3346b55df6e1 100644 > > --- a/drivers/gpu/drm/i915/display/intel_connector.c > > +++ b/drivers/gpu/drm/i915/display/intel_connector.c > > @@ -213,6 +213,11 @@ int intel_ddc_get_modes(struct drm_connector *connector, > > return ret; > > } > > > > +bool intel_connector_is_hdmi_monitor(struct drm_connector *connector) > > +{ > > + return connector->display_info.is_hdmi; > > +} > > + > > A helper like this belongs in drm, not i915. Seems useful in other > drivers too. Not sure it's actually helpful for i915. We end up having to root around in the display_info in a lot of places anyway. So a helper for single boolean seems a bit out of place perhaps. -- Ville Syrjälä Intel 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 9305FC433FE for ; Fri, 15 Oct 2021 12:59:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68EE161090 for ; Fri, 15 Oct 2021 12:59:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 68EE161090 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C22FC6E311; Fri, 15 Oct 2021 12:59:07 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E3F46E2D5; Fri, 15 Oct 2021 12:59:06 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="251353558" X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="251353558" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 05:59:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="492550362" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by orsmga008.jf.intel.com with SMTP; 15 Oct 2021 05:58:56 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 15 Oct 2021 15:58:55 +0300 Date: Fri, 15 Oct 2021 15:58:55 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula Cc: Claudio Suarez , 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 , 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 , Benjamin Gaignard , Sandy Huang , heiko@sntech.de, Andrzej Hajda , Neil Armstrong , Robert Foss , Ben Skeggs , nouveau@lists.freedesktop.org Message-ID: References: <20211015113713.630119-1-cssk@net-c.es> <20211015113713.630119-16-cssk@net-c.es> <87a6jav4n3.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87a6jav4n3.fsf@intel.com> X-Patchwork-Hint: comment Subject: Re: [Nouveau] [Intel-gfx] [PATCH 15/15] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Fri, Oct 15, 2021 at 03:44:48PM +0300, Jani Nikula wrote: > On Fri, 15 Oct 2021, Claudio Suarez wrote: > > 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 where possible. > > > > This is a TODO task in Documentation/gpu/todo.rst > > > > Signed-off-by: Claudio Suarez > > --- > > drivers/gpu/drm/i915/display/intel_connector.c | 5 +++++ > > drivers/gpu/drm/i915/display/intel_connector.h | 1 + > > drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- > > drivers/gpu/drm/i915/display/intel_sdvo.c | 3 ++- > > 4 files changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c > > index 9bed1ccecea0..3346b55df6e1 100644 > > --- a/drivers/gpu/drm/i915/display/intel_connector.c > > +++ b/drivers/gpu/drm/i915/display/intel_connector.c > > @@ -213,6 +213,11 @@ int intel_ddc_get_modes(struct drm_connector *connector, > > return ret; > > } > > > > +bool intel_connector_is_hdmi_monitor(struct drm_connector *connector) > > +{ > > + return connector->display_info.is_hdmi; > > +} > > + > > A helper like this belongs in drm, not i915. Seems useful in other > drivers too. Not sure it's actually helpful for i915. We end up having to root around in the display_info in a lot of places anyway. So a helper for single boolean seems a bit out of place perhaps. -- Ville Syrjälä Intel