]> Pileus Git - ~andy/linux/commitdiff
staging: gma500: begin adding Moorestown support
authorAlan Cox <alan@linux.intel.com>
Wed, 30 Mar 2011 08:59:08 +0000 (09:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Apr 2011 18:27:41 +0000 (11:27 -0700)
The Moorestown systems have some graphics differences we care about and some
we don't need to.

To start with it has a single pipe and that pipe can be used for LVDS

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/gma500/psb_drv.c
drivers/staging/gma500/psb_drv.h
drivers/staging/gma500/psb_fb.c
drivers/staging/gma500/psb_intel_display.c
drivers/staging/gma500/psb_intel_lvds.c

index 44cd095d286222336ecae265d12ca5cca5935299..a7391c5853fd97116afc60b05c9107a171244b7b 100644 (file)
@@ -586,8 +586,10 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
                return -ENOMEM;
        INIT_LIST_HEAD(&dev_priv->video_ctx);
 
-       dev_priv->num_pipe = 2;
-
+       if (IS_MRST(dev))
+               dev_priv->num_pipe = 1;
+       else
+               dev_priv->num_pipe = 2;
 
        dev_priv->dev = dev;
        bdev = &dev_priv->bdev;
index 29a36056d66409f2fb860446fdc3edd76e0f66fa..e7507b1aceb4d3cf4e2d4d944d7fff3d0630f82b 100644 (file)
@@ -45,6 +45,8 @@ enum {
        CHIP_PSB_8109 = 1,
 };
 
+#define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100)
+
 /*
  *Hardware bugfixes
  */
@@ -52,10 +54,6 @@ enum {
 #define DRIVER_NAME "pvrsrvkm"
 #define DRIVER_DESC "drm driver for the Intel GMA500"
 #define DRIVER_AUTHOR "Intel Corporation"
-#define OSPM_PROC_ENTRY "ospm"
-#define RTPM_PROC_ENTRY "rtpm"
-#define BLC_PROC_ENTRY "mrst_blc"
-#define DISPLAY_PROC_ENTRY "display_status"
 
 #define PSB_DRM_DRIVER_DATE "2009-03-10"
 #define PSB_DRM_DRIVER_MAJOR 8
index f67f53b12937c74e522586ecde12d0d699a6d736..4e5d8a6b7e2661c52d53c2ab49b4c0e2467f1129 100644 (file)
@@ -716,7 +716,11 @@ static void psb_setup_outputs(struct drm_device *dev)
                        break;
                case INTEL_OUTPUT_LVDS:
                        PSB_DEBUG_ENTRY("LVDS.\n");
-                       crtc_mask = (1 << 1);
+                       if (IS_MRST(dev))
+                               crtc_mask = (1 << 0);
+                        else
+                               crtc_mask = (1 << 1);
+
                        clone_mask = (1 << INTEL_OUTPUT_LVDS);
                        break;
                case INTEL_OUTPUT_MIPI:
index 80b37f4ca10a01b3ef4f30ebf6f953f31afe7207..917d37ef92bc942f4aca07793ca643c63416e8ad 100644 (file)
@@ -569,7 +569,9 @@ static int psb_intel_panel_fitter_pipe(struct drm_device *dev)
        if ((pfit_control & PFIT_ENABLE) == 0)
                return -1;
        /* Must be on PIPE 1 for PSB */
-       return 1;
+       if (!IS_MRST(dev))
+               return 1;
+       return (pfit_control >> 29) & 3;
 }
 
 static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,
index d3d210a1026ab10ba60664682ac37db9d3d4df39..2de05245ec9ba1450f3116927789dfa0dbdfeda4 100644 (file)
@@ -400,11 +400,15 @@ bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
        if (psb_intel_output->type == INTEL_OUTPUT_MIPI2)
                panel_fixed_mode = mode_dev->panel_fixed_mode2;
 
-       /* PSB doesn't appear to be GEN4 */
-       if (psb_intel_crtc->pipe == 0) {
+       /* PSB requires the LVDS is on pipe B, MRST has only one pipe anyway */
+       if (!IS_MRST(dev) && psb_intel_crtc->pipe == 0) {
                printk(KERN_ERR "Can't support LVDS on pipe A\n");
                return false;
        }
+       if (IS_MRST(dev) && psb_intel_crtc->pipe != 0) {
+               printk(KERN_ERR "Must use PIPE A\n");
+               return false;
+       }
        /* Should never happen!! */
        list_for_each_entry(tmp_encoder, &dev->mode_config.encoder_list,
                            head) {