Subversion Repositories Kolibri OS

Rev

Rev 6937 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6937 Rev 7144
Line 33... Line 33...
33
//#include 
33
//#include 
34
#include 
34
#include 
35
#include 
35
#include 
36
#include 
36
#include 
37
#include 
37
#include 
38
//#include 
38
#include 
Line 39... Line 39...
39
 
39
 
40
#include 
40
#include 
41
#include 
41
#include 
42
#include 
42
#include 
Line 168... Line 168...
168
 
168
 
Line 169... Line 169...
169
	return 0;
169
	return 0;
170
 
170
 
171
out:
-
 
172
	mutex_unlock(&dev->struct_mutex);
-
 
173
	if (!IS_ERR_OR_NULL(fb))
171
out:
174
		drm_framebuffer_unreference(fb);
172
	mutex_unlock(&dev->struct_mutex);
Line 175... Line 173...
175
	return ret;
173
	return ret;
176
}
174
}
Line 390... Line 388...
390
				      connector->name);
388
				      connector->name);
391
			enabled[i] = false;
389
			enabled[i] = false;
392
			continue;
390
			continue;
393
		}
391
		}
Line 394... Line 392...
394
 
392
 
395
		encoder = connector->encoder;
393
		encoder = connector->state->best_encoder;
396
		if (!encoder || WARN_ON(!encoder->crtc)) {
394
		if (!encoder || WARN_ON(!connector->state->crtc)) {
397
			if (connector->force > DRM_FORCE_OFF)
395
			if (connector->force > DRM_FORCE_OFF)
Line 398... Line 396...
398
				goto bail;
396
				goto bail;
399
 
397
 
Line 404... Line 402...
404
			continue;
402
			continue;
405
		}
403
		}
Line 406... Line 404...
406
 
404
 
Line 407... Line 405...
407
		num_connectors_enabled++;
405
		num_connectors_enabled++;
Line 408... Line 406...
408
 
406
 
409
		new_crtc = intel_fb_helper_crtc(fb_helper, encoder->crtc);
407
		new_crtc = intel_fb_helper_crtc(fb_helper, connector->state->crtc);
410
 
408
 
411
		/*
409
		/*
Line 450... Line 448...
450
			 * after the panel fitter upscaling) as the initial
448
			 * after the panel fitter upscaling) as the initial
451
			 * config, not the input mode, which is what crtc->mode
449
			 * config, not the input mode, which is what crtc->mode
452
			 * usually contains. But since our current
450
			 * usually contains. But since our current
453
			 * code puts a mode derived from the post-pfit timings
451
			 * code puts a mode derived from the post-pfit timings
454
			 * into crtc->mode this works out correctly.
452
			 * into crtc->mode this works out correctly.
-
 
453
			 *
-
 
454
			 * This is crtc->mode and not crtc->state->mode for the
-
 
455
			 * fastboot check to work correctly. crtc_state->mode has
-
 
456
			 * I915_MODE_FLAG_INHERITED, which we clear to force check
-
 
457
			 * state.
455
			 */
458
			 */
456
			DRM_DEBUG_KMS("looking for current mode on connector %s\n",
459
			DRM_DEBUG_KMS("looking for current mode on connector %s\n",
457
				      connector->name);
460
				      connector->name);
458
			modes[i] = &encoder->crtc->mode;
461
			modes[i] = &connector->state->crtc->mode;
459
		}
462
		}
460
		crtcs[i] = new_crtc;
463
		crtcs[i] = new_crtc;
Line 461... Line 464...
461
 
464
 
462
		DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n",
465
		DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n",
463
			      connector->name,
466
			      connector->name,
464
			      pipe_name(to_intel_crtc(encoder->crtc)->pipe),
467
			      pipe_name(to_intel_crtc(connector->state->crtc)->pipe),
465
			      encoder->crtc->base.id,
468
			      connector->state->crtc->base.id,
466
			      modes[i]->hdisplay, modes[i]->vdisplay,
469
			      modes[i]->hdisplay, modes[i]->vdisplay,
Line 467... Line 470...
467
			      modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
470
			      modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
468
 
471
 
Line 680... Line 683...
680
	}
683
	}
Line 681... Line 684...
681
 
684
 
Line 682... Line 685...
682
	ifbdev->helper.atomic = true;
685
	ifbdev->helper.atomic = true;
-
 
686
 
683
 
687
	dev_priv->fbdev = ifbdev;
Line 684... Line 688...
684
	dev_priv->fbdev = ifbdev;
688
 
685
	drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
689
	drm_fb_helper_single_add_all_connectors(&ifbdev->helper);