Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-31 Thread Jani Nikula
On Thu, 06 Aug 2015, Xiong Zhang  wrote:
> From: Rodrigo Vivi 
>
> On Skylake we have eDP-to-VGA using DDI-E and another aux.
> So let's identify it properly.
>
> Also let's remove duplicated definitions to avoid later
> confusion.
>
> Signed-off-by: Rodrigo Vivi 

Pushed to drm-intel-next-fixes with commit message rectified.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/intel_bios.h | 5 -
>  drivers/gpu/drm/i915/intel_dp.c   | 9 +
>  2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.h 
> b/drivers/gpu/drm/i915/intel_bios.h
> index 02255d8..a2ef0df 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
>  #define  DVO_C   2
>  #define  DVO_D   3
>  
> -/* define the PORT for DP output type */
> -#define  PORT_IDPB   7
> -#define  PORT_IDPC   8
> -#define  PORT_IDPD   9
> -
>  /* Possible values for the "DVO Port" field for versions >= 155: */
>  #define DVO_PORT_HDMIA   0
>  #define DVO_PORT_HDMIB   1
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 7cd47bc..0643a91 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
>   return -1;
>  }
>  
> -/* check the VBT to see whether the eDP is on DP-D port */
> +/* check the VBT to see whether the eDP is on another port */
>  bool intel_dp_is_edp(struct drm_device *dev, enum port port)
>  {
>   struct drm_i915_private *dev_priv = dev->dev_private;
>   union child_device_config *p_child;
>   int i;
>   static const short port_mapping[] = {
> - [PORT_B] = PORT_IDPB,
> - [PORT_C] = PORT_IDPC,
> - [PORT_D] = PORT_IDPD,
> + [PORT_B] = DVO_PORT_DPB,
> + [PORT_C] = DVO_PORT_DPC,
> + [PORT_D] = DVO_PORT_DPD,
> + [PORT_E] = DVO_PORT_DPE,
>   };
>  
>   if (port == PORT_A)
> -- 
> 2.1.4
>
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-12 Thread Zhang, Xiong Y
 On Tue, 2015-08-11 at 11:47 +0200, Daniel Vetter wrote:
  On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
   From: Rodrigo Vivi rodrigo.v...@intel.com
  
   On Skylake we have eDP-to-VGA using DDI-E and another aux.
   So let's identify it properly.
 
  eDP means panel (the only difference in the code we have between eDP
  and DP is the power panel sequncing). VGA very much means no panel.
 
  Is this some impressive hack (dp-vga dongle using panel power as it's
  power source) or what's going on here? Or just confused commit
  message?
 
 That's a good question. I've heard from customer the embedded converter is
 eDP-to-VGA, not DP-to-VGA so I'm not sure what is behind and I have no
 machine here with me.
[Xiong, Zhang]: From vbt, it is a DP-to-VGA, not eDP-to-VGA
[  103.407648] [drm:parse_ddi_port] Port E VBT info: DP:1 HDMI:0 DVI:0 EDP:0 
CRT:0
 
 Xiong, could you please check with customer if everything works without this
 patch?
[Xiong, Zhang]: Everything works well without this patch on customer's machine. 
But if a eDP indeed connect to DDI-E without this patch, 
intel_dp_is_edp(PORT_E) will return false, then eDP on DDI-E couldn't work.
 
 Thanks,
 Rodrigo.
 
  I'll punt on this for now.
  -Daniel
 
  
   Also let's remove duplicated definitions to avoid later confusion.
  
   Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
   ---
drivers/gpu/drm/i915/intel_bios.h | 5 -
drivers/gpu/drm/i915/intel_dp.c   | 9 +
2 files changed, 5 insertions(+), 9 deletions(-)
  
   diff --git a/drivers/gpu/drm/i915/intel_bios.h
   b/drivers/gpu/drm/i915/intel_bios.h
   index 02255d8..a2ef0df 100644
   --- a/drivers/gpu/drm/i915/intel_bios.h
   +++ b/drivers/gpu/drm/i915/intel_bios.h
   @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
#define  DVO_C   2
#define  DVO_D   3
  
   -/* define the PORT for DP output type */
   -#define  PORT_IDPB   7
   -#define  PORT_IDPC   8
   -#define  PORT_IDPD   9
   -
/* Possible values for the DVO Port field for versions = 155:
   */
#define DVO_PORT_HDMIA   0
#define DVO_PORT_HDMIB   1
   diff --git a/drivers/gpu/drm/i915/intel_dp.c
   b/drivers/gpu/drm/i915/intel_dp.c index 7cd47bc..0643a91 100644
   --- a/drivers/gpu/drm/i915/intel_dp.c
   +++ b/drivers/gpu/drm/i915/intel_dp.c
   @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc
   *crtc)
 return -1;
}
  
   -/* check the VBT to see whether the eDP is on DP-D port */
   +/* check the VBT to see whether the eDP is on another port */
