Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp590979ybg; Tue, 9 Jun 2020 08:04:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTIh9r+HvtCr9PB2lNInDpn6zIuEZoZKonSJL98GlK3KT6vp8Pl3QUAnZ2yeMqHPWbClTB X-Received: by 2002:aa7:c0c7:: with SMTP id j7mr14457766edp.242.1591715045085; Tue, 09 Jun 2020 08:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591715045; cv=none; d=google.com; s=arc-20160816; b=MtNOMSfCOWHUWB4pXIkkpTF0c9JPqwyTxa61bdufr9Qj8t+RAQVvxDStgF0fScCc6X w6nWuxxMQlNMkahuI4/u2+Ebuk47uqkV9wxbE7KPMQY6CFUJfVmvVWAOjN8BrEeoTYBx +y9iJrNcYwWuywrbybRqXz/V7U+3vuwCmdGCYuydsQQhw8eA3jNEcKBqCsCNHHTo5i0N IyhyHsoKxOI2LBigrEqx746BOaUW3HsN1MU/ss6alyeeXBFv4LpkzsAxyoouLTZNiUvd cxiWOMq4fZpnVwOHeoHftokiRgyMgFzJQrAQap30ZgdyIEvKBVzdZrHbWBj4ycGFK7NY AbbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=z8EcUQaXtuXZ9bQUYQ9zbFrJImxFdH4TDpV0t8/gtR8=; b=NQnoofbvUhwgyeEXMqbQaxZxM8UlQC47g5ORtEYuVAjFCwUrpJjNgVeC3+V3xJg91m axMWFu0Be9Icnf1h55pnhtv02jPyWkUyUgvipKylzUqEQ2YeooAAMkVWJOsUHLPv3fam tYKP5AiMl8NKYMsN6eUNwcHRwvUg59dZsMz+ewIrs2ODHaTZwc0Pau0VTPxnmVV8PqXe hSlBR23TBf9OwUcqRJpzm/Vs0w0hh2WhxXj0GSN3iaXYVvhpHctWtc67oSXhQFbG81Tm SoVQ/vZbv5MY1zS60d6aU1Yv8WpIN+7gQYDl5YdXyjmsSgnCYVnww6DQ7oWnmDJMbrvW 9Q2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si11138564edx.581.2020.06.09.08.03.39; Tue, 09 Jun 2020 08:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730661AbgFIO6U (ORCPT + 99 others); Tue, 9 Jun 2020 10:58:20 -0400 Received: from mga09.intel.com ([134.134.136.24]:54057 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbgFIO6U (ORCPT ); Tue, 9 Jun 2020 10:58:20 -0400 IronPort-SDR: G63DDs6OgpbkV7WJuUu7Z1+a274vXCw76G8h2uI3Qf/XUZMJ3TvcEFT7lMsv5ZfAl9HsdDZBUt C8eDWEsePDnw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 07:58:09 -0700 IronPort-SDR: tMSN7Nuone8GvvVNmU8W6rqQ5cg9e7QBFaHz1xtf3c0cIhx/GpbXcOVAif3LeSrMB9PI4/7t/W dIIUVVJDTIrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,492,1583222400"; d="scan'208";a="314219612" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by FMSMGA003.fm.intel.com with SMTP; 09 Jun 2020 07:58:06 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 09 Jun 2020 17:57:45 +0300 Date: Tue, 9 Jun 2020 17:57:45 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Cyrus Lien Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/edid: add support for min horizontal rate equal to max horizontal rate Message-ID: <20200609145745.GO6112@intel.com> References: <20200608195704.29841-1-cyrus.lien@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200608195704.29841-1-cyrus.lien@canonical.com> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2020 at 03:57:04AM +0800, Cyrus Lien wrote: > According to EDID spec, table 3.26, byte #6 and #8, which said "Minimum > rate value shall be less than or equal to maximum rate value". The minimum > horizontal/vertical rate value is able to be equal to maximum horizontal/ > veritcal rate value. How does that justifiy ignoring the min value? > > This change check if h/v-sync excess maximum horizontal/vertical rate if > hmin equal to hmax or vmin equal to vmax. > > Signed-off-by: Cyrus Lien > --- > drivers/gpu/drm/drm_edid.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index fed653f13c26..23878320eabd 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -2674,6 +2674,9 @@ mode_in_hsync_range(const struct drm_display_mode *mode, > hmax += ((t[4] & 0x08) ? 255 : 0); > hsync = drm_mode_hsync(mode); > > + if (hmax == hmin) > + return (hsync <= hmax); > + > return (hsync <= hmax && hsync >= hmin); > } > > @@ -2691,6 +2694,9 @@ mode_in_vsync_range(const struct drm_display_mode *mode, > vmax += ((t[4] & 0x02) ? 255 : 0); > vsync = drm_mode_vrefresh(mode); > > + if (vmax == vmin) > + return (vsync <= vmax); > + > return (vsync <= vmax && vsync >= vmin); > } > > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrj?l? Intel