diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2013-03-13 17:05:41 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-23 07:18:03 -0400 |
commit | 7eb552aeae058a88eece91b902dd51fde45b1f41 (patch) | |
tree | e22e782c323745aaa26fbae20490af31ceff554b | |
parent | a15326a57c4d282803765b0a45c53ea4a8c2c94b (diff) |
drm/i915: Move num_pipes to intel info
Requested by Daniel.
v2: Fix incorrect num_pipe settings. (Chris)
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 48 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 19 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 2 |
7 files changed, 40 insertions, 47 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index e16099b6f942..ebcfe2e9497f 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1630,14 +1630,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
1630 | mutex_init(&dev_priv->rps.hw_lock); | 1630 | mutex_init(&dev_priv->rps.hw_lock); |
1631 | mutex_init(&dev_priv->modeset_restore_lock); | 1631 | mutex_init(&dev_priv->modeset_restore_lock); |
1632 | 1632 | ||
1633 | if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) | 1633 | ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes); |
1634 | dev_priv->num_pipe = 3; | ||
1635 | else if (IS_MOBILE(dev) || !IS_GEN2(dev)) | ||
1636 | dev_priv->num_pipe = 2; | ||
1637 | else | ||
1638 | dev_priv->num_pipe = 1; | ||
1639 | |||
1640 | ret = drm_vblank_init(dev, dev_priv->num_pipe); | ||
1641 | if (ret) | 1634 | if (ret) |
1642 | goto out_gem_unload; | 1635 | goto out_gem_unload; |
1643 | 1636 | ||
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 2e4b4a3a77d2..788ae5bd1bfe 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -136,74 +136,74 @@ extern int intel_agp_enabled; | |||
136 | .driver_data = (unsigned long) info } | 136 | .driver_data = (unsigned long) info } |
137 | 137 | ||
138 | static const struct intel_device_info intel_i830_info = { | 138 | static const struct intel_device_info intel_i830_info = { |
139 | .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, | 139 | .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2, |
140 | .has_overlay = 1, .overlay_needs_physical = 1, | 140 | .has_overlay = 1, .overlay_needs_physical = 1, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static const struct intel_device_info intel_845g_info = { | 143 | static const struct intel_device_info intel_845g_info = { |
144 | .gen = 2, | 144 | .gen = 2, .num_pipes = 1, |
145 | .has_overlay = 1, .overlay_needs_physical = 1, | 145 | .has_overlay = 1, .overlay_needs_physical = 1, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static const struct intel_device_info intel_i85x_info = { | 148 | static const struct intel_device_info intel_i85x_info = { |
149 | .gen = 2, .is_i85x = 1, .is_mobile = 1, | 149 | .gen = 2, .is_i85x = 1, .is_mobile = 1, .num_pipes = 2, |
150 | .cursor_needs_physical = 1, | 150 | .cursor_needs_physical = 1, |
151 | .has_overlay = 1, .overlay_needs_physical = 1, | 151 | .has_overlay = 1, .overlay_needs_physical = 1, |
152 | }; | 152 | }; |
153 | 153 | ||
154 | static const struct intel_device_info intel_i865g_info = { | 154 | static const struct intel_device_info intel_i865g_info = { |
155 | .gen = 2, | 155 | .gen = 2, .num_pipes = 1, |
156 | .has_overlay = 1, .overlay_needs_physical = 1, | 156 | .has_overlay = 1, .overlay_needs_physical = 1, |
157 | }; | 157 | }; |
158 | 158 | ||
159 | static const struct intel_device_info intel_i915g_info = { | 159 | static const struct intel_device_info intel_i915g_info = { |
160 | .gen = 3, .is_i915g = 1, .cursor_needs_physical = 1, | 160 | .gen = 3, .is_i915g = 1, .cursor_needs_physical = 1, .num_pipes = 2, |
161 | .has_overlay = 1, .overlay_needs_physical = 1, | 161 | .has_overlay = 1, .overlay_needs_physical = 1, |
162 | }; | 162 | }; |
163 | static const struct intel_device_info intel_i915gm_info = { | 163 | static const struct intel_device_info intel_i915gm_info = { |
164 | .gen = 3, .is_mobile = 1, | 164 | .gen = 3, .is_mobile = 1, .num_pipes = 2, |
165 | .cursor_needs_physical = 1, | 165 | .cursor_needs_physical = 1, |
166 | .has_overlay = 1, .overlay_needs_physical = 1, | 166 | .has_overlay = 1, .overlay_needs_physical = 1, |
167 | .supports_tv = 1, | 167 | .supports_tv = 1, |
168 | }; | 168 | }; |
169 | static const struct intel_device_info intel_i945g_info = { | 169 | static const struct intel_device_info intel_i945g_info = { |
170 | .gen = 3, .has_hotplug = 1, .cursor_needs_physical = 1, | 170 | .gen = 3, .has_hotplug = 1, .cursor_needs_physical = 1, .num_pipes = 2, |
171 | .has_overlay = 1, .overlay_needs_physical = 1, | 171 | .has_overlay = 1, .overlay_needs_physical = 1, |
172 | }; | 172 | }; |
173 | static const struct intel_device_info intel_i945gm_info = { | 173 | static const struct intel_device_info intel_i945gm_info = { |
174 | .gen = 3, .is_i945gm = 1, .is_mobile = 1, | 174 | .gen = 3, .is_i945gm = 1, .is_mobile = 1, .num_pipes = 2, |
175 | .has_hotplug = 1, .cursor_needs_physical = 1, | 175 | .has_hotplug = 1, .cursor_needs_physical = 1, |
176 | .has_overlay = 1, .overlay_needs_physical = 1, | 176 | .has_overlay = 1, .overlay_needs_physical = 1, |
177 | .supports_tv = 1, | 177 | .supports_tv = 1, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static const struct intel_device_info intel_i965g_info = { | 180 | static const struct intel_device_info intel_i965g_info = { |
181 | .gen = 4, .is_broadwater = 1, | 181 | .gen = 4, .is_broadwater = 1, .num_pipes = 2, |
182 | .has_hotplug = 1, | 182 | .has_hotplug = 1, |
183 | .has_overlay = 1, | 183 | .has_overlay = 1, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static const struct intel_device_info intel_i965gm_info = { | 186 | static const struct intel_device_info intel_i965gm_info = { |
187 | .gen = 4, .is_crestline = 1, | 187 | .gen = 4, .is_crestline = 1, .num_pipes = 2, |
188 | .is_mobile = 1, .has_fbc = 1, .has_hotplug = 1, | 188 | .is_mobile = 1, .has_fbc = 1, .has_hotplug = 1, |
189 | .has_overlay = 1, | 189 | .has_overlay = 1, |
190 | .supports_tv = 1, | 190 | .supports_tv = 1, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static const struct intel_device_info intel_g33_info = { | 193 | static const struct intel_device_info intel_g33_info = { |
194 | .gen = 3, .is_g33 = 1, | 194 | .gen = 3, .is_g33 = 1, .num_pipes = 2, |
195 | .need_gfx_hws = 1, .has_hotplug = 1, | 195 | .need_gfx_hws = 1, .has_hotplug = 1, |
196 | .has_overlay = 1, | 196 | .has_overlay = 1, |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static const struct intel_device_info intel_g45_info = { | 199 | static const struct intel_device_info intel_g45_info = { |
200 | .gen = 4, .is_g4x = 1, .need_gfx_hws = 1, | 200 | .gen = 4, .is_g4x = 1, .need_gfx_hws = 1, .num_pipes = 2, |
201 | .has_pipe_cxsr = 1, .has_hotplug = 1, | 201 | .has_pipe_cxsr = 1, .has_hotplug = 1, |
202 | .has_bsd_ring = 1, | 202 | .has_bsd_ring = 1, |
203 | }; | 203 | }; |
204 | 204 | ||
205 | static const struct intel_device_info intel_gm45_info = { | 205 | static const struct intel_device_info intel_gm45_info = { |
206 | .gen = 4, .is_g4x = 1, | 206 | .gen = 4, .is_g4x = 1, .num_pipes = 2, |
207 | .is_mobile = 1, .need_gfx_hws = 1, .has_fbc = 1, | 207 | .is_mobile = 1, .need_gfx_hws = 1, .has_fbc = 1, |
208 | .has_pipe_cxsr = 1, .has_hotplug = 1, | 208 | .has_pipe_cxsr = 1, .has_hotplug = 1, |
209 | .supports_tv = 1, | 209 | .supports_tv = 1, |
@@ -211,26 +211,26 @@ static const struct intel_device_info intel_gm45_info = { | |||
211 | }; | 211 | }; |
212 | 212 | ||
213 | static const struct intel_device_info intel_pineview_info = { | 213 | static const struct intel_device_info intel_pineview_info = { |
214 | .gen = 3, .is_g33 = 1, .is_pineview = 1, .is_mobile = 1, | 214 | .gen = 3, .is_g33 = 1, .is_pineview = 1, .is_mobile = 1, .num_pipes = 2, |
215 | .need_gfx_hws = 1, .has_hotplug = 1, | 215 | .need_gfx_hws = 1, .has_hotplug = 1, |
216 | .has_overlay = 1, | 216 | .has_overlay = 1, |
217 | }; | 217 | }; |
218 | 218 | ||
219 | static const struct intel_device_info intel_ironlake_d_info = { | 219 | static const struct intel_device_info intel_ironlake_d_info = { |
220 | .gen = 5, | 220 | .gen = 5, .num_pipes = 2, |
221 | .need_gfx_hws = 1, .has_hotplug = 1, | 221 | .need_gfx_hws = 1, .has_hotplug = 1, |
222 | .has_bsd_ring = 1, | 222 | .has_bsd_ring = 1, |
223 | }; | 223 | }; |
224 | 224 | ||
225 | static const struct intel_device_info intel_ironlake_m_info = { | 225 | static const struct intel_device_info intel_ironlake_m_info = { |
226 | .gen = 5, .is_mobile = 1, | 226 | .gen = 5, .is_mobile = 1, .num_pipes = 2, |
227 | .need_gfx_hws = 1, .has_hotplug = 1, | 227 | .need_gfx_hws = 1, .has_hotplug = 1, |
228 | .has_fbc = 1, | 228 | .has_fbc = 1, |
229 | .has_bsd_ring = 1, | 229 | .has_bsd_ring = 1, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | static const struct intel_device_info intel_sandybridge_d_info = { | 232 | static const struct intel_device_info intel_sandybridge_d_info = { |
233 | .gen = 6, | 233 | .gen = 6, .num_pipes = 2, |
234 | .need_gfx_hws = 1, .has_hotplug = 1, | 234 | .need_gfx_hws = 1, .has_hotplug = 1, |
235 | .has_bsd_ring = 1, | 235 | .has_bsd_ring = 1, |
236 | .has_blt_ring = 1, | 236 | .has_blt_ring = 1, |
@@ -239,7 +239,7 @@ static const struct intel_device_info intel_sandybridge_d_info = { | |||
239 | }; | 239 | }; |
240 | 240 | ||
241 | static const struct intel_device_info intel_sandybridge_m_info = { | 241 | static const struct intel_device_info intel_sandybridge_m_info = { |
242 | .gen = 6, .is_mobile = 1, | 242 | .gen = 6, .is_mobile = 1, .num_pipes = 2, |
243 | .need_gfx_hws = 1, .has_hotplug = 1, | 243 | .need_gfx_hws = 1, .has_hotplug = 1, |
244 | .has_fbc = 1, | 244 | .has_fbc = 1, |
245 | .has_bsd_ring = 1, | 245 | .has_bsd_ring = 1, |
@@ -249,7 +249,7 @@ static const struct intel_device_info intel_sandybridge_m_info = { | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | static const struct intel_device_info intel_ivybridge_d_info = { | 251 | static const struct intel_device_info intel_ivybridge_d_info = { |
252 | .is_ivybridge = 1, .gen = 7, | 252 | .is_ivybridge = 1, .gen = 7, .num_pipes = 3, |
253 | .need_gfx_hws = 1, .has_hotplug = 1, | 253 | .need_gfx_hws = 1, .has_hotplug = 1, |
254 | .has_bsd_ring = 1, | 254 | .has_bsd_ring = 1, |
255 | .has_blt_ring = 1, | 255 | .has_blt_ring = 1, |
@@ -258,7 +258,7 @@ static const struct intel_device_info intel_ivybridge_d_info = { | |||
258 | }; | 258 | }; |
259 | 259 | ||
260 | static const struct intel_device_info intel_ivybridge_m_info = { | 260 | static const struct intel_device_info intel_ivybridge_m_info = { |
261 | .is_ivybridge = 1, .gen = 7, .is_mobile = 1, | 261 | .is_ivybridge = 1, .gen = 7, .is_mobile = 1, .num_pipes = 3, |
262 | .need_gfx_hws = 1, .has_hotplug = 1, | 262 | .need_gfx_hws = 1, .has_hotplug = 1, |
263 | .has_fbc = 0, /* FBC is not enabled on Ivybridge mobile yet */ | 263 | .has_fbc = 0, /* FBC is not enabled on Ivybridge mobile yet */ |
264 | .has_bsd_ring = 1, | 264 | .has_bsd_ring = 1, |
@@ -268,7 +268,7 @@ static const struct intel_device_info intel_ivybridge_m_info = { | |||
268 | }; | 268 | }; |
269 | 269 | ||
270 | static const struct intel_device_info intel_valleyview_m_info = { | 270 | static const struct intel_device_info intel_valleyview_m_info = { |
271 | .gen = 7, .is_mobile = 1, | 271 | .gen = 7, .is_mobile = 1, .num_pipes = 2, |
272 | .need_gfx_hws = 1, .has_hotplug = 1, | 272 | .need_gfx_hws = 1, .has_hotplug = 1, |
273 | .has_fbc = 0, | 273 | .has_fbc = 0, |
274 | .has_bsd_ring = 1, | 274 | .has_bsd_ring = 1, |
@@ -279,7 +279,7 @@ static const struct intel_device_info intel_valleyview_m_info = { | |||
279 | }; | 279 | }; |
280 | 280 | ||
281 | static const struct intel_device_info intel_valleyview_d_info = { | 281 | static const struct intel_device_info intel_valleyview_d_info = { |
282 | .gen = 7, | 282 | .gen = 7, .num_pipes = 2, |
283 | .need_gfx_hws = 1, .has_hotplug = 1, | 283 | .need_gfx_hws = 1, .has_hotplug = 1, |
284 | .has_fbc = 0, | 284 | .has_fbc = 0, |
285 | .has_bsd_ring = 1, | 285 | .has_bsd_ring = 1, |
@@ -290,7 +290,7 @@ static const struct intel_device_info intel_valleyview_d_info = { | |||
290 | }; | 290 | }; |
291 | 291 | ||
292 | static const struct intel_device_info intel_haswell_d_info = { | 292 | static const struct intel_device_info intel_haswell_d_info = { |
293 | .is_haswell = 1, .gen = 7, | 293 | .is_haswell = 1, .gen = 7, .num_pipes = 3, |
294 | .need_gfx_hws = 1, .has_hotplug = 1, | 294 | .need_gfx_hws = 1, .has_hotplug = 1, |
295 | .has_bsd_ring = 1, | 295 | .has_bsd_ring = 1, |
296 | .has_blt_ring = 1, | 296 | .has_blt_ring = 1, |
@@ -299,7 +299,7 @@ static const struct intel_device_info intel_haswell_d_info = { | |||
299 | }; | 299 | }; |
300 | 300 | ||
301 | static const struct intel_device_info intel_haswell_m_info = { | 301 | static const struct intel_device_info intel_haswell_m_info = { |
302 | .is_haswell = 1, .gen = 7, .is_mobile = 1, | 302 | .is_haswell = 1, .gen = 7, .is_mobile = 1, .num_pipes = 3, |
303 | .need_gfx_hws = 1, .has_hotplug = 1, | 303 | .need_gfx_hws = 1, .has_hotplug = 1, |
304 | .has_bsd_ring = 1, | 304 | .has_bsd_ring = 1, |
305 | .has_blt_ring = 1, | 305 | .has_blt_ring = 1, |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 1246a31c0243..1657d8733648 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -93,7 +93,7 @@ enum port { | |||
93 | I915_GEM_DOMAIN_INSTRUCTION | \ | 93 | I915_GEM_DOMAIN_INSTRUCTION | \ |
94 | I915_GEM_DOMAIN_VERTEX) | 94 | I915_GEM_DOMAIN_VERTEX) |
95 | 95 | ||
96 | #define for_each_pipe(p) for ((p) = 0; (p) < dev_priv->num_pipe; (p)++) | 96 | #define for_each_pipe(p) for ((p) = 0; (p) < INTEL_INFO(dev)->num_pipes; (p)++) |
97 | 97 | ||
98 | #define for_each_encoder_on_crtc(dev, __crtc, intel_encoder) \ | 98 | #define for_each_encoder_on_crtc(dev, __crtc, intel_encoder) \ |
99 | list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \ | 99 | list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \ |
@@ -341,6 +341,7 @@ struct drm_i915_gt_funcs { | |||
341 | 341 | ||
342 | struct intel_device_info { | 342 | struct intel_device_info { |
343 | u32 display_mmio_offset; | 343 | u32 display_mmio_offset; |
344 | u8 num_pipes:3; | ||
344 | u8 gen; | 345 | u8 gen; |
345 | u8 is_mobile:1; | 346 | u8 is_mobile:1; |
346 | u8 is_i85x:1; | 347 | u8 is_i85x:1; |
@@ -912,7 +913,6 @@ typedef struct drm_i915_private { | |||
912 | struct work_struct hotplug_work; | 913 | struct work_struct hotplug_work; |
913 | bool enable_hotplug_processing; | 914 | bool enable_hotplug_processing; |
914 | 915 | ||
915 | int num_pipe; | ||
916 | int num_pch_pll; | 916 | int num_pch_pll; |
917 | 917 | ||
918 | unsigned long cfb_size; | 918 | unsigned long cfb_size; |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 62285ff03083..5fc178e1e515 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -254,10 +254,9 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, | |||
254 | struct timeval *vblank_time, | 254 | struct timeval *vblank_time, |
255 | unsigned flags) | 255 | unsigned flags) |
256 | { | 256 | { |
257 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
258 | struct drm_crtc *crtc; | 257 | struct drm_crtc *crtc; |
259 | 258 | ||
260 | if (pipe < 0 || pipe >= dev_priv->num_pipe) { | 259 | if (pipe < 0 || pipe >= INTEL_INFO(dev)->num_pipes) { |
261 | DRM_ERROR("Invalid crtc %d\n", pipe); | 260 | DRM_ERROR("Invalid crtc %d\n", pipe); |
262 | return -EINVAL; | 261 | return -EINVAL; |
263 | } | 262 | } |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 72dd3fd8e9c1..b3b22d7d2cd0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2346,10 +2346,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2346 | return 0; | 2346 | return 0; |
2347 | } | 2347 | } |
2348 | 2348 | ||
2349 | if(intel_crtc->plane > dev_priv->num_pipe) { | 2349 | if (intel_crtc->plane > INTEL_INFO(dev)->num_pipes) { |
2350 | DRM_ERROR("no plane for crtc: plane %d, num_pipes %d\n", | 2350 | DRM_ERROR("no plane for crtc: plane %d, num_pipes %d\n", |
2351 | intel_crtc->plane, | 2351 | intel_crtc->plane, |
2352 | dev_priv->num_pipe); | 2352 | INTEL_INFO(dev)->num_pipes); |
2353 | return -EINVAL; | 2353 | return -EINVAL; |
2354 | } | 2354 | } |
2355 | 2355 | ||
@@ -5390,7 +5390,7 @@ static bool ironlake_check_fdi_lanes(struct intel_crtc *intel_crtc) | |||
5390 | return false; | 5390 | return false; |
5391 | } | 5391 | } |
5392 | 5392 | ||
5393 | if (dev_priv->num_pipe == 2) | 5393 | if (INTEL_INFO(dev)->num_pipes == 2) |
5394 | return true; | 5394 | return true; |
5395 | 5395 | ||
5396 | switch (intel_crtc->pipe) { | 5396 | switch (intel_crtc->pipe) { |
@@ -8887,9 +8887,10 @@ void intel_modeset_init(struct drm_device *dev) | |||
8887 | dev->mode_config.fb_base = dev_priv->gtt.mappable_base; | 8887 | dev->mode_config.fb_base = dev_priv->gtt.mappable_base; |
8888 | 8888 | ||
8889 | DRM_DEBUG_KMS("%d display pipe%s available.\n", | 8889 | DRM_DEBUG_KMS("%d display pipe%s available.\n", |
8890 | dev_priv->num_pipe, dev_priv->num_pipe > 1 ? "s" : ""); | 8890 | INTEL_INFO(dev)->num_pipes, |
8891 | INTEL_INFO(dev)->num_pipes > 1 ? "s" : ""); | ||
8891 | 8892 | ||
8892 | for (i = 0; i < dev_priv->num_pipe; i++) { | 8893 | for (i = 0; i < INTEL_INFO(dev)->num_pipes; i++) { |
8893 | intel_crtc_init(dev, i); | 8894 | intel_crtc_init(dev, i); |
8894 | ret = intel_plane_init(dev, i); | 8895 | ret = intel_plane_init(dev, i); |
8895 | if (ret) | 8896 | if (ret) |
@@ -8946,10 +8947,11 @@ static void intel_enable_pipe_a(struct drm_device *dev) | |||
8946 | static bool | 8947 | static bool |
8947 | intel_check_plane_mapping(struct intel_crtc *crtc) | 8948 | intel_check_plane_mapping(struct intel_crtc *crtc) |
8948 | { | 8949 | { |
8949 | struct drm_i915_private *dev_priv = crtc->base.dev->dev_private; | 8950 | struct drm_device *dev = crtc->base.dev; |
8951 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
8950 | u32 reg, val; | 8952 | u32 reg, val; |
8951 | 8953 | ||
8952 | if (dev_priv->num_pipe == 1) | 8954 | if (INTEL_INFO(dev)->num_pipes == 1) |
8953 | return true; | 8955 | return true; |
8954 | 8956 | ||
8955 | reg = DSPCNTR(!crtc->plane); | 8957 | reg = DSPCNTR(!crtc->plane); |
@@ -9391,10 +9393,9 @@ intel_display_print_error_state(struct seq_file *m, | |||
9391 | struct drm_device *dev, | 9393 | struct drm_device *dev, |
9392 | struct intel_display_error_state *error) | 9394 | struct intel_display_error_state *error) |
9393 | { | 9395 | { |
9394 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
9395 | int i; | 9396 | int i; |
9396 | 9397 | ||
9397 | seq_printf(m, "Num Pipes: %d\n", dev_priv->num_pipe); | 9398 | seq_printf(m, "Num Pipes: %d\n", INTEL_INFO(dev)->num_pipes); |
9398 | for_each_pipe(i) { | 9399 | for_each_pipe(i) { |
9399 | seq_printf(m, "Pipe [%d]:\n", i); | 9400 | seq_printf(m, "Pipe [%d]:\n", i); |
9400 | seq_printf(m, " CONF: %08x\n", error->pipe[i].conf); | 9401 | seq_printf(m, " CONF: %08x\n", error->pipe[i].conf); |
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 510a96047ae4..f203418b6f05 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -225,7 +225,7 @@ int intel_fbdev_init(struct drm_device *dev) | |||
225 | ifbdev->helper.funcs = &intel_fb_helper_funcs; | 225 | ifbdev->helper.funcs = &intel_fb_helper_funcs; |
226 | 226 | ||
227 | ret = drm_fb_helper_init(dev, &ifbdev->helper, | 227 | ret = drm_fb_helper_init(dev, &ifbdev->helper, |
228 | dev_priv->num_pipe, | 228 | INTEL_INFO(dev)->num_pipes, |
229 | INTELFB_CONN_LIMIT); | 229 | INTELFB_CONN_LIMIT); |
230 | if (ret) { | 230 | if (ret) { |
231 | kfree(ifbdev); | 231 | kfree(ifbdev); |
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index a3730e0289e5..f1530f4ad7fe 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c | |||
@@ -338,7 +338,7 @@ void intel_panel_enable_backlight(struct drm_device *dev, | |||
338 | if (tmp & BLM_PWM_ENABLE) | 338 | if (tmp & BLM_PWM_ENABLE) |
339 | goto set_level; | 339 | goto set_level; |
340 | 340 | ||
341 | if (dev_priv->num_pipe == 3) | 341 | if (INTEL_INFO(dev)->num_pipes == 3) |
342 | tmp &= ~BLM_PIPE_SELECT_IVB; | 342 | tmp &= ~BLM_PIPE_SELECT_IVB; |
343 | else | 343 | else |
344 | tmp &= ~BLM_PIPE_SELECT; | 344 | tmp &= ~BLM_PIPE_SELECT; |