From: Alan Cox <alan@linux.intel.com>
To: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: [PATCH 01/18] gma500: begin adding Moorestown support
Date: Wed, 30 Mar 2011 09:59:08 +0100 [thread overview]
Message-ID: <20110330085903.5897.78910.stgit@localhost.localdomain> (raw)
In-Reply-To: <20110330085539.5897.67919.stgit@localhost.localdomain>
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>
---
drivers/staging/gma500/psb_drv.c | 6 ++++--
drivers/staging/gma500/psb_drv.h | 6 ++----
drivers/staging/gma500/psb_fb.c | 6 +++++-
drivers/staging/gma500/psb_intel_display.c | 4 +++-
drivers/staging/gma500/psb_intel_lvds.c | 8 ++++++--
5 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index 44cd095..a7391c5 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -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;
diff --git a/drivers/staging/gma500/psb_drv.h b/drivers/staging/gma500/psb_drv.h
index 29a3605..e7507b1 100644
--- a/drivers/staging/gma500/psb_drv.h
+++ b/drivers/staging/gma500/psb_drv.h
@@ -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
diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c
index f67f53b..4e5d8a6 100644
--- a/drivers/staging/gma500/psb_fb.c
+++ b/drivers/staging/gma500/psb_fb.c
@@ -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:
diff --git a/drivers/staging/gma500/psb_intel_display.c b/drivers/staging/gma500/psb_intel_display.c
index 80b37f4..917d37e 100644
--- a/drivers/staging/gma500/psb_intel_display.c
+++ b/drivers/staging/gma500/psb_intel_display.c
@@ -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,
diff --git a/drivers/staging/gma500/psb_intel_lvds.c b/drivers/staging/gma500/psb_intel_lvds.c
index d3d210a..2de0524 100644
--- a/drivers/staging/gma500/psb_intel_lvds.c
+++ b/drivers/staging/gma500/psb_intel_lvds.c
@@ -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) {
next prev parent reply other threads:[~2011-03-30 9:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 8:58 [PATCH 00/18] GMA500 updates Alan Cox
2011-03-30 8:59 ` Alan Cox [this message]
2011-03-30 8:59 ` [PATCH 02/18] gma500: Add moorestown lvds driver code Alan Cox
2011-03-30 8:59 ` [PATCH 03/18] gma500: Make some of the lvds operations non-static Alan Cox
2011-03-30 8:59 ` [PATCH 04/18] gma500: Add moorestown config structures Alan Cox
2011-03-30 8:59 ` [PATCH 05/18] gma500: Add moorestown specific data to the device structure Alan Cox
2011-03-30 8:59 ` [PATCH 06/18] gma500: Makefiles Alan Cox
2011-03-30 9:00 ` [PATCH 07/18] gma500: Add Moorestown backlight support Alan Cox
2011-03-30 10:33 ` Matthew Garrett
2011-03-30 9:00 ` [PATCH 08/18] gma500: add framebuffer setup Alan Cox
2011-03-30 9:00 ` [PATCH 09/18] gma500: enable Moorestown CRTC handling Alan Cox
2011-03-30 9:00 ` [PATCH 10/18] gma500: Moorestown does its setup differently Alan Cox
2011-03-30 9:00 ` [PATCH 11/18] gma500: Add Moorestown identifiers Alan Cox
2011-03-30 9:00 ` [PATCH 12/18] gma500: delete the RAR handling Alan Cox
2011-03-30 9:01 ` [PATCH 13/18] gma500: We don't support the CI either Alan Cox
2011-03-30 9:01 ` [PATCH 14/18] gma500: Clean up more unused structures and code Alan Cox
2011-03-30 9:01 ` [PATCH 15/18] gma500: pull mrst firmware stuff into its own header Alan Cox
2011-03-30 9:01 ` [PATCH 16/18] gma500; kill off TTM Alan Cox
2011-03-30 9:01 ` [PATCH 17/18] drivers:staging:gma500 Remove extra semi-colon Alan Cox
2011-03-30 9:01 ` [PATCH 18/18] gma500: turn on psb SDVO Alan Cox
2011-03-30 10:35 ` [PATCH 00/18] GMA500 updates Matthew Garrett
2011-03-30 10:23 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110330085903.5897.78910.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox