Subversion Repositories Kolibri OS

Rev

Rev 2335 | Rev 2339 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2335 Rev 2336
Line 1807... Line 1807...
1807
	 */
1807
	 */
1808
	list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) {
1808
	list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) {
1809
		if (tmp_crtc->enabled && tmp_crtc->fb) {
1809
		if (tmp_crtc->enabled && tmp_crtc->fb) {
1810
			if (crtc) {
1810
			if (crtc) {
1811
				DRM_DEBUG_KMS("more than one pipe active, disabling compression\n");
1811
				DRM_DEBUG_KMS("more than one pipe active, disabling compression\n");
1812
//				dev_priv->no_fbc_reason = FBC_MULTIPLE_PIPES;
1812
                dev_priv->no_fbc_reason = FBC_MULTIPLE_PIPES;
1813
				goto out_disable;
1813
				goto out_disable;
1814
			}
1814
			}
1815
			crtc = tmp_crtc;
1815
			crtc = tmp_crtc;
1816
		}
1816
		}
1817
	}
1817
	}
Line 1818... Line 1818...
1818
 
1818
 
1819
	if (!crtc || crtc->fb == NULL) {
1819
	if (!crtc || crtc->fb == NULL) {
1820
		DRM_DEBUG_KMS("no output, disabling\n");
1820
		DRM_DEBUG_KMS("no output, disabling\n");
1821
//		dev_priv->no_fbc_reason = FBC_NO_OUTPUT;
1821
        dev_priv->no_fbc_reason = FBC_NO_OUTPUT;
1822
		goto out_disable;
1822
		goto out_disable;
Line 1823... Line 1823...
1823
	}
1823
	}
1824
 
1824
 
1825
	intel_crtc = to_intel_crtc(crtc);
1825
	intel_crtc = to_intel_crtc(crtc);
1826
	fb = crtc->fb;
1826
	fb = crtc->fb;
Line 1827... Line 1827...
1827
	intel_fb = to_intel_framebuffer(fb);
1827
	intel_fb = to_intel_framebuffer(fb);
1828
	obj = intel_fb->obj;
1828
	obj = intel_fb->obj;
1829
 
1829
 
1830
	if (!i915_enable_fbc) {
1830
	if (!i915_enable_fbc) {
1831
		DRM_DEBUG_KMS("fbc disabled per module param (default off)\n");
1831
		DRM_DEBUG_KMS("fbc disabled per module param (default off)\n");
1832
//		dev_priv->no_fbc_reason = FBC_MODULE_PARAM;
1832
        dev_priv->no_fbc_reason = FBC_MODULE_PARAM;
1833
		goto out_disable;
1833
		goto out_disable;
1834
	}
1834
	}
1835
	if (intel_fb->obj->base.size > dev_priv->cfb_size) {
1835
	if (intel_fb->obj->base.size > dev_priv->cfb_size) {
1836
		DRM_DEBUG_KMS("framebuffer too large, disabling "
1836
		DRM_DEBUG_KMS("framebuffer too large, disabling "
1837
			      "compression\n");
1837
			      "compression\n");
1838
//		dev_priv->no_fbc_reason = FBC_STOLEN_TOO_SMALL;
1838
        dev_priv->no_fbc_reason = FBC_STOLEN_TOO_SMALL;
1839
		goto out_disable;
1839
		goto out_disable;
1840
	}
1840
	}
1841
	if ((crtc->mode.flags & DRM_MODE_FLAG_INTERLACE) ||
1841
	if ((crtc->mode.flags & DRM_MODE_FLAG_INTERLACE) ||
1842
	    (crtc->mode.flags & DRM_MODE_FLAG_DBLSCAN)) {
1842
	    (crtc->mode.flags & DRM_MODE_FLAG_DBLSCAN)) {
1843
		DRM_DEBUG_KMS("mode incompatible with compression, "
1843
		DRM_DEBUG_KMS("mode incompatible with compression, "
1844
			      "disabling\n");
1844
			      "disabling\n");
1845
//		dev_priv->no_fbc_reason = FBC_UNSUPPORTED_MODE;
1845
        dev_priv->no_fbc_reason = FBC_UNSUPPORTED_MODE;
1846
		goto out_disable;
1846
		goto out_disable;
1847
	}
1847
	}
