diff mbox

[2/3] drm/i915: Part of: Add initial bits for VGA modesetting bringup on Sandybridge.

Message ID 4625daea6680ce0d4f9578b973654abc32bdc480.1269870282.git.surbhi.palande@canonical.com
State Superseded
Delegated to: Andy Whitcroft
Headers show

Commit Message

Surbhi Palande March 29, 2010, 2:01 p.m. UTC
This is a part of a upstream patch bad720ff3e8e47a04bd88d9bbc8317e7d7e049d3
needed for including the 6e6c822868f113dabe3c33bdd91e883cc28fa11b which solves
bugs on i915 when the ACPI bios is buggy.

Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
---
 drivers/gpu/drm/i915/i915_drv.h      |    9 ++++++++-
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 drivers/gpu/drm/i915/intel_lvds.c    |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

Comments

Stefan Bader March 30, 2010, 9:36 a.m. UTC | #1
Surbhi Palande wrote:
> This is a part of a upstream patch bad720ff3e8e47a04bd88d9bbc8317e7d7e049d3
> needed for including the 6e6c822868f113dabe3c33bdd91e883cc28fa11b which solves
> bugs on i915 when the ACPI bios is buggy.
> 

Same here (BugLink)

> Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |    9 ++++++++-
>  drivers/gpu/drm/i915/intel_display.c |    2 +-
>  drivers/gpu/drm/i915/intel_lvds.c    |    2 +-
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b99b6a8..6c02943 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1026,7 +1026,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
>  #define IS_845G(dev)		((dev)->pci_device == 0x2562)
>  #define IS_I85X(dev)		((dev)->pci_device == 0x3582)
>  #define IS_I865G(dev)		((dev)->pci_device == 0x2572)
> -#define IS_I8XX(dev)		(INTEL_INFO(dev)->is_i8xx)
> +#define IS_GEN2(dev)            (INTEL_INFO(dev)->is_i8xx)

Here might be an whitespace issue. The upstream patch has both lines indented
both the same.

>  #define IS_I915G(dev)		(INTEL_INFO(dev)->is_i915g)
>  #define IS_I915GM(dev)		((dev)->pci_device == 0x2592)
>  #define IS_I945G(dev)		((dev)->pci_device == 0x2772)
> @@ -1045,6 +1045,13 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
>  #define IS_I9XX(dev)		(INTEL_INFO(dev)->is_i9xx)
>  #define IS_MOBILE(dev)		(INTEL_INFO(dev)->is_mobile)
>  
> +#define IS_GEN3(dev)   (IS_I915G(dev) ||                       \
> +                        IS_I915GM(dev) ||                      \
> +                        IS_I945G(dev) ||                       \
> +                        IS_I945GM(dev) ||                      \
> +                        IS_G33(dev) || \
> +                        IS_PINEVIEW(dev))
> +
>  #define I915_NEED_GFX_HWS(dev)	(INTEL_INFO(dev)->need_gfx_hws)
>  
>  /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b27202d..81c50e8 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4451,7 +4451,7 @@ static void intel_setup_outputs(struct drm_device *dev)
>  			DRM_DEBUG_KMS("probing DP_D\n");
>  			intel_dp_init(dev, DP_D);
>  		}
> -	} else if (IS_I8XX(dev))
> +	} else if (IS_GEN2(dev))
>  		intel_dvo_init(dev);
>  
>  	if (SUPPORTS_TV(dev))
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 93031a7..e91e81d 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -661,7 +661,7 @@ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect
>  	/* ACPI lid methods were generally unreliable in this generation, so
>  	 * don't even bother.
>  	 */
> -	if (IS_I8XX(dev))
> +	if (IS_GEN2(dev))
>  		return connector_status_connected;
>  
>  	if (!dmi_check_system(bad_lid_status) && !acpi_lid_open())
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b99b6a8..6c02943 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1026,7 +1026,7 @@  extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
 #define IS_845G(dev)		((dev)->pci_device == 0x2562)
 #define IS_I85X(dev)		((dev)->pci_device == 0x3582)
 #define IS_I865G(dev)		((dev)->pci_device == 0x2572)
-#define IS_I8XX(dev)		(INTEL_INFO(dev)->is_i8xx)
+#define IS_GEN2(dev)            (INTEL_INFO(dev)->is_i8xx)
 #define IS_I915G(dev)		(INTEL_INFO(dev)->is_i915g)
 #define IS_I915GM(dev)		((dev)->pci_device == 0x2592)
 #define IS_I945G(dev)		((dev)->pci_device == 0x2772)
@@ -1045,6 +1045,13 @@  extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
 #define IS_I9XX(dev)		(INTEL_INFO(dev)->is_i9xx)
 #define IS_MOBILE(dev)		(INTEL_INFO(dev)->is_mobile)
 
+#define IS_GEN3(dev)   (IS_I915G(dev) ||                       \
+                        IS_I915GM(dev) ||                      \
+                        IS_I945G(dev) ||                       \
+                        IS_I945GM(dev) ||                      \
+                        IS_G33(dev) || \
+                        IS_PINEVIEW(dev))
+
 #define I915_NEED_GFX_HWS(dev)	(INTEL_INFO(dev)->need_gfx_hws)
 
 /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b27202d..81c50e8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4451,7 +4451,7 @@  static void intel_setup_outputs(struct drm_device *dev)
 			DRM_DEBUG_KMS("probing DP_D\n");
 			intel_dp_init(dev, DP_D);
 		}
-	} else if (IS_I8XX(dev))
+	} else if (IS_GEN2(dev))
 		intel_dvo_init(dev);
 
 	if (SUPPORTS_TV(dev))
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 93031a7..e91e81d 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -661,7 +661,7 @@  static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect
 	/* ACPI lid methods were generally unreliable in this generation, so
 	 * don't even bother.
 	 */
-	if (IS_I8XX(dev))
+	if (IS_GEN2(dev))
 		return connector_status_connected;
 
 	if (!dmi_check_system(bad_lid_status) && !acpi_lid_open())