From: Jim Bride <jim.bride@linux.intel.com>
To: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/dp/mst: Validate modes against the available link bandwidth
Date: Mon, 29 Aug 2016 09:07:13 -0700 [thread overview]
Message-ID: <20160829160713.GA26808@shiv> (raw)
In-Reply-To: <1471565491-23142-1-git-send-email-anusha.srivatsa@intel.com>
On Thu, Aug 18, 2016 at 05:11:31PM -0700, Anusha Srivatsa wrote:
> Change intel_dp_mst_mode_valid() to use available link bandwidth
> rather than the link's maximum supported bandwidth to evaluate
> whether modes are legal for the current configuration. This takes
> into account the fact that link bandwidth may already be dedicated
> to other virtual channels.
>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Jim Bride <jim.bride@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp_mst.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 629337d..39c58eb 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -352,16 +352,22 @@ static enum drm_mode_status
> intel_dp_mst_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> - int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> + int req_pbn = 0;
> + int slots = 0;
> + struct intel_connector *intel_connector = to_intel_connector(connector);
> + struct intel_dp *intel_dp = intel_connector->mst_port;
> + struct drm_dp_mst_topology_mgr *mgr = &intel_dp->mst_mgr;
> +
> + req_pbn = drm_dp_calc_pbn_mode(mode->clock, 24);
> + slots = drm_dp_find_vcpi_slots(mgr, req_pbn);
>
> - /* TODO - validate mode against available PBN for link */
> if (mode->clock < 10000)
> return MODE_CLOCK_LOW;
>
> if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> return MODE_H_ILLEGAL;
>
> - if (mode->clock > max_dotclk)
> + if (slots == -ENOSPC)
> return MODE_CLOCK_HIGH;
>
> return MODE_OK;
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-29 16:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 0:11 [PATCH] drm/i915/dp/mst: Validate modes against the available link bandwidth Anusha Srivatsa
2016-08-19 6:28 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-22 21:34 ` Srivatsa, Anusha
2016-08-29 16:07 ` Jim Bride [this message]
[not found] ` <20160905113851.GI4329@intel.com>
2016-09-06 18:39 ` [PATCH] " Srivatsa, Anusha
2016-09-06 18:57 ` Jim Bride
2016-09-20 18:39 ` Srivatsa, Anusha
2016-09-26 15:00 ` Jani Nikula
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=20160829160713.GA26808@shiv \
--to=jim.bride@linux.intel.com \
--cc=anusha.srivatsa@intel.com \
--cc=intel-gfx@lists.freedesktop.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.