bool intel_dp_is_edp(struct drm_device *dev, enum port port)  {
 struct drm_i915_private *dev_priv = dev-dev_private;
 union child_device_config *p_child;
 int i;
 static const short port_mapping[] = {
   - [PORT_B] = PORT_IDPB,
   - [PORT_C] = PORT_IDPC,
   - [PORT_D] = PORT_IDPD,
   + [PORT_B] = DVO_PORT_DPB,
   + [PORT_C] = DVO_PORT_DPC,
   + [PORT_D] = DVO_PORT_DPD,
   + [PORT_E] = DVO_PORT_DPE,
 };
  
 if (port == PORT_A)
   --
   2.1.4
  
   ___
   Intel-gfx mailing list
   Intel-gfx@lists.freedesktop.org
   http://lists.freedesktop.org/mailman/listinfo/intel-gfx
 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-12 Thread Vivi, Rodrigo
On Wed, 2015-08-12 at 14:32 +0200, Daniel Vetter wrote:
 On Wed, Aug 12, 2015 at 10:27:08AM +, Zhang, Xiong Y wrote:
   On Tue, 2015-08-11 at 11:47 +0200, Daniel Vetter wrote:
On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
 From: Rodrigo Vivi rodrigo.v...@intel.com
 
 On Skylake we have eDP-to-VGA using DDI-E and another aux.
 So let's identify it properly.

eDP means panel (the only difference in the code we have 
between eDP
and DP is the power panel sequncing). VGA very much means no 
panel.

Is this some impressive hack (dp-vga dongle using panel power 
as it's
power source) or what's going on here? Or just confused commit
message?
   
   That's a good question. I've heard from customer the embedded 
   converter is
   eDP-to-VGA, not DP-to-VGA so I'm not sure what is behind and I 
   have no
   machine here with me.
  [Xiong, Zhang]: From vbt, it is a DP-to-VGA, not eDP-to-VGA
  [  103.407648] [drm:parse_ddi_port] Port E VBT info: DP:1 HDMI:0 
  DVI:0 EDP:0 CRT:0
   
   Xiong, could you please check with customer if everything works 
   without this
   patch?
  [Xiong, Zhang]: Everything works well without this patch on 
  customer's
  machine. But if a eDP indeed connect to DDI-E without this patch,
  intel_dp_is_edp(PORT_E) will return false, then eDP on DDI-E 
  couldn't
  work.
 
 So if I understand it correctly this isn't about a dp2vga dongle but
 simply about edp on ddi-E? And it's also not tested with a panel 
 connected
 to ddi-E?

Yes, I had miss-understood the case and messed the commit message.

 
 If that's correct I'll update the commit message to reflect this
 accurately and merge the patch.

Thanks.

 -Daniel
 
   
   Thanks,
   Rodrigo.
   
I'll punt on this for now.
-Daniel

 
 Also let's remove duplicated definitions to avoid later 
 confusion.
 
 Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
 ---
  drivers/gpu/drm/i915/intel_bios.h | 5 -
  drivers/gpu/drm/i915/intel_dp.c   | 9 +
  2 files changed, 5 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_bios.h
 b/drivers/gpu/drm/i915/intel_bios.h
 index 02255d8..a2ef0df 100644
 --- a/drivers/gpu/drm/i915/intel_bios.h
 +++ b/drivers/gpu/drm/i915/intel_bios.h
 @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device 
 *dev);
  #define  DVO_C   2
  #define  DVO_D   3
 
 -/* define the PORT for DP output type */
 -#define  PORT_IDPB   7
 -#define  PORT_IDPC   8
 -#define  PORT_IDPD   9
 -
  /* Possible values for the DVO Port field for versions = 
 155:
 */
  #define DVO_PORT_HDMIA   0
  #define DVO_PORT_HDMIB   1
 diff --git a/drivers/gpu/drm/i915/intel_dp.c
 b/drivers/gpu/drm/i915/intel_dp.c index 7cd47bc..0643a91 
 100644
 --- a/drivers/gpu/drm/i915/intel_dp.c
 +++ b/drivers/gpu/drm/i915/intel_dp.c
 @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct 
 drm_crtc
 *crtc)
   return -1;
  }
 
 -/* check the VBT to see whether the eDP is on DP-D port */
 +/* check the VBT to see whether the eDP is on another port 
 */
  bool intel_dp_is_edp(struct drm_device *dev, enum port port)
   {
   struct drm_i915_private *dev_priv = dev
 -dev_private;
   union child_device_config *p_child;
   int i;
   static const short port_mapping[] = {
 - [PORT_B] = PORT_IDPB,
 - [PORT_C] = PORT_IDPC,
 - [PORT_D] = PORT_IDPD,
 + [PORT_B] = DVO_PORT_DPB,
 + [PORT_C] = DVO_PORT_DPC,
 + [PORT_D] = DVO_PORT_DPD,
 + [PORT_E] = DVO_PORT_DPE,
   };
 
   if (port == PORT_A)
 --
 2.1.4
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 10:27:08AM +, Zhang, Xiong Y wrote:
  On Tue, 2015-08-11 at 11:47 +0200, Daniel Vetter wrote:
   On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
From: Rodrigo Vivi rodrigo.v...@intel.com
   
On Skylake we have eDP-to-VGA using DDI-E and another aux.
So let's identify it properly.
  
   eDP means panel (the only difference in the code we have between eDP
   and DP is the power panel sequncing). VGA very much means no panel.
  
   Is this some impressive hack (dp-vga dongle using panel power as it's
   power source) or what's going on here? Or just confused commit
   message?
  
  That's a good question. I've heard from customer the embedded converter is
  eDP-to-VGA, not DP-to-VGA so I'm not sure what is behind and I have no
  machine here with me.
 [Xiong, Zhang]: From vbt, it is a DP-to-VGA, not eDP-to-VGA
 [  103.407648] [drm:parse_ddi_port] Port E VBT info: DP:1 HDMI:0 DVI:0 EDP:0 
 CRT:0
  
  Xiong, could you please check with customer if everything works without this
  patch?
 [Xiong, Zhang]: Everything works well without this patch on customer's
 machine. But if a eDP indeed connect to DDI-E without this patch,
 intel_dp_is_edp(PORT_E) will return false, then eDP on DDI-E couldn't
 work.

So if I understand it correctly this isn't about a dp2vga dongle but
simply about edp on ddi-E? And it's also not tested with a panel connected
to ddi-E?

If that's correct I'll update the commit message to reflect this
accurately and merge the patch.
-Daniel

  
  Thanks,
  Rodrigo.
  
   I'll punt on this for now.
   -Daniel
  
   
Also let's remove duplicated definitions to avoid later confusion.
   
Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
---
 drivers/gpu/drm/i915/intel_bios.h | 5 -
 drivers/gpu/drm/i915/intel_dp.c   | 9 +
 2 files changed, 5 insertions(+), 9 deletions(-)
   
diff --git a/drivers/gpu/drm/i915/intel_bios.h
b/drivers/gpu/drm/i915/intel_bios.h
index 02255d8..a2ef0df 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
 #defineDVO_C   2
 #defineDVO_D   3
   
-/* define the PORT for DP output type */
-#definePORT_IDPB   7
-#definePORT_IDPC   8
-#definePORT_IDPD   9
-
 /* Possible values for the DVO Port field for versions = 155:
*/
 #define DVO_PORT_HDMIA 0
 #define DVO_PORT_HDMIB 1
diff --git a/drivers/gpu/drm/i915/intel_dp.c
b/drivers/gpu/drm/i915/intel_dp.c index 7cd47bc..0643a91 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc
*crtc)
return -1;
 }
   
