Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/display: convert intel_crtc_state_dump.c to struct intel_display

Going forward, struct intel_display is the main display device data
pointer. Convert intel_crtc_state_dump.c to struct intel_display.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/b0d7c61f40e26e8d74de2217963d333fe8c304c4.1742554320.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+22 -22
+22 -22
drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
··· 5 5 6 6 #include <drm/drm_edid.h> 7 7 #include <drm/drm_eld.h> 8 + #include <drm/drm_print.h> 8 9 9 - #include "i915_drv.h" 10 10 #include "intel_crtc_state_dump.h" 11 + #include "intel_display_core.h" 11 12 #include "intel_display_types.h" 12 13 #include "intel_hdmi.h" 13 14 #include "intel_vblank.h" ··· 43 42 } 44 43 45 44 static void 46 - intel_dump_infoframe(struct drm_i915_private *i915, 45 + intel_dump_infoframe(struct intel_display *display, 47 46 const union hdmi_infoframe *frame) 48 47 { 49 48 if (!drm_debug_enabled(DRM_UT_KMS)) 50 49 return; 51 50 52 - hdmi_infoframe_log(KERN_DEBUG, i915->drm.dev, frame); 51 + hdmi_infoframe_log(KERN_DEBUG, display->drm->dev, frame); 53 52 } 54 53 55 54 #define OUTPUT_TYPE(x) [INTEL_OUTPUT_ ## x] = #x ··· 137 136 } 138 137 139 138 static void 140 - ilk_dump_csc(struct drm_i915_private *i915, 139 + ilk_dump_csc(struct intel_display *display, 141 140 struct drm_printer *p, 142 141 const char *name, 143 142 const struct intel_csc_matrix *csc) ··· 153 152 csc->coeff[3 * i + 1], 154 153 csc->coeff[3 * i + 2]); 155 154 156 - if (DISPLAY_VER(i915) < 7) 155 + if (DISPLAY_VER(display) < 7) 157 156 return; 158 157 159 158 drm_printf(p, "%s: post offsets: 0x%04x 0x%04x 0x%04x\n", name, ··· 179 178 { 180 179 struct intel_display *display = to_intel_display(pipe_config); 181 180 struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc); 182 - struct drm_i915_private *i915 = to_i915(crtc->base.dev); 183 181 const struct intel_plane_state *plane_state; 184 182 struct intel_plane *plane; 185 183 struct drm_printer p; ··· 188 188 if (!drm_debug_enabled(DRM_UT_KMS)) 189 189 return; 190 190 191 - p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, NULL); 191 + p = drm_dbg_printer(display->drm, DRM_UT_KMS, NULL); 192 192 193 193 drm_printf(&p, "[CRTC:%d:%s] enable: %s [%s]\n", 194 194 crtc->base.base.id, crtc->base.name, ··· 262 262 drm_printf(&p, "GCP: 0x%x\n", pipe_config->infoframes.gcp); 263 263 if (pipe_config->infoframes.enable & 264 264 intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_AVI)) 265 - intel_dump_infoframe(i915, &pipe_config->infoframes.avi); 265 + intel_dump_infoframe(display, &pipe_config->infoframes.avi); 266 266 if (pipe_config->infoframes.enable & 267 267 intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_SPD)) 268 - intel_dump_infoframe(i915, &pipe_config->infoframes.spd); 268 + intel_dump_infoframe(display, &pipe_config->infoframes.spd); 269 269 if (pipe_config->infoframes.enable & 270 270 intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_VENDOR)) 271 - intel_dump_infoframe(i915, &pipe_config->infoframes.hdmi); 271 + intel_dump_infoframe(display, &pipe_config->infoframes.hdmi); 272 272 if (pipe_config->infoframes.enable & 273 273 intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_DRM)) 274 - intel_dump_infoframe(i915, &pipe_config->infoframes.drm); 274 + intel_dump_infoframe(display, &pipe_config->infoframes.drm); 275 275 if (pipe_config->infoframes.enable & 276 276 intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GAMUT_METADATA)) 277 - intel_dump_infoframe(i915, &pipe_config->infoframes.drm); 277 + intel_dump_infoframe(display, &pipe_config->infoframes.drm); 278 278 if (pipe_config->infoframes.enable & 279 279 intel_hdmi_infoframe_enable(DP_SDP_VSC)) 280 280 drm_dp_vsc_sdp_log(&p, &pipe_config->infoframes.vsc); ··· 320 320 drm_printf(&p, "linetime: %d, ips linetime: %d\n", 321 321 pipe_config->linetime, pipe_config->ips_linetime); 322 322 323 - if (DISPLAY_VER(i915) >= 9) 323 + if (DISPLAY_VER(display) >= 9) 324 324 drm_printf(&p, "num_scalers: %d, scaler_users: 0x%x, scaler_id: %d, scaling_filter: %d\n", 325 325 crtc->num_scalers, 326 326 pipe_config->scaler_state.scaler_users, 327 327 pipe_config->scaler_state.scaler_id, 328 328 pipe_config->hw.scaling_filter); 329 329 330 - if (HAS_GMCH(i915)) 330 + if (HAS_GMCH(display)) 331 331 drm_printf(&p, "gmch pfit: control: 0x%08x, ratios: 0x%08x, lvds border: 0x%08x\n", 332 332 pipe_config->gmch_pfit.control, 333 333 pipe_config->gmch_pfit.pgm_ratios, ··· 344 344 345 345 intel_dpll_dump_hw_state(display, &p, &pipe_config->dpll_hw_state); 346 346 347 - if (IS_CHERRYVIEW(i915)) 347 + if (display->platform.cherryview) 348 348 drm_printf(&p, "cgm_mode: 0x%x gamma_mode: 0x%x gamma_enable: %d csc_enable: %d\n", 349 349 pipe_config->cgm_mode, pipe_config->gamma_mode, 350 350 pipe_config->gamma_enable, pipe_config->csc_enable); ··· 355 355 356 356 drm_printf(&p, "pre csc lut: %s%d entries, post csc lut: %d entries\n", 357 357 pipe_config->pre_csc_lut && pipe_config->pre_csc_lut == 358 - i915->display.color.glk_linear_degamma_lut ? "(linear) " : "", 358 + display->color.glk_linear_degamma_lut ? "(linear) " : "", 359 359 pipe_config->pre_csc_lut ? 360 360 drm_color_lut_size(pipe_config->pre_csc_lut) : 0, 361 361 pipe_config->post_csc_lut ? 362 362 drm_color_lut_size(pipe_config->post_csc_lut) : 0); 363 363 364 - if (DISPLAY_VER(i915) >= 11) 365 - ilk_dump_csc(i915, &p, "output csc", &pipe_config->output_csc); 364 + if (DISPLAY_VER(display) >= 11) 365 + ilk_dump_csc(display, &p, "output csc", &pipe_config->output_csc); 366 366 367 - if (!HAS_GMCH(i915)) 368 - ilk_dump_csc(i915, &p, "pipe csc", &pipe_config->csc); 369 - else if (IS_CHERRYVIEW(i915)) 367 + if (!HAS_GMCH(display)) 368 + ilk_dump_csc(display, &p, "pipe csc", &pipe_config->csc); 369 + else if (display->platform.cherryview) 370 370 vlv_dump_csc(&p, "cgm csc", &pipe_config->csc); 371 - else if (IS_VALLEYVIEW(i915)) 371 + else if (display->platform.valleyview) 372 372 vlv_dump_csc(&p, "wgc csc", &pipe_config->csc); 373 373 374 374 intel_vdsc_state_dump(&p, 0, pipe_config);