1848
	if ((crtc->mode.hdisplay > 2048) ||
1848
	if ((crtc->mode.hdisplay > 2048) ||
1849
	    (crtc->mode.vdisplay > 1536)) {
1849
	    (crtc->mode.vdisplay > 1536)) {
1850
		DRM_DEBUG_KMS("mode too large for compression, disabling\n");
1850
		DRM_DEBUG_KMS("mode too large for compression, disabling\n");
1851
//		dev_priv->no_fbc_reason = FBC_MODE_TOO_LARGE;
1851
        dev_priv->no_fbc_reason = FBC_MODE_TOO_LARGE;
1852
		goto out_disable;
1852
		goto out_disable;
1853
	}
1853
	}
1854
	if ((IS_I915GM(dev) || IS_I945GM(dev)) && intel_crtc->plane != 0) {
1854
	if ((IS_I915GM(dev) || IS_I945GM(dev)) && intel_crtc->plane != 0) {
1855
		DRM_DEBUG_KMS("plane not 0, disabling compression\n");
1855
		DRM_DEBUG_KMS("plane not 0, disabling compression\n");
Line 1856... Line 1856...
1856
//		dev_priv->no_fbc_reason = FBC_BAD_PLANE;
1856
        dev_priv->no_fbc_reason = FBC_BAD_PLANE;
1857
		goto out_disable;
1857
		goto out_disable;
Line 2110... Line 2110...
2110
    /* must disable */
2110
    /* must disable */
2111
    dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
2111
    dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
Line 2112... Line 2112...
2112
 
2112
 
Line 2113... Line 2113...
2113
    I915_WRITE(reg, dspcntr);
2113
    I915_WRITE(reg, dspcntr);
2114
 
2114
 
Line 2115... Line 2115...
2115
//    Start = obj->gtt_offset;
2115
    Start = obj->gtt_offset;
2116
//    Offset = y * fb->pitch + x * (fb->bits_per_pixel / 8);
2116
    Offset = y * fb->pitch + x * (fb->bits_per_pixel / 8);
2117
 
2117
 
2118
    DRM_DEBUG_KMS("Writing base %08lX %08lX %d %d %d\n",
2118
    DRM_DEBUG_KMS("Writing base %08lX %08lX %d %d %d\n",
Line 2133... Line 2133...
2133
{
2133
{
2134
	struct drm_device *dev = crtc->dev;
2134
	struct drm_device *dev = crtc->dev;
2135
	struct drm_i915_private *dev_priv = dev->dev_private;
2135
	struct drm_i915_private *dev_priv = dev->dev_private;
2136
	int ret;
2136
	int ret;
Line -... Line 2137...
-
 
2137
 
-
 
2138
    ENTER();
2137
 
2139
 
2138
	ret = dev_priv->display.update_plane(crtc, fb, x, y);
2140
	ret = dev_priv->display.update_plane(crtc, fb, x, y);
-
 
2141
	if (ret)
-
 
2142
    {
2139
	if (ret)
2143
        LEAVE();
-
 
2144
		return ret;
Line 2140... Line 2145...
2140
		return ret;
2145
    };
2141
 
2146
 
-
 
2147
	intel_update_fbc(dev);
Line 2142... Line 2148...
2142
	intel_update_fbc(dev);
2148
	intel_increase_pllclock(crtc);
2143
	intel_increase_pllclock(crtc);
2149
    LEAVE();
Line 2144... Line 2150...
2144
 
2150
 
Line 2150... Line 2156...
2150
		    struct drm_framebuffer *old_fb)
2156
		    struct drm_framebuffer *old_fb)
2151
{
2157
{
2152
	struct drm_device *dev = crtc->dev;
2158
	struct drm_device *dev = crtc->dev;
2153
	struct drm_i915_master_private *master_priv;
2159
	struct drm_i915_master_private *master_priv;
2154
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
2160
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
2155
	int ret;
2161
    int ret = 0;
-
 
2162
 
-
 
2163
    ENTER();
Line 2156... Line 2164...
2156
 
2164
 
2157
	/* no fb bound */
2165
	/* no fb bound */
2158
	if (!crtc->fb) {
2166
	if (!crtc->fb) {
2159
		DRM_ERROR("No FB bound\n");
2167
		DRM_ERROR("No FB bound\n");
Line 2168... Line 2176...
2168
		DRM_ERROR("no plane for crtc\n");
2176
		DRM_ERROR("no plane for crtc\n");
2169
		return -EINVAL;
2177
		return -EINVAL;
2170
	}
2178
	}
Line 2171... Line 2179...
2171
 
2179
 
2172
	mutex_lock(&dev->struct_mutex);
-
 
2173
//   ret = intel_pin_and_fence_fb_obj(dev,
-
 
2174
//                    to_intel_framebuffer(crtc->fb)->obj,
-
 
2175
//                    NULL);
-
 
2176
	if (ret != 0) {
-
 
2177
		mutex_unlock(&dev->struct_mutex);
-
 
2178
		DRM_ERROR("pin & fence failed\n");
-
 
2179
		return ret;
-
 
2180
	}
-
 
2181
 
-
 
2182
	if (old_fb) {
-
 
2183
		struct drm_i915_private *dev_priv = dev->dev_private;
-
 
2184
		struct drm_i915_gem_object *obj = to_intel_framebuffer(old_fb)->obj;
-
 
2185
 
-
 
2186
//		wait_event(dev_priv->pending_flip_queue,
-
 
2187
//			   atomic_read(&dev_priv->mm.wedged) ||
-
 
2188
//			   atomic_read(&obj->pending_flip) == 0);
-
 
2189
 
-
 
2190
		/* Big Hammer, we also need to ensure that any pending
-
 
2191
		 * MI_WAIT_FOR_EVENT inside a user batch buffer on the
-
 
2192
		 * current scanout is retired before unpinning the old
-
 
2193
		 * framebuffer.
-
 
2194
		 *
-
 
2195
		 * This should only fail upon a hung GPU, in which case we
-
 
2196
		 * can safely continue.
-
 
2197
		 */
-
 
2198
//       ret = i915_gem_object_finish_gpu(obj);
-
 
2199
		(void) ret;
-
 
Line 2200... Line 2180...
2200
	}
2180
	mutex_lock(&dev->struct_mutex);
2201
 
2181
 
-
 
2182
    ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y,
-
 
2183
					 LEAVE_ATOMIC_MODE_SET);
-
 
2184
 
2202
	ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y,
2185
    dbgprintf("set base atomic done ret= %d\n", ret);
2203
					 LEAVE_ATOMIC_MODE_SET);
2186
 
2204
	if (ret) {
2187
	if (ret) {
2205
//       i915_gem_object_unpin(to_intel_framebuffer(crtc->fb)->obj);
2188
//       i915_gem_object_unpin(to_intel_framebuffer(crtc->fb)->obj);
-
 
2189
		mutex_unlock(&dev->struct_mutex);
2206
		mutex_unlock(&dev->struct_mutex);
2190
		DRM_ERROR("failed to update base address\n");
2207
		DRM_ERROR("failed to update base address\n");
2191
        LEAVE();
Line 2208... Line -...
2208
		return ret;
-
 
2209
	}
-
 
2210
 
-
 
2211
	if (old_fb) {
-
 
2212
//       intel_wait_for_vblank(dev, intel_crtc->pipe);
-
 
2213
//       i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj);
2192
		return ret;
-
 
2193
	}
-
 
2194
 
-
 
2195
	mutex_unlock(&dev->struct_mutex);
-
 
2196
 
-
 
2197
 
2214
	}
2198
    LEAVE();
-
 
2199
    return 0;
2215
 
2200
 
-
 
2201
#if 0
-
 
2202
 
2216
	mutex_unlock(&dev->struct_mutex);
2203
	if (!dev->primary->master)
-
 
2204
    {
Line 2217... Line 2205...
2217
#if 0
2205
        LEAVE();
2218
	if (!dev->primary->master)
2206
		return 0;
-
 
2207
    };
-
 
2208
 
2219
		return 0;
2209
	master_priv = dev->primary->master->driver_priv;
-
 
2210
	if (!master_priv->sarea_priv)
Line 2220... Line 2211...
2220
 
2211
    {
2221
	master_priv = dev->primary->master->driver_priv;
2212
        LEAVE();
2222
	if (!master_priv->sarea_priv)
2213
		return 0;
2223
		return 0;
2214
    };
2224
 
2215
 
2225
	if (intel_crtc->pipe) {
2216
	if (intel_crtc->pipe) {
2226
		master_priv->sarea_priv->pipeB_x = x;
2217
		master_priv->sarea_priv->pipeB_x = x;
2227
		master_priv->sarea_priv->pipeB_y = y;
2218
		master_priv->sarea_priv->pipeB_y = y;
-
 
2219
	} else {
2228
	} else {
2220
		master_priv->sarea_priv->pipeA_x = x;
-
 
2221
		master_priv->sarea_priv->pipeA_y = y;
-
 
2222
	}
2229
		master_priv->sarea_priv->pipeA_x = x;
2223
    LEAVE();
Line 2230... Line 2224...
2230
		master_priv->sarea_priv->pipeA_y = y;
2224
 
2231
	}
2225
	return 0;
2232
#endif
2226
#endif
Line 2985... Line 2979...
2985
    u32 reg, temp;
2979
    u32 reg, temp;
Line 2986... Line 2980...
2986
 
2980
 
2987
    if (!intel_crtc->active)
2981
    if (!intel_crtc->active)
Line -... Line 2982...
-
 
2982
        return;
-
 
2983
 
2988
        return;
2984
    ENTER();
2989
 
2985
 
2990
    intel_crtc_wait_for_pending_flips(crtc);
2986
    intel_crtc_wait_for_pending_flips(crtc);
Line 2991... Line 2987...
2991
//    drm_vblank_off(dev, pipe);
2987
//    drm_vblank_off(dev, pipe);
Line 3069... Line 3065...
3069
 
3065
 
3070
    mutex_lock(&dev->struct_mutex);
3066
    mutex_lock(&dev->struct_mutex);
3071
    intel_update_fbc(dev);
3067
    intel_update_fbc(dev);
3072
    intel_clear_scanline_wait(dev);
3068
    intel_clear_scanline_wait(dev);
-
 
3069
    mutex_unlock(&dev->struct_mutex);
-
 
3070
 
-
 
3071
    LEAVE();
3073
    mutex_unlock(&dev->struct_mutex);
3072
 
Line 3074... Line 3073...
3074
}
3073
}
3075
 
3074
 
3076
static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
3075
static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
Line 4431... Line 4430...
4431
	struct drm_i915_private *dev_priv = dev->dev_private;
4430
	struct drm_i915_private *dev_priv = dev->dev_private;
4432
	int latency = SNB_READ_WM0_LATENCY() * 100;	/* In unit 0.1us */
4431
	int latency = SNB_READ_WM0_LATENCY() * 100;	/* In unit 0.1us */
4433
	int fbc_wm, plane_wm, cursor_wm;
4432
	int fbc_wm, plane_wm, cursor_wm;
4434
	unsigned int enabled;
4433
	unsigned int enabled;
Line -... Line 4434...
-
 
4434
 
-
 
4435
    ENTER();
4435
 
4436
 
4436
	enabled = 0;
4437
	enabled = 0;
4437
	if (g4x_compute_wm0(dev, 0,
4438
	if (g4x_compute_wm0(dev, 0,
4438
			    &sandybridge_display_wm_info, latency,
4439
			    &sandybridge_display_wm_info, latency,
4439
			    &sandybridge_cursor_wm_info, latency,
4440
			    &sandybridge_cursor_wm_info, latency,
Line 4471... Line 4472...
4471
	I915_WRITE(WM3_LP_ILK, 0);
4472
	I915_WRITE(WM3_LP_ILK, 0);
4472
	I915_WRITE(WM2_LP_ILK, 0);
4473
	I915_WRITE(WM2_LP_ILK, 0);
4473
	I915_WRITE(WM1_LP_ILK, 0);
4474
	I915_WRITE(WM1_LP_ILK, 0);
Line 4474... Line 4475...
4474
 
4475
 
-
 
4476
	if (!single_plane_enabled(enabled))
-
 
4477
    {
4475
	if (!single_plane_enabled(enabled))
4478
        LEAVE();
-
 
4479
		return;
-
 
4480
    };
4476
		return;
4481
 
Line -... Line 4482...
-
 
4482
	enabled = ffs(enabled) - 1;
-
 
4483
 
4477
	enabled = ffs(enabled) - 1;
4484
    dbgprintf("compute wm1\n");
4478
 
4485
 
4479
	/* WM1 */
4486
	/* WM1 */
4480
	if (!ironlake_compute_srwm(dev, 1, enabled,
4487
	if (!ironlake_compute_srwm(dev, 1, enabled,
4481
				   SNB_READ_WM1_LATENCY() * 500,
4488
				   SNB_READ_WM1_LATENCY() * 500,
Line 4489... Line 4496...
4489
		   (SNB_READ_WM1_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4496
		   (SNB_READ_WM1_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4490
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4497
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4491
		   (plane_wm << WM1_LP_SR_SHIFT) |
4498
		   (plane_wm << WM1_LP_SR_SHIFT) |
4492
		   cursor_wm);
4499
		   cursor_wm);
Line -... Line 4500...
-
 
4500
 
-
 
4501
    dbgprintf("compute wm2\n");
4493
 
4502
 
4494
	/* WM2 */
4503
	/* WM2 */
4495
	if (!ironlake_compute_srwm(dev, 2, enabled,
4504
	if (!ironlake_compute_srwm(dev, 2, enabled,
4496
				   SNB_READ_WM2_LATENCY() * 500,
4505
				   SNB_READ_WM2_LATENCY() * 500,
4497
				   &sandybridge_display_srwm_info,
4506
				   &sandybridge_display_srwm_info,
Line 4504... Line 4513...
4504
		   (SNB_READ_WM2_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4513
		   (SNB_READ_WM2_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4505
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4514
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4506
		   (plane_wm << WM1_LP_SR_SHIFT) |
4515
		   (plane_wm << WM1_LP_SR_SHIFT) |
4507
		   cursor_wm);
4516
		   cursor_wm);
Line -... Line 4517...
-
 
4517
 
-
 
4518
    dbgprintf("compute wm3\n");
4508
 
4519
 
4509
	/* WM3 */
4520
	/* WM3 */
4510
	if (!ironlake_compute_srwm(dev, 3, enabled,
4521
	if (!ironlake_compute_srwm(dev, 3, enabled,
4511
				   SNB_READ_WM3_LATENCY() * 500,
4522
				   SNB_READ_WM3_LATENCY() * 500,
4512
				   &sandybridge_display_srwm_info,
4523
				   &sandybridge_display_srwm_info,
Line 4518... Line 4529...
4518
		   WM3_LP_EN |
4529
		   WM3_LP_EN |
4519
		   (SNB_READ_WM3_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4530
		   (SNB_READ_WM3_LATENCY() << WM1_LP_LATENCY_SHIFT) |
4520
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4531
		   (fbc_wm << WM1_LP_FBC_SHIFT) |
4521
		   (plane_wm << WM1_LP_SR_SHIFT) |
4532
		   (plane_wm << WM1_LP_SR_SHIFT) |
4522
		   cursor_wm);
4533
		   cursor_wm);
-
 
4534
 
-
 
4535
    LEAVE();
-
 
4536
 
4523
}
4537
}
Line 4524... Line 4538...
4524
 
4538
 
4525
/**
4539
/**
4526
 * intel_update_watermarks - update FIFO watermark values based on current modes
4540
 * intel_update_watermarks - update FIFO watermark values based on current modes
Line 4555... Line 4569...
4555
 * to set the non-SR watermarks to 8.
4569
 * to set the non-SR watermarks to 8.
4556
 */
4570
 */
4557
static void intel_update_watermarks(struct drm_device *dev)
4571
static void intel_update_watermarks(struct drm_device *dev)
4558
{
4572
{
4559
	struct drm_i915_private *dev_priv = dev->dev_private;
4573
	struct drm_i915_private *dev_priv = dev->dev_private;
4560
 
4574
    ENTER();
4561
	if (dev_priv->display.update_wm)
4575
	if (dev_priv->display.update_wm)
4562
		dev_priv->display.update_wm(dev);
4576
		dev_priv->display.update_wm(dev);
-
 
4577
    LEAVE();
4563
}
4578
}
Line 4564... Line 4579...
4564
 
4579
 
4565
static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
4580
static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
4566
{
4581
{
Line 5186... Line 5201...
5186
    u32 lvds_sync = 0;
5201
    u32 lvds_sync = 0;
5187
    int target_clock, pixel_multiplier, lane, link_bw, factor;
5202
    int target_clock, pixel_multiplier, lane, link_bw, factor;
5188
    unsigned int pipe_bpp;
5203
    unsigned int pipe_bpp;
5189
    bool dither;
5204
    bool dither;
Line -... Line 5205...
-
 
5205
 
-
 
5206
    ENTER();
5190
 
5207
 
5191
    list_for_each_entry(encoder, &mode_config->encoder_list, base.head) {
5208
    list_for_each_entry(encoder, &mode_config->encoder_list, base.head) {
5192
        if (encoder->base.crtc != crtc)
5209
        if (encoder->base.crtc != crtc)
Line 5193... Line 5210...
5193
            continue;
5210
            continue;
Line 5624... Line 5641...
5624
    I915_WRITE(DSPCNTR(plane), dspcntr);
5641
    I915_WRITE(DSPCNTR(plane), dspcntr);
5625
    POSTING_READ(DSPCNTR(plane));
5642
    POSTING_READ(DSPCNTR(plane));
Line 5626... Line 5643...
5626
 
5643
 
Line -... Line 5644...
-
 
5644
    ret = intel_pipe_set_base(crtc, x, y, old_fb);
-
 
5645
 
5627
    ret = intel_pipe_set_base(crtc, x, y, old_fb);
5646
    dbgprintf("Set base\n");
Line -... Line 5647...
-
 
5647
 
-
 
5648
    intel_update_watermarks(dev);
5628
 
5649
 
5629
    intel_update_watermarks(dev);
5650
    LEAVE();
Line 5630... Line 5651...
5630
 
5651
 
5631
    return ret;
5652
    return ret;
Line 5642... Line 5663...
5642
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
5663
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
5643
	int pipe = intel_crtc->pipe;
5664
	int pipe = intel_crtc->pipe;
5644
	int ret;
5665
	int ret;
Line 5645... Line 5666...
5645
 
5666
 
-
 
5667
//	drm_vblank_pre_modeset(dev, pipe);
Line 5646... Line 5668...
5646
//	drm_vblank_pre_modeset(dev, pipe);
5668
    ENTER();
5647
 
5669
 
Line 5648... Line 5670...
5648
	ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode,
5670
	ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode,
Line 5649... Line 5671...
5649
					      x, y, old_fb);
5671
					      x, y, old_fb);
-
 
5672
 
Line 5650... Line 5673...
5650
 
5673
//	drm_vblank_post_modeset(dev, pipe);
5651
//	drm_vblank_post_modeset(dev, pipe);
5674
 
Line 5652... Line 5675...
5652
 
5675
	intel_crtc->dpms_mode = DRM_MODE_DPMS_ON;
Line 6122... Line 6145...
6122
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
6145
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
6123
	int pipe = intel_crtc->pipe;
6146
	int pipe = intel_crtc->pipe;
6124
	int dpll_reg = DPLL(pipe);
6147
	int dpll_reg = DPLL(pipe);
6125
	int dpll;
6148
	int dpll;
Line -... Line 6149...
-
 
6149
 
-
 
6150
    ENTER();
6126
 
6151
 
6127
	if (HAS_PCH_SPLIT(dev))
6152
	if (HAS_PCH_SPLIT(dev))
Line 6128... Line 6153...
6128
		return;
6153
		return;
6129
 
6154
 
Line 6148... Line 6173...
6148
 
6173
 
6149
		/* ...and lock them again */
6174
		/* ...and lock them again */
6150
		I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) & 0x3);
6175
		I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) & 0x3);
Line -... Line 6176...
-
 
6176
	}
-
 
6177
 
6151
	}
6178
    LEAVE();
6152
 
6179
 
6153
	/* Schedule downclock */
6180
	/* Schedule downclock */
6154
//	mod_timer(&intel_crtc->idle_timer, jiffies +
6181
//	mod_timer(&intel_crtc->idle_timer, jiffies +
Line 6434... Line 6461...
6434
	struct drm_i915_private *dev_priv = dev->dev_private;
6461
	struct drm_i915_private *dev_priv = dev->dev_private;
6435
	struct intel_encoder *encoder;
6462
	struct intel_encoder *encoder;
6436
	bool dpd_is_edp = false;
6463
	bool dpd_is_edp = false;
6437
	bool has_lvds = false;
6464
	bool has_lvds = false;
Line -... Line 6465...
-
 
6465
 
-
 
6466
    ENTER();
6438
 
6467
 
6439
	if (IS_MOBILE(dev) && !IS_I830(dev))
6468
	if (IS_MOBILE(dev) && !IS_I830(dev))
6440
		has_lvds = intel_lvds_init(dev);
6469
		has_lvds = intel_lvds_init(dev);
6441
	if (!has_lvds && !HAS_PCH_SPLIT(dev)) {
6470
	if (!has_lvds && !HAS_PCH_SPLIT(dev)) {
6442
		/* disable the panel fitter on everything but LVDS */
6471
		/* disable the panel fitter on everything but LVDS */
Line 6532... Line 6561...
6532
			intel_encoder_clones(dev, encoder->clone_mask);
6561
			intel_encoder_clones(dev, encoder->clone_mask);
6533
	}
6562
	}
Line 6534... Line 6563...
6534
 
6563
 
6535
	/* disable all the possible outputs/crtcs before entering KMS mode */
6564
	/* disable all the possible outputs/crtcs before entering KMS mode */
-
 
6565
//	drm_helper_disable_unused_functions(dev);
-
 
6566
 
6536
//	drm_helper_disable_unused_functions(dev);
6567
    LEAVE();