Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218100
b: refs/heads/master
c: 5ceb0f9
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Sep 24, 2010
1 parent f67f2a0 commit beaaf08
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 270eea0fd71ae95654606ff7448f195fa22d12c5
refs/heads/master: 5ceb0f9bb7bde101d8b07cb803002591dcb8c804
13 changes: 11 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,18 @@ typedef struct drm_i915_private {
unsigned int lvds_vbt:1;
unsigned int int_crt_support:1;
unsigned int lvds_use_ssc:1;
unsigned int edp_support:1;
int lvds_ssc_freq;
int edp_bpp;

struct {
u8 rate:4;
u8 lanes:4;
u8 preemphasis:4;
u8 vswing:4;

u8 initialized:1;
u8 support:1;
u8 bpp:6;
} edp;

struct notifier_block lid_notifier;

Expand Down
41 changes: 27 additions & 14 deletions trunk/drivers/gpu/drm/i915/intel_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,11 @@ parse_driver_features(struct drm_i915_private *dev_priv,
if (!driver)
return;

if (driver && SUPPORTS_EDP(dev) &&
driver->lvds_config == BDB_DRIVER_FEATURE_EDP) {
dev_priv->edp_support = 1;
} else {
dev_priv->edp_support = 0;
}
if (SUPPORTS_EDP(dev) &&
driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
dev_priv->edp.support = 1;

if (driver && driver->dual_frequency)
if (driver->dual_frequency)
dev_priv->render_reclock_avail = true;
}

Expand All @@ -417,28 +414,44 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
{
struct bdb_edp *edp;

dev_priv->edp.bpp = 18;

edp = find_section(bdb, BDB_EDP);
if (!edp) {
if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) {
if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) {
DRM_DEBUG_KMS("No eDP BDB found but eDP panel "
"supported, assume 18bpp panel color "
"depth.\n");
dev_priv->edp_bpp = 18;
"supported, assume %dbpp panel color "
"depth.\n",
dev_priv->edp.bpp);
}
return;
}

switch ((edp->color_depth >> (panel_type * 2)) & 3) {
case EDP_18BPP:
dev_priv->edp_bpp = 18;
dev_priv->edp.bpp = 18;
break;
case EDP_24BPP:
dev_priv->edp_bpp = 24;
dev_priv->edp.bpp = 24;
break;
case EDP_30BPP:
dev_priv->edp_bpp = 30;
dev_priv->edp.bpp = 30;
break;
}

dev_priv->edp.rate = edp->link_params[panel_type].rate;
dev_priv->edp.lanes = edp->link_params[panel_type].lanes;
dev_priv->edp.preemphasis = edp->link_params[panel_type].preemphasis;
dev_priv->edp.vswing = edp->link_params[panel_type].vswing;

DRM_DEBUG_KMS("eDP vBIOS settings: bpp=%d, rate=%d, lanes=%d, preemphasis=%d, vswing=%d\n",
dev_priv->edp.bpp,
dev_priv->edp.rate,
dev_priv->edp.lanes,
dev_priv->edp.preemphasis,
dev_priv->edp.vswing);

dev_priv->edp.initialized = true;
}

static void
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
else
temp |= PIPE_6BPC;
} else if (has_edp_encoder || (is_dp && intel_pch_has_edp(crtc))) {
switch (dev_priv->edp_bpp/3) {
switch (dev_priv->edp.bpp/3) {
case 8:
temp |= PIPE_8BPC;
break;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ intel_dp_link_required(struct drm_device *dev, struct intel_dp *intel_dp, int pi
struct drm_i915_private *dev_priv = dev->dev_private;

if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp))
return (pixel_clock * dev_priv->edp_bpp) / 8;
return (pixel_clock * dev_priv->edp.bpp + 7) / 8;
else
return pixel_clock * 3;
}
Expand Down Expand Up @@ -653,7 +653,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
if (intel_dp->base.type == INTEL_OUTPUT_DISPLAYPORT) {
lane_count = intel_dp->lane_count;
if (IS_PCH_eDP(intel_dp))
bpp = dev_priv->edp_bpp;
bpp = dev_priv->edp.bpp;
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ void intel_lvds_init(struct drm_device *dev)
if (HAS_PCH_SPLIT(dev)) {
if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
return;
if (dev_priv->edp_support) {
if (dev_priv->edp.support) {
DRM_DEBUG_KMS("disable LVDS for eDP support\n");
return;
}
Expand Down

0 comments on commit beaaf08

Please sign in to comment.