aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c14
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c11
3 files changed, 24 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f7c2de8fdf09..6345bf20db03 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2000,6 +2000,8 @@
2000#define PF_ENABLE (1<<31) 2000#define PF_ENABLE (1<<31)
2001#define PFA_WIN_SZ 0x68074 2001#define PFA_WIN_SZ 0x68074
2002#define PFB_WIN_SZ 0x68874 2002#define PFB_WIN_SZ 0x68874
2003#define PFA_WIN_POS 0x68070
2004#define PFB_WIN_POS 0x68870
2003 2005
2004/* legacy palette */ 2006/* legacy palette */
2005#define LGC_PALETTE_A 0x4a000 2007#define LGC_PALETTE_A 0x4a000
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d2f3692be8eb..42cd68da74ab 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1391,6 +1391,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1391 int transconf_reg = (pipe == 0) ? TRANSACONF : TRANSBCONF; 1391 int transconf_reg = (pipe == 0) ? TRANSACONF : TRANSBCONF;
1392 int pf_ctl_reg = (pipe == 0) ? PFA_CTL_1 : PFB_CTL_1; 1392 int pf_ctl_reg = (pipe == 0) ? PFA_CTL_1 : PFB_CTL_1;
1393 int pf_win_size = (pipe == 0) ? PFA_WIN_SZ : PFB_WIN_SZ; 1393 int pf_win_size = (pipe == 0) ? PFA_WIN_SZ : PFB_WIN_SZ;
1394 int pf_win_pos = (pipe == 0) ? PFA_WIN_POS : PFB_WIN_POS;
1394 int cpu_htot_reg = (pipe == 0) ? HTOTAL_A : HTOTAL_B; 1395 int cpu_htot_reg = (pipe == 0) ? HTOTAL_A : HTOTAL_B;
1395 int cpu_hblank_reg = (pipe == 0) ? HBLANK_A : HBLANK_B; 1396 int cpu_hblank_reg = (pipe == 0) ? HBLANK_A : HBLANK_B;
1396 int cpu_hsync_reg = (pipe == 0) ? HSYNC_A : HSYNC_B; 1397 int cpu_hsync_reg = (pipe == 0) ? HSYNC_A : HSYNC_B;
@@ -1442,6 +1443,19 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1442 } 1443 }
1443 } 1444 }
1444 1445
1446 /* Enable panel fitting for LVDS */
1447 if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
1448 temp = I915_READ(pf_ctl_reg);
1449 I915_WRITE(pf_ctl_reg, temp | PF_ENABLE);
1450
1451 /* currently full aspect */
1452 I915_WRITE(pf_win_pos, 0);
1453
1454 I915_WRITE(pf_win_size,
1455 (dev_priv->panel_fixed_mode->hdisplay << 16) |
1456 (dev_priv->panel_fixed_mode->vdisplay));
1457 }
1458
1445 /* Enable CPU pipe */ 1459 /* Enable CPU pipe */
1446 temp = I915_READ(pipeconf_reg); 1460 temp = I915_READ(pipeconf_reg);
1447 if ((temp & PIPEACONF_ENABLE) == 0) { 1461 if ((temp & PIPEACONF_ENABLE) == 0) {
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index c4799bd7eaad..4c55596649f9 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -296,6 +296,10 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
296 goto out; 296 goto out;
297 } 297 }
298 298
299 /* full screen scale for now */
300 if (IS_IGDNG(dev))
301 goto out;
302
299 /* 965+ wants fuzzy fitting */ 303 /* 965+ wants fuzzy fitting */
300 if (IS_I965G(dev)) 304 if (IS_I965G(dev))
301 pfit_control |= (intel_crtc->pipe << PFIT_PIPE_SHIFT) | 305 pfit_control |= (intel_crtc->pipe << PFIT_PIPE_SHIFT) |
@@ -323,8 +327,10 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
323 * to register description and PRM. 327 * to register description and PRM.
324 * Change the value here to see the borders for debugging 328 * Change the value here to see the borders for debugging
325 */ 329 */
326 I915_WRITE(BCLRPAT_A, 0); 330 if (!IS_IGDNG(dev)) {
327 I915_WRITE(BCLRPAT_B, 0); 331 I915_WRITE(BCLRPAT_A, 0);
332 I915_WRITE(BCLRPAT_B, 0);
333 }
328 334
329 switch (lvds_priv->fitting_mode) { 335 switch (lvds_priv->fitting_mode) {
330 case DRM_MODE_SCALE_CENTER: 336 case DRM_MODE_SCALE_CENTER:
@@ -573,7 +579,6 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder,
573 * settings. 579 * settings.
574 */ 580 */
575 581
576 /* No panel fitting yet, fixme */
577 if (IS_IGDNG(dev)) 582 if (IS_IGDNG(dev))
578 return; 583 return;
579 584