-/* check the VBT to see whether the eDP is on DP-D port */
+/* check the VBT to see whether the eDP is on another port */
 bool intel_dp_is_edp(struct drm_device *dev, enum port port)  {
struct drm_i915_private *dev_priv = dev-dev_private;
union child_device_config *p_child;
int i;
static const short port_mapping[] = {
-   [PORT_B] = PORT_IDPB,
-   [PORT_C] = PORT_IDPC,
-   [PORT_D] = PORT_IDPD,
+   [PORT_B] = DVO_PORT_DPB,
+   [PORT_C] = DVO_PORT_DPC,
+   [PORT_D] = DVO_PORT_DPD,
+   [PORT_E] = DVO_PORT_DPE,
};
   
if (port == PORT_A)
--
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


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-11 Thread Zhang, Xiong Y
Reviewed-by: Xiong Zhang xiong.y.zh...@intel.com

thanks

From: Intel-gfx [intel-gfx-boun...@lists.freedesktop.org] on behalf of Xiong 
Zhang [xiong.y.zh...@intel.com]
Sent: Thursday, August 06, 2015 3:51 PM
To: intel-gfx@lists.freedesktop.org
Cc: Vivi, Rodrigo
Subject: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

From: Rodrigo Vivi rodrigo.v...@intel.com

On Skylake we have eDP-to-VGA using DDI-E and another aux.
So let's identify it properly.

Also let's remove duplicated definitions to avoid later
confusion.

Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
---
 drivers/gpu/drm/i915/intel_bios.h | 5 -
 drivers/gpu/drm/i915/intel_dp.c   | 9 +
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.h 
b/drivers/gpu/drm/i915/intel_bios.h
index 02255d8..a2ef0df 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
 #defineDVO_C   2
 #defineDVO_D   3

-/* define the PORT for DP output type */
-#definePORT_IDPB   7
-#definePORT_IDPC   8
-#definePORT_IDPD   9
-
 /* Possible values for the DVO Port field for versions = 155: */
 #define DVO_PORT_HDMIA 0
 #define DVO_PORT_HDMIB 1
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7cd47bc..0643a91 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
return -1;
 }

