diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-18 10:37:06 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-21 12:34:18 -0400 |
commit | 7ac0129bbfe28b66ead21369398edc7f7482d46a (patch) | |
tree | b0462d70e6cf5ffc9ac3503ed6446ee02d141bda /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | 52f843f6ccbd73497c8e9acd9299ebf216d738be (diff) |
drm/i915: Wire up CRC for vlv
v2: Actually enable it.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9a4f168c9e39..25fc3841a2b1 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -1964,6 +1964,29 @@ static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_source source, | |||
1964 | return 0; | 1964 | return 0; |
1965 | } | 1965 | } |
1966 | 1966 | ||
1967 | static int vlv_pipe_crc_ctl_reg(enum intel_pipe_crc_source source, | ||
1968 | uint32_t *val) | ||
1969 | { | ||
1970 | switch (source) { | ||
1971 | case INTEL_PIPE_CRC_SOURCE_PIPE: | ||
1972 | *val = PIPE_CRC_ENABLE | PIPE_CRC_SOURCE_PIPE_VLV; | ||
1973 | break; | ||
1974 | case INTEL_PIPE_CRC_SOURCE_DP_B: | ||
1975 | *val = PIPE_CRC_ENABLE | PIPE_CRC_SOURCE_DP_B_VLV; | ||
1976 | break; | ||
1977 | case INTEL_PIPE_CRC_SOURCE_DP_C: | ||
1978 | *val = PIPE_CRC_ENABLE | PIPE_CRC_SOURCE_DP_C_VLV; | ||
1979 | break; | ||
1980 | case INTEL_PIPE_CRC_SOURCE_NONE: | ||
1981 | *val = 0; | ||
1982 | break; | ||
1983 | default: | ||
1984 | return -EINVAL; | ||
1985 | } | ||
1986 | |||
1987 | return 0; | ||
1988 | } | ||
1989 | |||
1967 | static int i9xx_pipe_crc_ctl_reg(struct drm_device *dev, | 1990 | static int i9xx_pipe_crc_ctl_reg(struct drm_device *dev, |
1968 | enum intel_pipe_crc_source source, | 1991 | enum intel_pipe_crc_source source, |
1969 | uint32_t *val) | 1992 | uint32_t *val) |
@@ -2056,9 +2079,6 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe, | |||
2056 | u32 val; | 2079 | u32 val; |
2057 | int ret; | 2080 | int ret; |
2058 | 2081 | ||
2059 | if (IS_VALLEYVIEW(dev)) | ||
2060 | return -ENODEV; | ||
2061 | |||
2062 | if (pipe_crc->source == source) | 2082 | if (pipe_crc->source == source) |
2063 | return 0; | 2083 | return 0; |
2064 | 2084 | ||
@@ -2070,6 +2090,8 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe, | |||
2070 | ret = i8xx_pipe_crc_ctl_reg(source, &val); | 2090 | ret = i8xx_pipe_crc_ctl_reg(source, &val); |
2071 | else if (INTEL_INFO(dev)->gen < 5) | 2091 | else if (INTEL_INFO(dev)->gen < 5) |
2072 | ret = i9xx_pipe_crc_ctl_reg(dev, source, &val); | 2092 | ret = i9xx_pipe_crc_ctl_reg(dev, source, &val); |
2093 | else if (IS_VALLEYVIEW(dev)) | ||
2094 | ret = vlv_pipe_crc_ctl_reg(source, &val); | ||
2073 | else if (IS_GEN5(dev) || IS_GEN6(dev)) | 2095 | else if (IS_GEN5(dev) || IS_GEN6(dev)) |
2074 | ret = ilk_pipe_crc_ctl_reg(source, &val); | 2096 | ret = ilk_pipe_crc_ctl_reg(source, &val); |
2075 | else | 2097 | else |