Commit a3524f1b authored by Dave Airlie's avatar Dave Airlie

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: default avatarOndrej Zary <linux@rainbow-software.org>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 386f40c8
...@@ -278,6 +278,7 @@ typedef struct drm_i915_private { ...@@ -278,6 +278,7 @@ typedef struct drm_i915_private {
struct mem_block *agp_heap; struct mem_block *agp_heap;
unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds;
int vblank_pipe; int vblank_pipe;
int num_pipe;
/* For hangcheck timer */ /* For hangcheck timer */
#define DRM_I915_HANGCHECK_PERIOD 75 /* in jiffies */ #define DRM_I915_HANGCHECK_PERIOD 75 /* in jiffies */
......
...@@ -5470,7 +5470,6 @@ static void intel_init_display(struct drm_device *dev) ...@@ -5470,7 +5470,6 @@ static void intel_init_display(struct drm_device *dev)
void intel_modeset_init(struct drm_device *dev) void intel_modeset_init(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int num_pipe;
int i; int i;
drm_mode_config_init(dev); drm_mode_config_init(dev);
...@@ -5500,13 +5499,13 @@ void intel_modeset_init(struct drm_device *dev) ...@@ -5500,13 +5499,13 @@ void intel_modeset_init(struct drm_device *dev)
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0); dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0);
if (IS_MOBILE(dev) || IS_I9XX(dev)) if (IS_MOBILE(dev) || IS_I9XX(dev))
num_pipe = 2; dev_priv->num_pipe = 2;
else else
num_pipe = 1; dev_priv->num_pipe = 1;
DRM_DEBUG_KMS("%d display pipe%s available.\n", DRM_DEBUG_KMS("%d display pipe%s available.\n",
num_pipe, num_pipe > 1 ? "s" : ""); dev_priv->num_pipe, dev_priv->num_pipe > 1 ? "s" : "");
for (i = 0; i < num_pipe; i++) { for (i = 0; i < dev_priv->num_pipe; i++) {
intel_crtc_init(dev, i); intel_crtc_init(dev, i);
} }
......
...@@ -253,7 +253,7 @@ int intel_fbdev_init(struct drm_device *dev) ...@@ -253,7 +253,7 @@ int intel_fbdev_init(struct drm_device *dev)
dev_priv->fbdev = ifbdev; dev_priv->fbdev = ifbdev;
ifbdev->helper.funcs = &intel_fb_helper_funcs; ifbdev->helper.funcs = &intel_fb_helper_funcs;
drm_fb_helper_init(dev, &ifbdev->helper, 2, drm_fb_helper_init(dev, &ifbdev->helper, dev_priv->num_pipe,
INTELFB_CONN_LIMIT); INTELFB_CONN_LIMIT);
drm_fb_helper_single_add_all_connectors(&ifbdev->helper); drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment