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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 696EDC32793 for ; Wed, 18 Jan 2023 15:00:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDDAD10E6F6; Wed, 18 Jan 2023 15:00:48 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C25810E6F6; Wed, 18 Jan 2023 15:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674054047; x=1705590047; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=68c325VjfL8aCYRg864MJ9CmsN2DN/rfduIGADfQYIk=; b=jFJYSePtamA8WF9boDAvxxjRYBu+HCGe8M/bPEuTCxBbZn9WA/I6x01/ rMFpC9/1q8+qa3jQ3wlDXLDxiiNslhRcsUHp1srPSugfzMjtjRG4tJt6r EvMh2YGi8218OQ7TJvBNlBCCih6rP8joGI2elkflSbejE35Wp+VGvYoBR UnE3KoBBV8Qndeq5OZt/6kS5oBK7dSosGzV3H2LF+z7uv8KQvJ4cn+5Qs ZMbcq6G4cPKCMNXBGd60hGaOQfppjtvG80XC20DRu2QKCuHWTDX3tjprE /MIv2L0ttSaj5YOqEbhLe68fiKVmqVQMtocbs07Mq39KuvW/gx+2LLDOz w==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="326264754" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="326264754" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 07:00:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="833606590" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="833606590" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.55]) by orsmga005.jf.intel.com with SMTP; 18 Jan 2023 07:00:28 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 18 Jan 2023 17:00:27 +0200 Date: Wed, 18 Jan 2023 17:00:27 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula Message-ID: References: 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 Subject: Re: [Intel-gfx] [PATCH v7 02/22] drm/edid: fix parsing of 3D modes from HDMI VSDB X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Jan 04, 2023 at 12:05:17PM +0200, Jani Nikula wrote: > Commit 537d9ed2f6c1 ("drm/edid: convert add_cea_modes() to use cea db > iter") inadvertently moved the do_hdmi_vsdb_modes() call within the db > iteration loop, always passing NULL as the CTA VDB to > do_hdmi_vsdb_modes(), skipping a lot of stereo modes. > > Move the call back outside of the loop. > > This does mean only one CTA VDB and HDMI VSDB combination will be > handled, but it's an unlikely scenario to have more than one of either > block, and it was not accounted for before the regression either. > > Fixes: 537d9ed2f6c1 ("drm/edid: convert add_cea_modes() to use cea db iter") > Cc: # v6.0+ > Cc: Ville Syrjälä > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/drm_edid.c | 22 ++++++++++------------ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 23f7146e6a9b..b94adb9bbefb 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -5249,13 +5249,12 @@ static int add_cea_modes(struct drm_connector *connector, > { > const struct cea_db *db; > struct cea_db_iter iter; > + const u8 *hdmi = NULL, *video = NULL; > + u8 hdmi_len = 0, video_len = 0; > int modes = 0; > > cea_db_iter_edid_begin(drm_edid, &iter); > cea_db_iter_for_each(db, &iter) { > - const u8 *hdmi = NULL, *video = NULL; > - u8 hdmi_len = 0, video_len = 0; > - > if (cea_db_tag(db) == CTA_DB_VIDEO) { > video = cea_db_data(db); > video_len = cea_db_payload_len(db); > @@ -5271,18 +5270,17 @@ static int add_cea_modes(struct drm_connector *connector, > modes += do_y420vdb_modes(connector, vdb420, > cea_db_payload_len(db) - 1); > } > - > - /* > - * We parse the HDMI VSDB after having added the cea modes as we > - * will be patching their flags when the sink supports stereo > - * 3D. > - */ > - if (hdmi) > - modes += do_hdmi_vsdb_modes(connector, hdmi, hdmi_len, > - video, video_len); > } > cea_db_iter_end(&iter); > > + /* > + * We parse the HDMI VSDB after having added the cea modes as we will be > + * patching their flags when the sink supports stereo 3D. > + */ > + if (hdmi) > + modes += do_hdmi_vsdb_modes(connector, hdmi, hdmi_len, > + video, video_len); I wonder if there are any EDIDs with multiple copies of either data block... But the original code couldn't deal with that either so not really a concern for this patch. Reviewed-by: Ville Syrjälä > + > return modes; > } > > -- > 2.34.1 -- Ville Syrjälä Intel