diff options
author | Dave Airlie <airlied@redhat.com> | 2010-06-06 04:59:41 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-07 19:31:16 -0400 |
commit | a3524f1b27671eda909cde37da9caff41133b272 (patch) | |
tree | cbad6f7fa8408ad0d26d706ae92d5adfcfcccec4 /drivers | |
parent | 386f40c86d6c8d5b717ef20620af1a750d0dacb4 (diff) |
drm/i915: fix oops on single crtc devices.
(regression fix since fbdev/kms rework).
My fb rework didn't remember about the 84/65s.
Reported-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 9ed8ecd95801..276583159847 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -278,6 +278,7 @@ typedef struct drm_i915_private { | |||
278 | struct mem_block *agp_heap; | 278 | struct mem_block *agp_heap; |
279 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; | 279 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; |
280 | int vblank_pipe; | 280 | int vblank_pipe; |
281 | int num_pipe; | ||
281 | 282 | ||
282 | /* For hangcheck timer */ | 283 | /* For hangcheck timer */ |
283 | #define DRM_I915_HANGCHECK_PERIOD 75 /* in jiffies */ | 284 | #define DRM_I915_HANGCHECK_PERIOD 75 /* in jiffies */ |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 04e1bb499ff8..2861da3aaf7e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5470,7 +5470,6 @@ static void intel_init_display(struct drm_device *dev) | |||
5470 | void intel_modeset_init(struct drm_device *dev) | 5470 | void intel_modeset_init(struct drm_device *dev) |
5471 | { | 5471 | { |
5472 | struct drm_i915_private *dev_priv = dev->dev_private; | 5472 | struct drm_i915_private *dev_priv = dev->dev_private; |
5473 | int num_pipe; | ||
5474 | int i; | 5473 | int i; |
5475 | 5474 | ||
5476 | drm_mode_config_init(dev); | 5475 | drm_mode_config_init(dev); |
@@ -5500,13 +5499,13 @@ void intel_modeset_init(struct drm_device *dev) | |||
5500 | dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0); | 5499 | dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0); |
5501 | 5500 | ||
5502 | if (IS_MOBILE(dev) || IS_I9XX(dev)) | 5501 | if (IS_MOBILE(dev) || IS_I9XX(dev)) |
5503 | num_pipe = 2; | 5502 | dev_priv->num_pipe = 2; |
5504 | else | 5503 | else |
5505 | num_pipe = 1; | 5504 | dev_priv->num_pipe = 1; |
5506 | DRM_DEBUG_KMS("%d display pipe%s available.\n", | 5505 | DRM_DEBUG_KMS("%d display pipe%s available.\n", |
5507 | num_pipe, num_pipe > 1 ? "s" : ""); | 5506 | dev_priv->num_pipe, dev_priv->num_pipe > 1 ? "s" : ""); |
5508 | 5507 | ||
5509 | for (i = 0; i < num_pipe; i++) { | 5508 | for (i = 0; i < dev_priv->num_pipe; i++) { |
5510 | intel_crtc_init(dev, i); | 5509 | intel_crtc_init(dev, i); |
5511 | } | 5510 | } |
5512 | 5511 | ||
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index f8c76e64bb77..dfbb0c6e1f51 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -253,7 +253,7 @@ int intel_fbdev_init(struct drm_device *dev) | |||
253 | dev_priv->fbdev = ifbdev; | 253 | dev_priv->fbdev = ifbdev; |
254 | ifbdev->helper.funcs = &intel_fb_helper_funcs; | 254 | ifbdev->helper.funcs = &intel_fb_helper_funcs; |
255 | 255 | ||
256 | drm_fb_helper_init(dev, &ifbdev->helper, 2, | 256 | drm_fb_helper_init(dev, &ifbdev->helper, dev_priv->num_pipe, |
257 | INTELFB_CONN_LIMIT); | 257 | INTELFB_CONN_LIMIT); |
258 | 258 | ||
259 | drm_fb_helper_single_add_all_connectors(&ifbdev->helper); | 259 | drm_fb_helper_single_add_all_connectors(&ifbdev->helper); |