-/* check the VBT to see whether the eDP is on DP-D port */
+/* check the VBT to see whether the eDP is on another port */
 bool intel_dp_is_edp(struct drm_device *dev, enum port port)
 {
struct drm_i915_private *dev_priv = dev-dev_private;
union child_device_config *p_child;
int i;
static const short port_mapping[] = {
-   [PORT_B] = PORT_IDPB,
-   [PORT_C] = PORT_IDPC,
-   [PORT_D] = PORT_IDPD,
+   [PORT_B] = DVO_PORT_DPB,
+   [PORT_C] = DVO_PORT_DPC,
+   [PORT_D] = DVO_PORT_DPD,
+   [PORT_E] = DVO_PORT_DPE,
};

if (port == PORT_A)
--
2.1.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-11 Thread Daniel Vetter
On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
 From: Rodrigo Vivi rodrigo.v...@intel.com
 
 On Skylake we have eDP-to-VGA using DDI-E and another aux.
 So let's identify it properly.

eDP means panel (the only difference in the code we have between eDP and
DP is the power panel sequncing). VGA very much means no panel.

Is this some impressive hack (dp-vga dongle using panel power as it's
power source) or what's going on here? Or just confused commit message?

I'll punt on this for now.
-Daniel

 
 Also let's remove duplicated definitions to avoid later
 confusion.
 
 Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
 ---
  drivers/gpu/drm/i915/intel_bios.h | 5 -
  drivers/gpu/drm/i915/intel_dp.c   | 9 +
  2 files changed, 5 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_bios.h 
 b/drivers/gpu/drm/i915/intel_bios.h
 index 02255d8..a2ef0df 100644
 --- a/drivers/gpu/drm/i915/intel_bios.h
 +++ b/drivers/gpu/drm/i915/intel_bios.h
 @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
  #define  DVO_C   2
  #define  DVO_D   3
  
 -/* define the PORT for DP output type */
 -#define  PORT_IDPB   7
 -#define  PORT_IDPC   8
 -#define  PORT_IDPD   9
 -
  /* Possible values for the DVO Port field for versions = 155: */
  #define DVO_PORT_HDMIA   0
  #define DVO_PORT_HDMIB   1
 diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
 index 7cd47bc..0643a91 100644
 --- a/drivers/gpu/drm/i915/intel_dp.c
 +++ b/drivers/gpu/drm/i915/intel_dp.c
 @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
   return -1;
  }
  
 -/* check the VBT to see whether the eDP is on DP-D port */
 +/* check the VBT to see whether the eDP is on another port */
  bool intel_dp_is_edp(struct drm_device *dev, enum port port)
  {
   struct drm_i915_private *dev_priv = dev-dev_private;
   union child_device_config *p_child;
   int i;
   static const short port_mapping[] = {
 - [PORT_B] = PORT_IDPB,
 - [PORT_C] = PORT_IDPC,
 - [PORT_D] = PORT_IDPD,
 + [PORT_B] = DVO_PORT_DPB,
 + [PORT_C] = DVO_PORT_DPC,
 + [PORT_D] = DVO_PORT_DPD,
 + [PORT_E] = DVO_PORT_DPE,
   };
  
   if (port == PORT_A)
 -- 
 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


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-11 Thread Zhang, Xiong Y
 -Original Message-
 From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter
 Sent: Tuesday, August 11, 2015 5:47 PM
 To: Zhang, Xiong Y
 Cc: intel-gfx@lists.freedesktop.org; Vivi, Rodrigo
 Subject: Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E
 
 On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
  From: Rodrigo Vivi rodrigo.v...@intel.com
 
  On Skylake we have eDP-to-VGA using DDI-E and another aux.
  So let's identify it properly.
 
 eDP means panel (the only difference in the code we have between eDP and
 DP is the power panel sequncing). VGA very much means no panel.
 
 Is this some impressive hack (dp-vga dongle using panel power as it's power
 source) or what's going on here? Or just confused commit message?
[Zhang, Xiong Y] Sorry, it's a dp-to-vga converter connected to DDI-E.
DDI-E has the same role as DDI-B/C/D, so eDP could connect to DDI-E also.
 
 I'll punt on this for now.
 -Daniel
 
 
  Also let's remove duplicated definitions to avoid later confusion.
 
  Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
  ---
   drivers/gpu/drm/i915/intel_bios.h | 5 -
   drivers/gpu/drm/i915/intel_dp.c   | 9 +
   2 files changed, 5 insertions(+), 9 deletions(-)
 
  diff --git a/drivers/gpu/drm/i915/intel_bios.h
  b/drivers/gpu/drm/i915/intel_bios.h
  index 02255d8..a2ef0df 100644
  --- a/drivers/gpu/drm/i915/intel_bios.h
  +++ b/drivers/gpu/drm/i915/intel_bios.h
  @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
   #defineDVO_C   2
   #defineDVO_D   3
 
  -/* define the PORT for DP output type */
  -#definePORT_IDPB   7
  -#definePORT_IDPC   8
  -#definePORT_IDPD   9
  -
   /* Possible values for the DVO Port field for versions = 155: */
   #define DVO_PORT_HDMIA 0
   #define DVO_PORT_HDMIB 1
  diff --git a/drivers/gpu/drm/i915/intel_dp.c
  b/drivers/gpu/drm/i915/intel_dp.c index 7cd47bc..0643a91 100644
  --- a/drivers/gpu/drm/i915/intel_dp.c
  +++ b/drivers/gpu/drm/i915/intel_dp.c
  @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
  return -1;
   }
 
  -/* check the VBT to see whether the eDP is on DP-D port */
  +/* check the VBT to see whether the eDP is on another port */
   bool intel_dp_is_edp(struct drm_device *dev, enum port port)  {
  struct drm_i915_private *dev_priv = dev-dev_private;
  union child_device_config *p_child;
  int i;
  static const short port_mapping[] = {
  -   [PORT_B] = PORT_IDPB,
  -   [PORT_C] = PORT_IDPC,
  -   [PORT_D] = PORT_IDPD,
  +   [PORT_B] = DVO_PORT_DPB,
  +   [PORT_C] = DVO_PORT_DPC,
  +   [PORT_D] = DVO_PORT_DPD,
  +   [PORT_E] = DVO_PORT_DPE,
  };
 
  if (port == PORT_A)
  --
  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


Re: [Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-11 Thread Vivi, Rodrigo
On Tue, 2015-08-11 at 11:47 +0200, Daniel Vetter wrote:
 On Thu, Aug 06, 2015 at 03:51:39PM +0800, Xiong Zhang wrote:
  From: Rodrigo Vivi rodrigo.v...@intel.com
  
  On Skylake we have eDP-to-VGA using DDI-E and another aux.
  So let's identify it properly.
 
 eDP means panel (the only difference in the code we have between eDP 
 and
 DP is the power panel sequncing). VGA very much means no panel.
 
 Is this some impressive hack (dp-vga dongle using panel power as 
 it's
 power source) or what's going on here? Or just confused commit 
 message?

That's a good question. I've heard from customer the embedded converter
is eDP-to-VGA, not DP-to-VGA so I'm not sure what is behind and I have
no machine here with me.

Xiong, could you please check with customer if everything works without
this patch?

Thanks,
Rodrigo.

 I'll punt on this for now.
 -Daniel
 
  
  Also let's remove duplicated definitions to avoid later
  confusion.
  
  Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
  ---
   drivers/gpu/drm/i915/intel_bios.h | 5 -
   drivers/gpu/drm/i915/intel_dp.c   | 9 +
   2 files changed, 5 insertions(+), 9 deletions(-)
  
  diff --git a/drivers/gpu/drm/i915/intel_bios.h 
  b/drivers/gpu/drm/i915/intel_bios.h
  index 02255d8..a2ef0df 100644
  --- a/drivers/gpu/drm/i915/intel_bios.h
  +++ b/drivers/gpu/drm/i915/intel_bios.h
  @@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
   #defineDVO_C   2
   #defineDVO_D   3
   
  -/* define the PORT for DP output type */
  -#definePORT_IDPB   7
  -#definePORT_IDPC   8
  -#definePORT_IDPD   9
  -
   /* Possible values for the DVO Port field for versions = 155: 
  */
   #define DVO_PORT_HDMIA 0
   #define DVO_PORT_HDMIB 1
  diff --git a/drivers/gpu/drm/i915/intel_dp.c 
  b/drivers/gpu/drm/i915/intel_dp.c
  index 7cd47bc..0643a91 100644
  --- a/drivers/gpu/drm/i915/intel_dp.c
  +++ b/drivers/gpu/drm/i915/intel_dp.c
  @@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc 
  *crtc)
  return -1;
   }
   
  -/* check the VBT to see whether the eDP is on DP-D port */
  +/* check the VBT to see whether the eDP is on another port */
   bool intel_dp_is_edp(struct drm_device *dev, enum port port)
   {
  struct drm_i915_private *dev_priv = dev-dev_private;
  union child_device_config *p_child;
  int i;
  static const short port_mapping[] = {
  -   [PORT_B] = PORT_IDPB,
  -   [PORT_C] = PORT_IDPC,
  -   [PORT_D] = PORT_IDPD,
  +   [PORT_B] = DVO_PORT_DPB,
  +   [PORT_C] = DVO_PORT_DPC,
  +   [PORT_D] = DVO_PORT_DPD,
  +   [PORT_E] = DVO_PORT_DPE,
  };
   
  if (port == PORT_A)
  -- 
  2.1.4
  
  ___
  Intel-gfx mailing list
  Intel-gfx@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/intel-gfx
 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 4/6] drm/i915: eDP can be present on DDI-E

