diff options
author | Clint Taylor <clinton.a.taylor@intel.com> | 2014-09-30 13:30:22 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-01 04:01:41 -0400 |
commit | ebb69c95175609990af708ec90c46530f5a2c819 (patch) | |
tree | fc400e341f316ec24c2db3b9a49e38338a043024 | |
parent | 67956867aa07c59d6d83628bbc9ee4bd9799a1e1 (diff) |
drm/i915: Enable pixel replicated modes on BDW and HSW.
Haswell and later silicon has added a new pixel replication register
to the pipe timings for each transcoder. Now in addition to the
DPLL_A_MD register for the pixel clock double, we also need to write
to the TRANS_MULT_n (0x6002c) register to double the pixel data. Writing
to the DPLL only double the pixel clock.
ver2: Macro name change from MULTIPLY to PIPE_MULTI. (Daniel)
ver3: Do not set pixel multiplier if transcoder is eDP (Ville)
ver4: Macro name change to PIPE_MULT and default else pixel_multiplier
Cc: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Appease checkpatch and move one hunk back into the right
place that git am misplace!?]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index e887d4c13ca1..c01e5f31430e 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2443,6 +2443,7 @@ enum punit_power_well { | |||
2443 | #define _PIPEASRC 0x6001c | 2443 | #define _PIPEASRC 0x6001c |
2444 | #define _BCLRPAT_A 0x60020 | 2444 | #define _BCLRPAT_A 0x60020 |
2445 | #define _VSYNCSHIFT_A 0x60028 | 2445 | #define _VSYNCSHIFT_A 0x60028 |
2446 | #define _PIPE_MULT_A 0x6002c | ||
2446 | 2447 | ||
2447 | /* Pipe B timing regs */ | 2448 | /* Pipe B timing regs */ |
2448 | #define _HTOTAL_B 0x61000 | 2449 | #define _HTOTAL_B 0x61000 |
@@ -2454,6 +2455,7 @@ enum punit_power_well { | |||
2454 | #define _PIPEBSRC 0x6101c | 2455 | #define _PIPEBSRC 0x6101c |
2455 | #define _BCLRPAT_B 0x61020 | 2456 | #define _BCLRPAT_B 0x61020 |
2456 | #define _VSYNCSHIFT_B 0x61028 | 2457 | #define _VSYNCSHIFT_B 0x61028 |
2458 | #define _PIPE_MULT_B 0x6102c | ||
2457 | 2459 | ||
2458 | #define TRANSCODER_A_OFFSET 0x60000 | 2460 | #define TRANSCODER_A_OFFSET 0x60000 |
2459 | #define TRANSCODER_B_OFFSET 0x61000 | 2461 | #define TRANSCODER_B_OFFSET 0x61000 |
@@ -2474,6 +2476,7 @@ enum punit_power_well { | |||
2474 | #define BCLRPAT(trans) _TRANSCODER2(trans, _BCLRPAT_A) | 2476 | #define BCLRPAT(trans) _TRANSCODER2(trans, _BCLRPAT_A) |
2475 | #define VSYNCSHIFT(trans) _TRANSCODER2(trans, _VSYNCSHIFT_A) | 2477 | #define VSYNCSHIFT(trans) _TRANSCODER2(trans, _VSYNCSHIFT_A) |
2476 | #define PIPESRC(trans) _TRANSCODER2(trans, _PIPEASRC) | 2478 | #define PIPESRC(trans) _TRANSCODER2(trans, _PIPEASRC) |
2479 | #define PIPE_MULT(trans) _TRANSCODER2(trans, _PIPE_MULT_A) | ||
2477 | 2480 | ||
2478 | /* HSW+ eDP PSR registers */ | 2481 | /* HSW+ eDP PSR registers */ |
2479 | #define EDP_PSR_BASE(dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800) | 2482 | #define EDP_PSR_BASE(dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800) |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2d4258038ef2..507370513f3d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4222,6 +4222,11 @@ static void haswell_crtc_enable(struct drm_crtc *crtc) | |||
4222 | 4222 | ||
4223 | intel_set_pipe_timings(intel_crtc); | 4223 | intel_set_pipe_timings(intel_crtc); |
4224 | 4224 | ||
4225 | if (intel_crtc->config.cpu_transcoder != TRANSCODER_EDP) { | ||
4226 | I915_WRITE(PIPE_MULT(intel_crtc->config.cpu_transcoder), | ||
4227 | intel_crtc->config.pixel_multiplier - 1); | ||
4228 | } | ||
4229 | |||
4225 | if (intel_crtc->config.has_pch_encoder) { | 4230 | if (intel_crtc->config.has_pch_encoder) { |
4226 | intel_cpu_transcoder_set_m_n(intel_crtc, | 4231 | intel_cpu_transcoder_set_m_n(intel_crtc, |
4227 | &intel_crtc->config.fdi_m_n, NULL); | 4232 | &intel_crtc->config.fdi_m_n, NULL); |
@@ -7890,7 +7895,12 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, | |||
7890 | pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) && | 7895 | pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) && |
7891 | (I915_READ(IPS_CTL) & IPS_ENABLE); | 7896 | (I915_READ(IPS_CTL) & IPS_ENABLE); |
7892 | 7897 | ||
7893 | pipe_config->pixel_multiplier = 1; | 7898 | if (pipe_config->cpu_transcoder != TRANSCODER_EDP) { |
7899 | pipe_config->pixel_multiplier = | ||
7900 | I915_READ(PIPE_MULT(pipe_config->cpu_transcoder)) + 1; | ||
7901 | } else { | ||
7902 | pipe_config->pixel_multiplier = 1; | ||
7903 | } | ||
7894 | 7904 | ||
7895 | return true; | 7905 | return true; |
7896 | } | 7906 | } |