Return-Path: Received: from mga09.intel.com ([134.134.136.24]:11598 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752888AbeDLXJK (ORCPT ); Thu, 12 Apr 2018 19:09:10 -0400 Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode. To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Maarten Lankhorst Cc: Jani Nikula , intel-gfx@lists.freedesktop.org, Paulo Zanoni , stable@vger.kernel.org, Rodrigo Vivi References: <20180313092855.32376-1-maarten.lankhorst@linux.intel.com> <20180313131143.GV5453@intel.com> From: Clint Taylor Message-ID: <229c23fa-578e-4a1b-38fa-c0d5fc683e52@intel.com> Date: Thu, 12 Apr 2018 16:18:46 -0700 MIME-Version: 1.0 In-Reply-To: <20180313131143.GV5453@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: stable-owner@vger.kernel.org List-ID: On 03/13/2018 06:11 AM, Ville Syrjälä wrote: > On Tue, Mar 13, 2018 at 10:28:55AM +0100, Maarten Lankhorst wrote: >> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means >> that if we request the normal mode, we automatically get the downclocked >> mode. >> >> This can be seen during boot: >> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes : >> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa >> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa >> ... >> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset] >> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100) >> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0 >> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64 >> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64 >> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0 >> [drm:intel_dump_pipe_config [i915]] requested mode: >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa >> [drm:intel_dump_pipe_config [i915]] adjusted mode: >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa >> >> Testcase: kms_panel_fitting.atomic-fastset >> Signed-off-by: Maarten Lankhorst >> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.") >> Cc: David Weinehall >> Cc: Rodrigo Vivi >> Cc: Paulo Zanoni >> Cc: Jani Nikula >> Cc: Chris Wilson >> Cc: Jim Bride >> Cc: Joonas Lahtinen >> Cc: # v4.14+ >> --- >> 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 9a4a51e79fa1..0bd3cc1c82b4 100644 >> --- a/drivers/gpu/drm/i915/intel_dp.c >> +++ b/drivers/gpu/drm/i915/intel_dp.c >> @@ -1684,7 +1684,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); > Isn't the entire point here to ignore differences in the clock? Hmm. > Maybe not. For DRRS we want to ignore the slower clock. However this function is just for PSR testing when the eDP fixed mode blanking interval is shorter then the single frame setup time minimum. > > Probably what we really want to do is check whether the requested > refresh rate is closer to the fixed mode or the alt mode. Since this feature appears to be for testing only the Alt mode should only be used if specifically requested. If not eDP fixed mode should be used. Maarten, Sorry about submitting this patch again. I didn't do 5 minutes of research to see if someone already submitted a fix. -Clint > >> return bres; >> } >> >> -- >> 2.16.2 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx