All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Jani Nikula <jani.nikula@intel.com>,
	stable@vger.kernel.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
Date: Tue, 13 Mar 2018 15:11:43 +0200	[thread overview]
Message-ID: <20180313131143.GV5453@intel.com> (raw)
In-Reply-To: <20180313092855.32376-1-maarten.lankhorst@linux.intel.com>

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 <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # 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.

Probably what we really want to do is check whether the requested
refresh rate is closer to the fixed mode or the alt mode.

>  	return bres;
>  }
>  
> -- 
> 2.16.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Jani Nikula <jani.nikula@intel.com>,
	stable@vger.kernel.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
Date: Tue, 13 Mar 2018 15:11:43 +0200	[thread overview]
Message-ID: <20180313131143.GV5453@intel.com> (raw)
In-Reply-To: <20180313092855.32376-1-maarten.lankhorst@linux.intel.com>

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 <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # 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.

Probably what we really want to do is check whether the requested
refresh rate is closer to the fixed mode or the alt mode.

>  	return bres;
>  }
>  
> -- 
> 2.16.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrj�l�
Intel OTC

  parent reply	other threads:[~2018-03-13 13:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
2018-03-13  9:40 ` Chris Wilson
2018-03-13  9:40   ` Chris Wilson
2018-03-13  9:56   ` Maarten Lankhorst
2018-03-13  9:56     ` Maarten Lankhorst
2018-03-13  9:52 ` Chris Wilson
2018-03-13  9:52   ` Chris Wilson
2018-03-13 10:04 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-03-13 11:03 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-13 13:11 ` Ville Syrjälä [this message]
2018-03-13 13:11   ` [Intel-gfx] [PATCH] " Ville Syrjälä
2018-03-13 13:52   ` [PATCH] drm/i915/dp: Fix alt mode handling Maarten Lankhorst
2018-03-13 13:52     ` Maarten Lankhorst
2018-03-13 14:27     ` Ville Syrjälä
2018-03-13 14:27       ` Ville Syrjälä
2018-03-13 14:37       ` Maarten Lankhorst
2018-03-13 14:37         ` Maarten Lankhorst
2018-03-13 15:09         ` Ville Syrjälä
2018-03-13 15:09           ` Ville Syrjälä
2018-04-12 23:18   ` [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Clint Taylor
2018-03-13 15:26 ` ✗ Fi.CI.BAT: warning for drm/i915/dp: Fix intel_edp_compare_alt_mode. (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313131143.GV5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.