diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 09:18:32 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 09:38:19 -0400 |
commit | bc2481f313a05887f0b650555d289dcee5c46d8b (patch) | |
tree | 3a08ad20b08e7c587d0485dae97c336777e0d0f4 | |
parent | a3da1df7bd1697ff661f7fd310a893815fa52391 (diff) |
drm/i915: s/intel_infoframe/gm45_infoframe
These two functions are actually hw-specific and only valid for gm45
thru gen7. HSW completely changes how this works, so label them
accordingly.
v2: s/gm45/g4x/ like for the previous patch.
Acked-by: Paulo Zanoni <przanoni@gmail.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 4db8d7463f4d..e240d99dbf92 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -75,7 +75,7 @@ void intel_dip_infoframe_csum(struct dip_infoframe *frame) | |||
75 | frame->checksum = 0x100 - sum; | 75 | frame->checksum = 0x100 - sum; |
76 | } | 76 | } |
77 | 77 | ||
78 | static u32 intel_infoframe_index(struct dip_infoframe *frame) | 78 | static u32 g4x_infoframe_index(struct dip_infoframe *frame) |
79 | { | 79 | { |
80 | u32 flags = 0; | 80 | u32 flags = 0; |
81 | 81 | ||
@@ -94,7 +94,7 @@ static u32 intel_infoframe_index(struct dip_infoframe *frame) | |||
94 | return flags; | 94 | return flags; |
95 | } | 95 | } |
96 | 96 | ||
97 | static u32 intel_infoframe_enable(struct dip_infoframe *frame) | 97 | static u32 g4x_infoframe_enable(struct dip_infoframe *frame) |
98 | { | 98 | { |
99 | u32 flags = 0; | 99 | u32 flags = 0; |
100 | 100 | ||
@@ -134,9 +134,9 @@ static void g4x_write_infoframe(struct drm_encoder *encoder, | |||
134 | return; | 134 | return; |
135 | 135 | ||
136 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ | 136 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ |
137 | val |= intel_infoframe_index(frame); | 137 | val |= g4x_infoframe_index(frame); |
138 | 138 | ||
139 | val &= ~intel_infoframe_enable(frame); | 139 | val &= ~g4x_infoframe_enable(frame); |
140 | val |= VIDEO_DIP_ENABLE; | 140 | val |= VIDEO_DIP_ENABLE; |
141 | 141 | ||
142 | I915_WRITE(VIDEO_DIP_CTL, val); | 142 | I915_WRITE(VIDEO_DIP_CTL, val); |
@@ -146,7 +146,7 @@ static void g4x_write_infoframe(struct drm_encoder *encoder, | |||
146 | data++; | 146 | data++; |
147 | } | 147 | } |
148 | 148 | ||
149 | val |= intel_infoframe_enable(frame); | 149 | val |= g4x_infoframe_enable(frame); |
150 | val &= ~VIDEO_DIP_FREQ_MASK; | 150 | val &= ~VIDEO_DIP_FREQ_MASK; |
151 | val |= VIDEO_DIP_FREQ_VSYNC; | 151 | val |= VIDEO_DIP_FREQ_VSYNC; |
152 | 152 | ||
@@ -184,9 +184,9 @@ static void ibx_write_infoframe(struct drm_encoder *encoder, | |||
184 | intel_wait_for_vblank(dev, intel_crtc->pipe); | 184 | intel_wait_for_vblank(dev, intel_crtc->pipe); |
185 | 185 | ||
186 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ | 186 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ |
187 | val |= intel_infoframe_index(frame); | 187 | val |= g4x_infoframe_index(frame); |
188 | 188 | ||
189 | val &= ~intel_infoframe_enable(frame); | 189 | val &= ~g4x_infoframe_enable(frame); |
190 | val |= VIDEO_DIP_ENABLE; | 190 | val |= VIDEO_DIP_ENABLE; |
191 | 191 | ||
192 | I915_WRITE(reg, val); | 192 | I915_WRITE(reg, val); |
@@ -196,7 +196,7 @@ static void ibx_write_infoframe(struct drm_encoder *encoder, | |||
196 | data++; | 196 | data++; |
197 | } | 197 | } |
198 | 198 | ||
199 | val |= intel_infoframe_enable(frame); | 199 | val |= g4x_infoframe_enable(frame); |
200 | val &= ~VIDEO_DIP_FREQ_MASK; | 200 | val &= ~VIDEO_DIP_FREQ_MASK; |
201 | val |= VIDEO_DIP_FREQ_VSYNC; | 201 | val |= VIDEO_DIP_FREQ_VSYNC; |
202 | 202 | ||
@@ -218,14 +218,14 @@ static void cpt_write_infoframe(struct drm_encoder *encoder, | |||
218 | intel_wait_for_vblank(dev, intel_crtc->pipe); | 218 | intel_wait_for_vblank(dev, intel_crtc->pipe); |
219 | 219 | ||
220 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ | 220 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ |
221 | val |= intel_infoframe_index(frame); | 221 | val |= g4x_infoframe_index(frame); |
222 | 222 | ||
223 | /* The DIP control register spec says that we need to update the AVI | 223 | /* The DIP control register spec says that we need to update the AVI |
224 | * infoframe without clearing its enable bit */ | 224 | * infoframe without clearing its enable bit */ |
225 | if (frame->type == DIP_TYPE_AVI) | 225 | if (frame->type == DIP_TYPE_AVI) |
226 | val |= VIDEO_DIP_ENABLE_AVI; | 226 | val |= VIDEO_DIP_ENABLE_AVI; |
227 | else | 227 | else |
228 | val &= ~intel_infoframe_enable(frame); | 228 | val &= ~g4x_infoframe_enable(frame); |
229 | 229 | ||
230 | val |= VIDEO_DIP_ENABLE; | 230 | val |= VIDEO_DIP_ENABLE; |
231 | 231 | ||
@@ -236,7 +236,7 @@ static void cpt_write_infoframe(struct drm_encoder *encoder, | |||
236 | data++; | 236 | data++; |
237 | } | 237 | } |
238 | 238 | ||
239 | val |= intel_infoframe_enable(frame); | 239 | val |= g4x_infoframe_enable(frame); |
240 | val &= ~VIDEO_DIP_FREQ_MASK; | 240 | val &= ~VIDEO_DIP_FREQ_MASK; |
241 | val |= VIDEO_DIP_FREQ_VSYNC; | 241 | val |= VIDEO_DIP_FREQ_VSYNC; |
242 | 242 | ||
@@ -258,9 +258,9 @@ static void vlv_write_infoframe(struct drm_encoder *encoder, | |||
258 | intel_wait_for_vblank(dev, intel_crtc->pipe); | 258 | intel_wait_for_vblank(dev, intel_crtc->pipe); |
259 | 259 | ||
260 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ | 260 | val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */ |
261 | val |= intel_infoframe_index(frame); | 261 | val |= g4x_infoframe_index(frame); |
262 | 262 | ||
263 | val &= ~intel_infoframe_enable(frame); | 263 | val &= ~g4x_infoframe_enable(frame); |
264 | val |= VIDEO_DIP_ENABLE; | 264 | val |= VIDEO_DIP_ENABLE; |
265 | 265 | ||
266 | I915_WRITE(reg, val); | 266 | I915_WRITE(reg, val); |
@@ -270,7 +270,7 @@ static void vlv_write_infoframe(struct drm_encoder *encoder, | |||
270 | data++; | 270 | data++; |
271 | } | 271 | } |
272 | 272 | ||
273 | val |= intel_infoframe_enable(frame); | 273 | val |= g4x_infoframe_enable(frame); |
274 | val &= ~VIDEO_DIP_FREQ_MASK; | 274 | val &= ~VIDEO_DIP_FREQ_MASK; |
275 | val |= VIDEO_DIP_FREQ_VSYNC; | 275 | val |= VIDEO_DIP_FREQ_VSYNC; |
276 | 276 | ||