]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/gpu/drm/i915/intel_lvds.c
Merge Linus master to drm-next
[mirror_ubuntu-kernels.git] / drivers / gpu / drm / i915 / intel_lvds.c
index b59c65d19d81fa9451833520fd7b9a63bfa0477a..b78c550ae8668ffbd5ff98f3c4826954bd1edc9a 100644 (file)
 #include "i915_drv.h"
 #include <linux/acpi.h>
 
-/*
- * the following four scaling options are defined.
- * #define DRM_MODE_SCALE_NON_GPU      0
- * #define DRM_MODE_SCALE_FULLSCREEN   1
- * #define DRM_MODE_SCALE_NO_SCALE     2
- * #define DRM_MODE_SCALE_ASPECT       3
- */
-
 /* Private structure for the integrated LVDS support */
 struct intel_lvds_priv {
        int fitting_mode;
@@ -334,7 +326,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
        I915_WRITE(BCLRPAT_B, 0);
 
        switch (lvds_priv->fitting_mode) {
-       case DRM_MODE_SCALE_NO_SCALE:
+       case DRM_MODE_SCALE_CENTER:
                /*
                 * For centered modes, we have to calculate border widths &
                 * heights and modify the values programmed into the CRTC.
@@ -670,8 +662,8 @@ static int intel_lvds_set_property(struct drm_connector *connector,
                                connector->encoder) {
                struct drm_crtc *crtc = connector->encoder->crtc;
                struct intel_lvds_priv *lvds_priv = intel_output->dev_priv;
-               if (value == DRM_MODE_SCALE_NON_GPU) {
-                       DRM_DEBUG_KMS("non_GPU property is unsupported\n");
+               if (value == DRM_MODE_SCALE_NONE) {
+                       DRM_DEBUG_KMS("no scaling not supported\n");
                        return 0;
                }
                if (lvds_priv->fitting_mode == value) {
@@ -774,6 +766,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "i965GMx-IF"),
                },
        },
+       {
+               .callback = intel_no_lvds_dmi_callback,
+               .ident = "AOpen Mini PC MP915",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+                       DMI_MATCH(DMI_BOARD_NAME, "i915GMx-F"),
+               },
+       },
        {
                .callback = intel_no_lvds_dmi_callback,
                .ident = "Aopen i945GTt-VFA",
@@ -880,6 +880,10 @@ void intel_lvds_init(struct drm_device *dev)
        if (IS_IGDNG(dev)) {
                if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
                        return;
+               if (dev_priv->edp_support) {
+                       DRM_DEBUG("disable LVDS for eDP support\n");
+                       return;
+               }
                gpio = PCH_GPIOC;
        }