2015-08-06 Thread Xiong Zhang
From: Rodrigo Vivi rodrigo.v...@intel.com

On Skylake we have eDP-to-VGA using DDI-E and another aux.
So let's identify it properly.

Also let's remove duplicated definitions to avoid later
confusion.

Signed-off-by: Rodrigo Vivi rodrigo.v...@intel.com
---
 drivers/gpu/drm/i915/intel_bios.h | 5 -
 drivers/gpu/drm/i915/intel_dp.c   | 9 +
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.h 
b/drivers/gpu/drm/i915/intel_bios.h
index 02255d8..a2ef0df 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -747,11 +747,6 @@ int intel_parse_bios(struct drm_device *dev);
 #defineDVO_C   2
 #defineDVO_D   3
 
-/* define the PORT for DP output type */
-#definePORT_IDPB   7
-#definePORT_IDPC   8
-#definePORT_IDPD   9
-
 /* Possible values for the DVO Port field for versions = 155: */
 #define DVO_PORT_HDMIA 0
 #define DVO_PORT_HDMIB 1
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7cd47bc..0643a91 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4978,16 +4978,17 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
return -1;
 }
 
-/* check the VBT to see whether the eDP is on DP-D port */
+/* check the VBT to see whether the eDP is on another port */
 bool intel_dp_is_edp(struct drm_device *dev, enum port port)
 {
struct drm_i915_private *dev_priv = dev-dev_private;
union child_device_config *p_child;
int i;
static const short port_mapping[] = {
-   [PORT_B] = PORT_IDPB,
-   [PORT_C] = PORT_IDPC,
-   [PORT_D] = PORT_IDPD,
+   [PORT_B] = DVO_PORT_DPB,
+   [PORT_C] = DVO_PORT_DPC,
+   [PORT_D] = DVO_PORT_DPD,
+   [PORT_E] = DVO_PORT_DPE,
};
 
if (port == PORT_A)
-- 
2.1.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx