Re: [Intel-gfx] [PATCH v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-10-24 Thread Jani Nikula
On Fri, 06 Jun 2014, ville.syrj...@linux.intel.com wrote:
 From: Ville Syrjälä ville.syrj...@linux.intel.com

 My Fujitsu-Siemens Lifebook S6010 definitely has a VGA connector, but
 the VBT says different. Ignore the VBT for 830M since it seems such
 old machines would generally have a VGA connector.

 This is a regression caused by:
  commit 9c2a03c2a194c086949f25d332937ac8dc4d9f7e
  Author: Jesse Barnes jbar...@virtuousgeek.org
  Date:   Fri Apr 4 16:12:07 2014 -0700

 drm/i915: use VBT to determine whether to enumerate the VGA port

 While at it refactor the code a bit to be more pleasing to the eye.

Going through some old patches I spotted this one. It no longer applies,
and the crt presence check has been changes. Do those changes fix the
issue here as well?

Jani.



 v2: Move the check into intel_crt_init() (Daniel)

 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
 ---
  drivers/gpu/drm/i915/intel_crt.c | 22 --
  drivers/gpu/drm/i915/intel_display.c |  3 +--
  2 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/drivers/gpu/drm/i915/intel_crt.c 
 b/drivers/gpu/drm/i915/intel_crt.c
 index 5a045d3..5104e9f 100644
 --- a/drivers/gpu/drm/i915/intel_crt.c
 +++ b/drivers/gpu/drm/i915/intel_crt.c
 @@ -801,6 +801,25 @@ static const struct dmi_system_id intel_no_crt[] = {
   { }
  };
  
 +static bool has_crt_support(struct drm_device *dev)
 +{
 + struct drm_i915_private *dev_priv = dev-dev_private;
 +
 + /* no hardware support whatsoever */
 + if (IS_ULT(dev) || IS_CHERRYVIEW(dev))
 + return false;
 +
 + /* Skip machines without VGA that falsely report hotplug events */
 + if (dmi_check_system(intel_no_crt))
 + return false;
 +
 + /* Fujitsu-Siemens Lifebook S6010 VBT lies */
 + if (IS_I830(dev))
 + return true;
 +
 + return dev_priv-vbt.int_crt_support;
 +}
 +
  void intel_crt_init(struct drm_device *dev)
  {
   struct drm_connector *connector;
 @@ -808,8 +827,7 @@ void intel_crt_init(struct drm_device *dev)
   struct intel_connector *intel_connector;
   struct drm_i915_private *dev_priv = dev-dev_private;
  
 - /* Skip machines without VGA that falsely report hotplug events */
 - if (dmi_check_system(intel_no_crt))
 + if (!has_crt_support(dev))
   return;
  
   crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
 diff --git a/drivers/gpu/drm/i915/intel_display.c 
 b/drivers/gpu/drm/i915/intel_display.c
 index b5cbb28..1060caa 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
 @@ -11376,8 +11376,7 @@ static void intel_setup_outputs(struct drm_device 
 *dev)
  
   intel_lvds_init(dev);
  
 - if (!IS_ULT(dev)  !IS_CHERRYVIEW(dev)  
 dev_priv-vbt.int_crt_support)
 - intel_crt_init(dev);
 + intel_crt_init(dev);
  
   if (HAS_DDI(dev)) {
   int found;
 -- 
 1.8.5.5

 ___
 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 v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-10-24 Thread Ville Syrjälä
On Fri, Oct 24, 2014 at 04:23:22PM +0300, Jani Nikula wrote:
 On Fri, 06 Jun 2014, ville.syrj...@linux.intel.com wrote:
  From: Ville Syrjälä ville.syrj...@linux.intel.com
 
  My Fujitsu-Siemens Lifebook S6010 definitely has a VGA connector, but
  the VBT says different. Ignore the VBT for 830M since it seems such
  old machines would generally have a VGA connector.
 
  This is a regression caused by:
   commit 9c2a03c2a194c086949f25d332937ac8dc4d9f7e
   Author: Jesse Barnes jbar...@virtuousgeek.org
   Date:   Fri Apr 4 16:12:07 2014 -0700
 
  drm/i915: use VBT to determine whether to enumerate the VGA port
 
  While at it refactor the code a bit to be more pleasing to the eye.
 
 Going through some old patches I spotted this one. It no longer applies,
 and the crt presence check has been changes. Do those changes fix the
 issue here as well?

This was fixed in:

commit 84b4e042c4707bd1bf05094a5403d680dc39
Author: Jesse Barnes jbar...@virtuousgeek.org
Date:   Wed Jun 25 08:24:29 2014 -0700

drm/i915: only apply crt_present check on VLV

 
 Jani.
 
 
 
  v2: Move the check into intel_crt_init() (Daniel)
 
  Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
  ---
   drivers/gpu/drm/i915/intel_crt.c | 22 --
   drivers/gpu/drm/i915/intel_display.c |  3 +--
   2 files changed, 21 insertions(+), 4 deletions(-)
 
  diff --git a/drivers/gpu/drm/i915/intel_crt.c 
  b/drivers/gpu/drm/i915/intel_crt.c
  index 5a045d3..5104e9f 100644
  --- a/drivers/gpu/drm/i915/intel_crt.c
  +++ b/drivers/gpu/drm/i915/intel_crt.c
  @@ -801,6 +801,25 @@ static const struct dmi_system_id intel_no_crt[] = {
  { }
   };
   
  +static bool has_crt_support(struct drm_device *dev)
  +{
  +   struct drm_i915_private *dev_priv = dev-dev_private;
  +
  +   /* no hardware support whatsoever */
  +   if (IS_ULT(dev) || IS_CHERRYVIEW(dev))
  +   return false;
  +
  +   /* Skip machines without VGA that falsely report hotplug events */
  +   if (dmi_check_system(intel_no_crt))
  +   return false;
  +
  +   /* Fujitsu-Siemens Lifebook S6010 VBT lies */
  +   if (IS_I830(dev))
  +   return true;
  +
  +   return dev_priv-vbt.int_crt_support;
  +}
  +
   void intel_crt_init(struct drm_device *dev)
   {
  struct drm_connector *connector;
  @@ -808,8 +827,7 @@ void intel_crt_init(struct drm_device *dev)
  struct intel_connector *intel_connector;
  struct drm_i915_private *dev_priv = dev-dev_private;
   
  -   /* Skip machines without VGA that falsely report hotplug events */
  -   if (dmi_check_system(intel_no_crt))
  +   if (!has_crt_support(dev))
  return;
   
  crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
  diff --git a/drivers/gpu/drm/i915/intel_display.c 
  b/drivers/gpu/drm/i915/intel_display.c
  index b5cbb28..1060caa 100644
  --- a/drivers/gpu/drm/i915/intel_display.c
  +++ b/drivers/gpu/drm/i915/intel_display.c
  @@ -11376,8 +11376,7 @@ static void intel_setup_outputs(struct drm_device 
  *dev)
   
  intel_lvds_init(dev);
   
  -   if (!IS_ULT(dev)  !IS_CHERRYVIEW(dev)  
  dev_priv-vbt.int_crt_support)
  -   intel_crt_init(dev);
  +   intel_crt_init(dev);
   
  if (HAS_DDI(dev)) {
  int found;
  -- 
  1.8.5.5
 
  ___
  Intel-gfx mailing list
  Intel-gfx@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/intel-gfx
 
 -- 
 Jani Nikula, Intel Open Source Technology Center

-- 
Ville Syrjälä
Intel OTC
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-06-07 Thread Thomas Richter

Am 07.06.2014 00:23, schrieb Daniel Vetter:

On Fri, Jun 6, 2014 at 11:15 PM, Bob Paauwebob.j.paa...@intel.com  wrote:

+ /* Fujitsu-Siemens Lifebook S6010 VBT lies */
+ if (IS_I830(dev))
+ return true;

My old D945GNT board with a 945G and really old BIOS also has a VBT
that lies about this.

I guess someone needs to dig out vbt docs then and figure out what
we've missed. Could be that the vga option is fairly new.


Positive feedback on this one: WIth this patch, I can finally set VGA 
and internal display (DVI) to independent resolutions.


Thanks!

Greetings,
Thomas

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


Re: [Intel-gfx] [PATCH v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-06-06 Thread Daniel Vetter
On Fri, Jun 06, 2014 at 10:44:12PM +0300, ville.syrj...@linux.intel.com wrote:
 From: Ville Syrjälä ville.syrj...@linux.intel.com
 
 My Fujitsu-Siemens Lifebook S6010 definitely has a VGA connector, but
 the VBT says different. Ignore the VBT for 830M since it seems such
 old machines would generally have a VGA connector.
 
 This is a regression caused by:
  commit 9c2a03c2a194c086949f25d332937ac8dc4d9f7e
  Author: Jesse Barnes jbar...@virtuousgeek.org
  Date:   Fri Apr 4 16:12:07 2014 -0700
 
 drm/i915: use VBT to determine whether to enumerate the VGA port
 
 While at it refactor the code a bit to be more pleasing to the eye.
 
 v2: Move the check into intel_crt_init() (Daniel)
 
 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com

Reviewed-by: Daniel Vetter daniel.vet...@ffwll.ch

We'll probably get more of these ...
-Daniel

 ---
  drivers/gpu/drm/i915/intel_crt.c | 22 --
  drivers/gpu/drm/i915/intel_display.c |  3 +--
  2 files changed, 21 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_crt.c 
 b/drivers/gpu/drm/i915/intel_crt.c
 index 5a045d3..5104e9f 100644
 --- a/drivers/gpu/drm/i915/intel_crt.c
 +++ b/drivers/gpu/drm/i915/intel_crt.c
 @@ -801,6 +801,25 @@ static const struct dmi_system_id intel_no_crt[] = {
   { }
  };
  
 +static bool has_crt_support(struct drm_device *dev)
 +{
 + struct drm_i915_private *dev_priv = dev-dev_private;
 +
 + /* no hardware support whatsoever */
 + if (IS_ULT(dev) || IS_CHERRYVIEW(dev))
 + return false;
 +
 + /* Skip machines without VGA that falsely report hotplug events */
 + if (dmi_check_system(intel_no_crt))
 + return false;
 +
 + /* Fujitsu-Siemens Lifebook S6010 VBT lies */
 + if (IS_I830(dev))
 + return true;
 +
 + return dev_priv-vbt.int_crt_support;
 +}
 +
  void intel_crt_init(struct drm_device *dev)
  {
   struct drm_connector *connector;
 @@ -808,8 +827,7 @@ void intel_crt_init(struct drm_device *dev)
   struct intel_connector *intel_connector;
   struct drm_i915_private *dev_priv = dev-dev_private;
  
 - /* Skip machines without VGA that falsely report hotplug events */
 - if (dmi_check_system(intel_no_crt))
 + if (!has_crt_support(dev))
   return;
  
   crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
 diff --git a/drivers/gpu/drm/i915/intel_display.c 
 b/drivers/gpu/drm/i915/intel_display.c
 index b5cbb28..1060caa 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
 @@ -11376,8 +11376,7 @@ static void intel_setup_outputs(struct drm_device 
 *dev)
  
   intel_lvds_init(dev);
  
 - if (!IS_ULT(dev)  !IS_CHERRYVIEW(dev)  
 dev_priv-vbt.int_crt_support)
 - intel_crt_init(dev);
 + intel_crt_init(dev);
  
   if (HAS_DDI(dev)) {
   int found;
 -- 
 1.8.5.5
 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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 v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-06-06 Thread Bob Paauwe
On Fri, 6 Jun 2014 22:44:12 +0300
ville.syrj...@linux.intel.com wrote:

 From: Ville Syrjälä ville.syrj...@linux.intel.com
 
 My Fujitsu-Siemens Lifebook S6010 definitely has a VGA connector, but
 the VBT says different. Ignore the VBT for 830M since it seems such
 old machines would generally have a VGA connector.
 
 This is a regression caused by:
  commit 9c2a03c2a194c086949f25d332937ac8dc4d9f7e
  Author: Jesse Barnes jbar...@virtuousgeek.org
  Date:   Fri Apr 4 16:12:07 2014 -0700
 
 drm/i915: use VBT to determine whether to enumerate the VGA port
 
 While at it refactor the code a bit to be more pleasing to the eye.
 
 v2: Move the check into intel_crt_init() (Daniel)
 
 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
 ---
  drivers/gpu/drm/i915/intel_crt.c | 22 --
  drivers/gpu/drm/i915/intel_display.c |  3 +--
  2 files changed, 21 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_crt.c 
 b/drivers/gpu/drm/i915/intel_crt.c
 index 5a045d3..5104e9f 100644
 --- a/drivers/gpu/drm/i915/intel_crt.c
 +++ b/drivers/gpu/drm/i915/intel_crt.c
 @@ -801,6 +801,25 @@ static const struct dmi_system_id intel_no_crt[] = {
   { }
  };
  
 +static bool has_crt_support(struct drm_device *dev)
 +{
 + struct drm_i915_private *dev_priv = dev-dev_private;
 +
 + /* no hardware support whatsoever */
 + if (IS_ULT(dev) || IS_CHERRYVIEW(dev))
 + return false;
 +
 + /* Skip machines without VGA that falsely report hotplug events */
 + if (dmi_check_system(intel_no_crt))
 + return false;
 +
 + /* Fujitsu-Siemens Lifebook S6010 VBT lies */
 + if (IS_I830(dev))
 + return true;

My old D945GNT board with a 945G and really old BIOS also has a VBT
that lies about this.

 +
 + return dev_priv-vbt.int_crt_support;
 +}
 +
  void intel_crt_init(struct drm_device *dev)
  {
   struct drm_connector *connector;
 @@ -808,8 +827,7 @@ void intel_crt_init(struct drm_device *dev)
   struct intel_connector *intel_connector;
   struct drm_i915_private *dev_priv = dev-dev_private;
  
 - /* Skip machines without VGA that falsely report hotplug events */
 - if (dmi_check_system(intel_no_crt))
 + if (!has_crt_support(dev))
   return;
  
   crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
 diff --git a/drivers/gpu/drm/i915/intel_display.c 
 b/drivers/gpu/drm/i915/intel_display.c
 index b5cbb28..1060caa 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
 @@ -11376,8 +11376,7 @@ static void intel_setup_outputs(struct drm_device 
 *dev)
  
   intel_lvds_init(dev);
  
 - if (!IS_ULT(dev)  !IS_CHERRYVIEW(dev)  
 dev_priv-vbt.int_crt_support)
 - intel_crt_init(dev);
 + intel_crt_init(dev);
  
   if (HAS_DDI(dev)) {
   int found;

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


Re: [Intel-gfx] [PATCH v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-06-06 Thread Daniel Vetter
On Fri, Jun 6, 2014 at 11:15 PM, Bob Paauwe bob.j.paa...@intel.com wrote:
 + /* Fujitsu-Siemens Lifebook S6010 VBT lies */
 + if (IS_I830(dev))
 + return true;

 My old D945GNT board with a 945G and really old BIOS also has a VBT
 that lies about this.

I guess someone needs to dig out vbt docs then and figure out what
we've missed. Could be that the vga option is fairly new.

Jesse/Ben can you please look into that?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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 v2 09/15] drm/i915: Ignore VBT int_crt_support on 830M

2014-06-06 Thread Jesse Barnes
On Sat, 7 Jun 2014 00:23:08 +0200
Daniel Vetter dan...@ffwll.ch wrote:

 On Fri, Jun 6, 2014 at 11:15 PM, Bob Paauwe bob.j.paa...@intel.com wrote:
  + /* Fujitsu-Siemens Lifebook S6010 VBT lies */
  + if (IS_I830(dev))
  + return true;
 
  My old D945GNT board with a 945G and really old BIOS also has a VBT
  that lies about this.
 
 I guess someone needs to dig out vbt docs then and figure out what
 we've missed. Could be that the vga option is fairly new.
 
 Jesse/Ben can you please look into that?

Yeah the meaning has changed over time, I'm trying to get the info from
ancient times.

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