aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_bios.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-24 05:24:28 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-24 09:22:11 -0400
commit5ceb0f9bb7bde101d8b07cb803002591dcb8c804 (patch)
tree018ff025a3f5de220ead3b53254c397825be1de3 /drivers/gpu/drm/i915/intel_bios.c
parent270eea0fd71ae95654606ff7448f195fa22d12c5 (diff)
drm/i915: Parse the eDP link configuration from the vBIOS
First step, lets have a look at the values for troublesome panels and see if they may be used to improve our link training. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 123e31d5a80b..42a7a5b33a0a 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -401,14 +401,11 @@ parse_driver_features(struct drm_i915_private *dev_priv,
401 if (!driver) 401 if (!driver)
402 return; 402 return;
403 403
404 if (driver && SUPPORTS_EDP(dev) && 404 if (SUPPORTS_EDP(dev) &&
405 driver->lvds_config == BDB_DRIVER_FEATURE_EDP) { 405 driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
406 dev_priv->edp_support = 1; 406 dev_priv->edp.support = 1;
407 } else {
408 dev_priv->edp_support = 0;
409 }
410 407
411 if (driver && driver->dual_frequency) 408 if (driver->dual_frequency)
412 dev_priv->render_reclock_avail = true; 409 dev_priv->render_reclock_avail = true;
413} 410}
414 411
@@ -417,28 +414,44 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
417{ 414{
418 struct bdb_edp *edp; 415 struct bdb_edp *edp;
419 416
417 dev_priv->edp.bpp = 18;
418
420 edp = find_section(bdb, BDB_EDP); 419 edp = find_section(bdb, BDB_EDP);
421 if (!edp) { 420 if (!edp) {
422 if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { 421 if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) {
423 DRM_DEBUG_KMS("No eDP BDB found but eDP panel " 422 DRM_DEBUG_KMS("No eDP BDB found but eDP panel "
424 "supported, assume 18bpp panel color " 423 "supported, assume %dbpp panel color "
425 "depth.\n"); 424 "depth.\n",
426 dev_priv->edp_bpp = 18; 425 dev_priv->edp.bpp);
427 } 426 }
428 return; 427 return;
429 } 428 }
430 429
431 switch ((edp->color_depth >> (panel_type * 2)) & 3) { 430 switch ((edp->color_depth >> (panel_type * 2)) & 3) {
432 case EDP_18BPP: 431 case EDP_18BPP:
433 dev_priv->edp_bpp = 18; 432 dev_priv->edp.bpp = 18;
434 break; 433 break;
435 case EDP_24BPP: 434 case EDP_24BPP:
436 dev_priv->edp_bpp = 24; 435 dev_priv->edp.bpp = 24;
437 break; 436 break;
438 case EDP_30BPP: 437 case EDP_30BPP:
439 dev_priv->edp_bpp = 30; 438 dev_priv->edp.bpp = 30;
440 break; 439 break;
441 } 440 }
441
442 dev_priv->edp.rate = edp->link_params[panel_type].rate;
443 dev_priv->edp.lanes = edp->link_params[panel_type].lanes;
444 dev_priv->edp.preemphasis = edp->link_params[panel_type].preemphasis;
445 dev_priv->edp.vswing = edp->link_params[panel_type].vswing;
446
447 DRM_DEBUG_KMS("eDP vBIOS settings: bpp=%d, rate=%d, lanes=%d, preemphasis=%d, vswing=%d\n",
448 dev_priv->edp.bpp,
449 dev_priv->edp.rate,
450 dev_priv->edp.lanes,
451 dev_priv->edp.preemphasis,
452 dev_priv->edp.vswing);
453
454 dev_priv->edp.initialized = true;
442} 455}
443 456
444static void 457static void