All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Xiong Zhang <xiong.y.zhang@intel.com>
Cc: intel-gfx@lists.freedesktop.org, rodrigo.vivi@intel.com
Subject: Re: [PATCH 1/6] drm/i915/skl: Enable DDI-E
Date: Thu, 6 Aug 2015 17:14:23 +0200	[thread overview]
Message-ID: <20150806151423.GV17734@phenom.ffwll.local> (raw)
In-Reply-To: <1438847501-28454-1-git-send-email-xiong.y.zhang@intel.com>

On Thu, Aug 06, 2015 at 03:51:36PM +0800, Xiong Zhang wrote:
> From: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> There are OEMs using DDI-E out there,
> so let's enable it.
> 
> Unfortunately there is no detection bit for DDI-E
> So we need to rely on VBT for that.
> 
> I also need to give credits to Xiong since before seing
> his approach to check info->support_* I was creating an ugly
> vbt->ddie_sfuse_strap in order to propagate the ddi presence info
> 
> Credits-to: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
> Cc: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

btw how is this series related to

http://lists.freedesktop.org/archives/intel-gfx/2015-April/065227.html

Do we need that still? Can you please include that patch in your series if
so?
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_bios.c    | 14 +++++++-------
>  drivers/gpu/drm/i915/intel_bios.h    |  2 ++
>  drivers/gpu/drm/i915/intel_display.c |  9 +++++++++
>  3 files changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 2ff9eb0..55b5072 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -898,19 +898,19 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>  	/* Each DDI port can have more than one value on the "DVO Port" field,
>  	 * so look for all the possible values for each port and abort if more
>  	 * than one is found. */
> -	int dvo_ports[][2] = {
> -		{DVO_PORT_HDMIA, DVO_PORT_DPA},
> -		{DVO_PORT_HDMIB, DVO_PORT_DPB},
> -		{DVO_PORT_HDMIC, DVO_PORT_DPC},
> -		{DVO_PORT_HDMID, DVO_PORT_DPD},
> -		{DVO_PORT_CRT, -1 /* Port E can only be DVO_PORT_CRT */ },
> +	int dvo_ports[][3] = {
> +		{DVO_PORT_HDMIA, DVO_PORT_DPA, -1},
> +		{DVO_PORT_HDMIB, DVO_PORT_DPB, -1},
> +		{DVO_PORT_HDMIC, DVO_PORT_DPC, -1},
> +		{DVO_PORT_HDMID, DVO_PORT_DPD, -1},
> +		{DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE},
>  	};
>  
>  	/* Find the child device to use, abort if more than one found. */
>  	for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
>  		it = dev_priv->vbt.child_dev + i;
>  
> -		for (j = 0; j < 2; j++) {
> +		for (j = 0; j < 3; j++) {
>  			if (dvo_ports[port][j] == -1)
>  				break;
>  
> diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> index f7ad6a5..02255d8 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -764,6 +764,8 @@ int intel_parse_bios(struct drm_device *dev);
>  #define DVO_PORT_DPC	8
>  #define DVO_PORT_DPD	9
>  #define DVO_PORT_DPA	10
> +#define DVO_PORT_DPE	11
> +#define DVO_PORT_HDMIE	12
>  #define DVO_PORT_MIPIA	21
>  #define DVO_PORT_MIPIB	22
>  #define DVO_PORT_MIPIC	23
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index af0bcfe..aaa34b8 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14123,6 +14123,15 @@ static void intel_setup_outputs(struct drm_device *dev)
>  			intel_ddi_init(dev, PORT_C);
>  		if (found & SFUSE_STRAP_DDID_DETECTED)
>  			intel_ddi_init(dev, PORT_D);
> +		/*
> +		 * On SKL we don't have a way to detect DDI-E so we rely on VBT.
> +		 */
> +		if (IS_SKYLAKE(dev) &&
> +		    (dev_priv->vbt.ddi_port_info[PORT_E].supports_dp ||
> +		     dev_priv->vbt.ddi_port_info[PORT_E].supports_dvi ||
> +		     dev_priv->vbt.ddi_port_info[PORT_E].supports_hdmi))
> +			intel_ddi_init(dev, PORT_E);
> +
>  	} else if (HAS_PCH_SPLIT(dev)) {
>  		int found;
>  		dpd_is_edp = intel_dp_is_edp(dev, PORT_D);
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-08-06 15:14 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06  7:51 [PATCH 1/6] drm/i915/skl: Enable DDI-E Xiong Zhang
2015-08-06  7:51 ` [PATCH 2/6] drm/i915: Set power domain for DDI-E Xiong Zhang
2015-08-11  6:12   ` Zhang, Xiong Y
2015-08-06  7:51 ` [PATCH 3/6] drm/i915: Set alternate aux " Xiong Zhang
2015-08-08  0:01   ` [PATCH] " Rodrigo Vivi
2015-08-11  6:18     ` Zhang, Xiong Y
2015-08-13  8:40     ` shuang.he
2015-08-06  7:51 ` [PATCH 4/6] drm/i915: eDP can be present on DDI-E Xiong Zhang
2015-08-11  6:27   ` Zhang, Xiong Y
2015-08-11  9:47   ` Daniel Vetter
2015-08-11 10:09     ` Zhang, Xiong Y
2015-08-11 18:42     ` Vivi, Rodrigo
2015-08-12 10:27       ` Zhang, Xiong Y
2015-08-12 12:32         ` Daniel Vetter
2015-08-12 16:38           ` Vivi, Rodrigo
2015-08-31 15:47   ` Jani Nikula
2015-08-06  7:51 ` [PATCH 5/6] drm/i915/skl: enable DDIE hotplug Xiong Zhang
2015-08-08  0:06   ` Rodrigo Vivi
2015-08-10  6:53     ` [PATCH 5/6 v2] drm/i915/skl: enable DDI-E hotplug Xiong Zhang
2015-08-17  7:55       ` [PATCH 5/6 v3] " Xiong Zhang
2015-08-26  7:25         ` Jani Nikula
2015-08-06  7:51 ` [PATCH 6/6] drm/i915: Enable HDMI on DDI-E Xiong Zhang
2015-08-08  0:09   ` Rodrigo Vivi
2015-08-11  9:58   ` Daniel Vetter
2015-08-12 10:39     ` [PATCH 6/6 v3] " Xiong Zhang
2015-08-12 12:33       ` Daniel Vetter
2015-08-13  2:57         ` Zhang, Xiong Y
2015-08-14  8:42           ` Daniel Vetter
2015-08-14 10:38             ` Zhang, Xiong Y
2015-08-17  8:04             ` Xiong Zhang
2015-08-31 15:47               ` Jani Nikula
2015-08-12 14:19   ` [PATCH 6/6] " shuang.he
2015-08-06 13:30 ` [PATCH 1/6] drm/i915/skl: Enable DDI-E Daniel Vetter
2015-08-06 15:37   ` Vivi, Rodrigo
2015-08-08  0:35   ` [PATCH 8/6] " Rodrigo Vivi
2015-08-11  7:12     ` Zhang, Xiong Y
2015-08-31 15:48     ` Jani Nikula
2015-08-06 15:14 ` Daniel Vetter [this message]
2015-08-06 15:50   ` [PATCH 1/6] " Vivi, Rodrigo
2015-08-08  0:33   ` [PATCH 7/6] drm/i915/skl: DDI-E and DDI-A shares 4 lanes Rodrigo Vivi
2015-08-11  7:05     ` Zhang, Xiong Y
2015-08-11 18:38       ` Vivi, Rodrigo
2015-08-12  2:20         ` Zhang, Xiong Y
2015-08-12 16:51           ` Vivi, Rodrigo
2015-08-13  3:27             ` Zhang, Xiong Y
2015-08-13  5:48               ` Jindal, Sonika
2015-08-26  8:15                 ` Jani Nikula
2015-08-26 16:38                   ` Vivi, Rodrigo
2015-08-27  2:52                     ` Zhang, Xiong Y
2015-08-27 14:31                       ` Timo Aaltonen
2015-08-27 17:59                         ` Vivi, Rodrigo
2015-08-12 21:29       ` Timo Aaltonen

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=20150806151423.GV17734@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=xiong.y.zhang@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.