diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 10 |
4 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0094f185e17d..17be01e351b3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
| @@ -492,6 +492,8 @@ typedef struct drm_i915_private { | |||
| 492 | struct drm_i915_gem_phys_object *phys_objs[I915_MAX_PHYS_OBJECT]; | 492 | struct drm_i915_gem_phys_object *phys_objs[I915_MAX_PHYS_OBJECT]; |
| 493 | } mm; | 493 | } mm; |
| 494 | struct sdvo_device_mapping sdvo_mappings[2]; | 494 | struct sdvo_device_mapping sdvo_mappings[2]; |
| 495 | /* indicate whether the LVDS_BORDER should be enabled or not */ | ||
| 496 | unsigned int lvds_border_bits; | ||
| 495 | 497 | ||
| 496 | /* Reclocking support */ | 498 | /* Reclocking support */ |
| 497 | bool render_reclock_avail; | 499 | bool render_reclock_avail; |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 0466ddbeba32..5f9272459b71 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -968,6 +968,8 @@ | |||
| 968 | #define LVDS_PORT_EN (1 << 31) | 968 | #define LVDS_PORT_EN (1 << 31) |
| 969 | /* Selects pipe B for LVDS data. Must be set on pre-965. */ | 969 | /* Selects pipe B for LVDS data. Must be set on pre-965. */ |
| 970 | #define LVDS_PIPEB_SELECT (1 << 30) | 970 | #define LVDS_PIPEB_SELECT (1 << 30) |
| 971 | /* Enable border for unscaled (or aspect-scaled) display */ | ||
| 972 | #define LVDS_BORDER_ENABLE (1 << 15) | ||
| 971 | /* | 973 | /* |
| 972 | * Enables the A0-A2 data pairs and CLKA, containing 18 bits of color data per | 974 | * Enables the A0-A2 data pairs and CLKA, containing 18 bits of color data per |
| 973 | * pixel. | 975 | * pixel. |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3c14240cc002..9efe11761be3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -2936,6 +2936,8 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 2936 | 2936 | ||
| 2937 | lvds = I915_READ(lvds_reg); | 2937 | lvds = I915_READ(lvds_reg); |
| 2938 | lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT; | 2938 | lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT; |
| 2939 | /* set the corresponsding LVDS_BORDER bit */ | ||
| 2940 | lvds |= dev_priv->lvds_border_bits; | ||
| 2939 | /* Set the B0-B3 data pairs corresponding to whether we're going to | 2941 | /* Set the B0-B3 data pairs corresponding to whether we're going to |
| 2940 | * set the DPLLs for dual-channel mode or not. | 2942 | * set the DPLLs for dual-channel mode or not. |
| 2941 | */ | 2943 | */ |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 98ae3d73577e..089f18c66ddb 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
| @@ -380,7 +380,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
| 380 | adjusted_mode->crtc_vblank_start + vsync_pos; | 380 | adjusted_mode->crtc_vblank_start + vsync_pos; |
| 381 | /* keep the vsync width constant */ | 381 | /* keep the vsync width constant */ |
| 382 | adjusted_mode->crtc_vsync_end = | 382 | adjusted_mode->crtc_vsync_end = |
| 383 | adjusted_mode->crtc_vblank_start + vsync_width; | 383 | adjusted_mode->crtc_vsync_start + vsync_width; |
| 384 | border = 1; | 384 | border = 1; |
| 385 | break; | 385 | break; |
| 386 | case DRM_MODE_SCALE_ASPECT: | 386 | case DRM_MODE_SCALE_ASPECT: |
| @@ -526,6 +526,14 @@ out: | |||
| 526 | lvds_priv->pfit_control = pfit_control; | 526 | lvds_priv->pfit_control = pfit_control; |
| 527 | lvds_priv->pfit_pgm_ratios = pfit_pgm_ratios; | 527 | lvds_priv->pfit_pgm_ratios = pfit_pgm_ratios; |
| 528 | /* | 528 | /* |
| 529 | * When there exists the border, it means that the LVDS_BORDR | ||
| 530 | * should be enabled. | ||
| 531 | */ | ||
| 532 | if (border) | ||
| 533 | dev_priv->lvds_border_bits |= LVDS_BORDER_ENABLE; | ||
| 534 | else | ||
| 535 | dev_priv->lvds_border_bits &= ~(LVDS_BORDER_ENABLE); | ||
| 536 | /* | ||
| 529 | * XXX: It would be nice to support lower refresh rates on the | 537 | * XXX: It would be nice to support lower refresh rates on the |
| 530 | * panels to reduce power consumption, and perhaps match the | 538 | * panels to reduce power consumption, and perhaps match the |
| 531 | * user's requested refresh rate. | 539 | * user's requested refresh rate. |
