From: Manasi Navare <manasi.d.navare@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/vbt: split out defaults that are set when there is no VBT
Date: Fri, 10 Mar 2017 15:57:59 -0800 [thread overview]
Message-ID: <20170310235759.GB3175@intel.com> (raw)
In-Reply-To: <95c26079ff640d43f53b944f17e9fc356b36daec.1489152288.git.jani.nikula@intel.com>
On Fri, Mar 10, 2017 at 03:27:58PM +0200, Jani Nikula wrote:
> The main thing are the DDI ports. If there's a VBT that says there are
> no outputs, we should trust that, and not have semi-random
> defaults. Unfortunately, the defaults have resulted in some Chromebooks
> without VBT to rely on this behaviour, so we split out the defaults for
> the missing VBT case.
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_bios.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 710988d72253..639d45c1dd2e 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1341,6 +1341,7 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
> return;
> }
>
> +/* Common defaults which may be overridden by VBT. */
> static void
> init_vbt_defaults(struct drm_i915_private *dev_priv)
> {
> @@ -1377,6 +1378,18 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
> &dev_priv->vbt.ddi_port_info[port];
>
> info->hdmi_level_shift = HDMI_LEVEL_SHIFT_UNKNOWN;
> + }
> +}
> +
> +/* Defaults to initialize only if there is no VBT. */
> +static void
> +init_vbt_missing_defaults(struct drm_i915_private *dev_priv)
> +{
> + enum port port;
> +
> + for (port = PORT_A; port < I915_MAX_PORTS; port++) {
> + struct ddi_vbt_port_info *info =
> + &dev_priv->vbt.ddi_port_info[port];
>
> info->supports_dvi = (port != PORT_A && port != PORT_E);
> info->supports_hdmi = info->supports_dvi;
> @@ -1516,8 +1529,10 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
> parse_ddi_ports(dev_priv, bdb);
>
> out:
> - if (!vbt)
> + if (!vbt) {
> DRM_INFO("Failed to find VBIOS tables (VBT)\n");
> + init_vbt_missing_defaults(dev_priv);
> + }
So in case there is no VBT, this will set supports_DP flag on Port A.
What is there is no VBT and there is no eDP on Port A?
In this case it will still try to link train on Port A and fail..?
I am not sure if this case exists, but just a thought looking at it.
If such a case does not exist, then this will solve our problem of
current failures because leaving defaults on Port A. So in that case
it lgtm.
Regards
Manasi
>
> if (bios)
> pci_unmap_rom(pdev, bios);
> --
> 2.1.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-10 23:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 13:27 [PATCH 0/2] drm/i915/vbt: defaults handling for no VBT case Jani Nikula
2017-03-10 13:27 ` [PATCH 1/2] drm/i915/vbt: don't propagate errors from intel_bios_init() Jani Nikula
2017-03-10 14:07 ` Chris Wilson
2017-03-13 10:01 ` Jani Nikula
2017-03-10 13:27 ` [PATCH 2/2] drm/i915/vbt: split out defaults that are set when there is no VBT Jani Nikula
2017-03-10 23:57 ` Manasi Navare [this message]
2017-03-13 9:55 ` Jani Nikula
2017-03-13 16:30 ` Manasi Navare
2017-03-14 9:09 ` Jani Nikula
2017-03-17 20:21 ` Paulo Zanoni
2017-03-20 9:38 ` Jani Nikula
2017-03-20 16:57 ` Paulo Zanoni
2017-03-20 20:47 ` Manasi Navare
2017-03-10 16:53 ` ✗ Fi.CI.BAT: failure for drm/i915/vbt: defaults handling for no VBT case Patchwork
2017-03-13 9:17 ` ✓ Fi.CI.BAT: success " 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=20170310235759.GB3175@intel.com \
--to=manasi.d.navare@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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.