Subversion Repositories Kolibri OS

Rev

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

Rev 6296 Rev 6660
Line 429... Line 429...
429
			crtcs_bound++;
429
			crtcs_bound++;
430
		if (crtc->primary->fb == fb_helper->fb)
430
		if (crtc->primary->fb == fb_helper->fb)
431
			bound++;
431
			bound++;
432
	}
432
	}
Line 433... Line -...
433
 
-
 
434
    dbgprintf("%s bound %d crtcs_bound %d\n", __FUNCTION__, bound, crtcs_bound);
433
 
435
	if (bound < crtcs_bound)
434
	if (bound < crtcs_bound)
Line 436... Line 435...
436
		return false;
435
		return false;
437
 
436
 
Line 1586... Line 1585...
1586
			  struct drm_fb_helper_crtc **best_crtcs,
1585
			  struct drm_fb_helper_crtc **best_crtcs,
1587
			  struct drm_display_mode **modes,
1586
			  struct drm_display_mode **modes,
1588
			  int n, int width, int height)
1587
			  int n, int width, int height)
1589
{
1588
{
1590
	int c, o;
1589
	int c, o;
1591
	struct drm_device *dev = fb_helper->dev;
-
 
1592
	struct drm_connector *connector;
1590
	struct drm_connector *connector;
1593
	const struct drm_connector_helper_funcs *connector_funcs;
1591
	const struct drm_connector_helper_funcs *connector_funcs;
1594
	struct drm_encoder *encoder;
1592
	struct drm_encoder *encoder;
1595
	int my_score, best_score, score;
1593
	int my_score, best_score, score;
1596
	struct drm_fb_helper_crtc **crtcs, *crtc;
1594
	struct drm_fb_helper_crtc **crtcs, *crtc;
Line 1605... Line 1603...
1605
	best_crtcs[n] = NULL;
1603
	best_crtcs[n] = NULL;
1606
	best_score = drm_pick_crtcs(fb_helper, best_crtcs, modes, n+1, width, height);
1604
	best_score = drm_pick_crtcs(fb_helper, best_crtcs, modes, n+1, width, height);
1607
	if (modes[n] == NULL)
1605
	if (modes[n] == NULL)
1608
		return best_score;
1606
		return best_score;
Line 1609... Line 1607...
1609
 
1607
 
1610
	crtcs = kzalloc(dev->mode_config.num_connector *
1608
	crtcs = kzalloc(fb_helper->connector_count *
1611
			sizeof(struct drm_fb_helper_crtc *), GFP_KERNEL);
1609
			sizeof(struct drm_fb_helper_crtc *), GFP_KERNEL);
1612
	if (!crtcs)
1610
	if (!crtcs)
Line 1613... Line 1611...
1613
		return best_score;
1611
		return best_score;
Line 1651... Line 1649...
1651
		score = my_score + drm_pick_crtcs(fb_helper, crtcs, modes, n + 1,
1649
		score = my_score + drm_pick_crtcs(fb_helper, crtcs, modes, n + 1,
1652
						  width, height);
1650
						  width, height);
1653
		if (score > best_score) {
1651
		if (score > best_score) {
1654
			best_score = score;
1652
			best_score = score;
1655
			memcpy(best_crtcs, crtcs,
1653
			memcpy(best_crtcs, crtcs,
1656
			       dev->mode_config.num_connector *
1654
			       fb_helper->connector_count *
1657
			       sizeof(struct drm_fb_helper_crtc *));
1655
			       sizeof(struct drm_fb_helper_crtc *));
1658
		}
1656
		}
1659
	}
1657
	}
1660
out:
1658
out:
1661
	kfree(crtcs);
1659
	kfree(crtcs);