From patchwork Tue Sep 27 17:00:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 12990989 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 4D333C54EE9 for ; Tue, 27 Sep 2022 17:01:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07C5D10E13A; Tue, 27 Sep 2022 17:01:05 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1288310E0FA; Tue, 27 Sep 2022 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664298043; x=1695834043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sSTmUKt/CaF+I5tJQCd7Qdsnjia+SAo2dGYwNbRf0fY=; b=CFk6tEE3W1wDmbIqBVwIJ49dkehKtV64Gz9vrkusiFuQnPbL3gS1O1hr Td9l/mjGemoYgM9hrp6Tg4RoKS3ajh23lBzN8XP05YoIy23yrr6pLZbZF N6wcuQfwz3rWz81OKFYYnS2Duje8PfHEqqCAxCAf82/MPbmZ3OWsk1Q+J qZ7SbcJvr9UgF2ZLuBnlKAdhaz198l1CRPyBT3thjMZ68JQ24oYQG51oT 3W5oBjrhsb3gXdTRjyAiTnMb9F6Xhepo+wO2uD3+tHU+F4MTSXGqkIdpd dSIYSniWhj5HJDzzL4Q4tLq7VF1wVBpNlUYgVKDn8Iv4/4Q8pIGhyJJMN w==; X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="365414079" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="365414079" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 10:00:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="623821892" X-IronPort-AV: E=Sophos;i="5.93,350,1654585200"; d="scan'208";a="623821892" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.191]) by fmsmga007.fm.intel.com with SMTP; 27 Sep 2022 10:00:18 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 27 Sep 2022 20:00:17 +0300 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/9] drm/edid: Only parse VRR range for continuous frequency displays Date: Tue, 27 Sep 2022 20:00:00 +0300 Message-Id: <20220927170006.27855-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220927170006.27855-1-ville.syrjala@linux.intel.com> References: <20220927170006.27855-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Li , intel-gfx@lists.freedesktop.org, Rodrigo Siqueira , amd-gfx@lists.freedesktop.org, Manasi Navare , Jani Nikula , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ville Syrjälä Since we only use the parsed vrefresh range to determine if VRR should be supported we should only accept continuous frequency displays here. Cc: Manasi Navare Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 76753c56d4f7..8c89d6a90390 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -6064,7 +6064,10 @@ static void drm_get_monitor_range(struct drm_connector *connector, .drm_edid = drm_edid, }; - if (!version_greater(drm_edid, 1, 1)) + if (!version_greater(drm_edid, 1, 3)) + return; + + if (!(drm_edid->edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ)) return; drm_for_each_detailed_block(drm_edid, get_monitor_range, &closure);