All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Manasi Navare <manasi.d.navare@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 3/4] drm/i915/dp: Validate the downclock mode for eDP if it exists
Date: Mon, 1 Oct 2018 19:21:47 +0300	[thread overview]
Message-ID: <20181001162147.GL9144@intel.com> (raw)
In-Reply-To: <20180912225719.17574-3-manasi.d.navare@intel.com>

On Wed, Sep 12, 2018 at 03:57:18PM -0700, Manasi Navare wrote:
> With downclock mode and DRRS now operating independently user can
> request a modeset on downclock mode. In that case intel_dp_mode_valid()
> should validate the downclock mode as well if that is requested.
> 
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 30526c02b343..0e400629e85c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -615,6 +615,8 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  	struct intel_dp *intel_dp = intel_attached_dp(connector);
>  	struct intel_connector *intel_connector = to_intel_connector(connector);
>  	struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> +	struct drm_display_mode *downclock_mode =
> +		intel_connector->panel.downclock_mode;
>  	int target_clock = mode->clock;
>  	int max_rate, mode_rate, max_lanes, max_link_clock;
>  	int max_dotclk;
> @@ -631,7 +633,10 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  		if (mode->vdisplay > fixed_mode->vdisplay)
>  			return MODE_PANEL;
>  
> -		target_clock = fixed_mode->clock;
> +		if (target_clock < fixed_mode->clock && downclock_mode)
> +			target_clock = downclock_mode->clock;
> +		else
> +			target_clock = fixed_mode->clock;

The whole mode_valid() thing is a bit of mess for internal displays.
I tried to start fixing it here https://patchwork.freedesktop.org/series/45610/
but it got stuck in a bit of a bikeshed.

So without going all in and fixing the vrefresh stuff, and probably
also digging through the whole rat's nest of drm_mode_equal() clock
comparison accuracy (if we want to deal with the whole 59.97 v. 60
hz stuff fully) I think this can be simplified into:

intel_edp_min_dotclock()
{
	return downclock_mode ? downclock_mode->clock : fixed_mode->clock;
}

Anyways, none of that is helpful unless you actually start to use the
downlock mode instead of the fixed mode. Which I didn't spot anywhere
in this series.

>  	}
>  
>  	max_link_clock = intel_dp_max_link_rate(intel_dp);
> -- 
> 2.18.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-01 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 22:57 [PATCH v2 1/4] drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode Manasi Navare
2018-09-12 22:57 ` [PATCH v2 2/4] drm/i915/dp: Disconnect eDP downclock mode from DRRS Manasi Navare
2018-09-12 22:57 ` [PATCH v2 3/4] drm/i915/dp: Validate the downclock mode for eDP if it exists Manasi Navare
2018-10-01 16:21   ` Ville Syrjälä [this message]
2018-09-12 22:57 ` [PATCH v2 4/4] drm/i915/dp: Check eDP fallback link BW against downclock mode Manasi Navare
2018-09-12 23:42 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/4] drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode Patchwork
2018-09-13  0:03 ` [PATCH v2 1/4] " Lucas De Marchi
2018-10-09 20:49   ` Manasi Navare
2018-09-13  4:58 ` ✓ Fi.CI.IGT: success for series starting with [v2,1/4] " Patchwork
2018-10-01 16:03 ` [PATCH v2 1/4] " Ville Syrjälä
2018-10-08 19:23   ` Manasi Navare
2018-10-09 13:00     ` Ville Syrjälä

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=20181001162147.GL9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=manasi.d.navare@intel.com \
    /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.