From patchwork Wed Apr 11 23:13:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clint Taylor X-Patchwork-Id: 10337583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 310B26053C for ; Wed, 11 Apr 2018 23:03:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2153A28446 for ; Wed, 11 Apr 2018 23:03:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1627E2844C; Wed, 11 Apr 2018 23:03:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A82BE28446 for ; Wed, 11 Apr 2018 23:03:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A7CE6E275; Wed, 11 Apr 2018 23:03:55 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8042D6E275 for ; Wed, 11 Apr 2018 23:03:53 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 16:03:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,438,1517904000"; d="scan'208";a="33605564" Received: from cataylo2-ubuntu64-14.jf.intel.com ([10.7.199.159]) by orsmga006.jf.intel.com with ESMTP; 11 Apr 2018 16:03:52 -0700 From: clinton.a.taylor@intel.com To: Intel-gfx@lists.freedesktop.org Date: Wed, 11 Apr 2018 16:13:26 -0700 Message-Id: <1523488406-21245-1-git-send-email-clinton.a.taylor@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523385216-31673-1-git-send-email-clinton.a.taylor@intel.com> References: <1523385216-31673-1-git-send-email-clinton.a.taylor@intel.com> Subject: [Intel-gfx] [PATCH] drm/i915/edp: Only use alternate fixed mode when requested X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rodrigo Vivi MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Clint Taylor In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available."), the patch was always selecting the alternate refresh rate even though user space was asking for the higher rate. This patch adds a check for vrefresh rate as well as the rest of the mode geometry. V2: use clock instead of vrefresh for compare. Fixes: dc911f5bd8aac ("Allow alternate fixed mode for eDP if available.") Cc: David Weinehall Cc: Rodrigo Vivi Signed-off-by: Clint Taylor --- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 62f82c4..6a2e256 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1681,7 +1681,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1, m1->vdisplay == m2->vdisplay && m1->vsync_start == m2->vsync_start && m1->vsync_end == m2->vsync_end && - m1->vtotal == m2->vtotal); + m1->vtotal == m2->vtotal && + m1->clock == m2->clock); return bres; }