Lines Matching refs:pipe_config
105 struct intel_crtc_state *pipe_config, in intel_pch_panel_fitting() argument
108 const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; in intel_pch_panel_fitting()
112 if (adjusted_mode->crtc_hdisplay == pipe_config->pipe_src_w && in intel_pch_panel_fitting()
113 adjusted_mode->crtc_vdisplay == pipe_config->pipe_src_h) in intel_pch_panel_fitting()
118 width = pipe_config->pipe_src_w; in intel_pch_panel_fitting()
119 height = pipe_config->pipe_src_h; in intel_pch_panel_fitting()
128 * pipe_config->pipe_src_h; in intel_pch_panel_fitting()
129 u32 scaled_height = pipe_config->pipe_src_w in intel_pch_panel_fitting()
132 width = scaled_height / pipe_config->pipe_src_h; in intel_pch_panel_fitting()
139 height = scaled_width / pipe_config->pipe_src_w; in intel_pch_panel_fitting()
165 pipe_config->pch_pfit.pos = (x << 16) | y; in intel_pch_panel_fitting()
166 pipe_config->pch_pfit.size = (width << 16) | height; in intel_pch_panel_fitting()
167 pipe_config->pch_pfit.enabled = pipe_config->pch_pfit.size != 0; in intel_pch_panel_fitting()
226 static void i965_scale_aspect(struct intel_crtc_state *pipe_config, in i965_scale_aspect() argument
229 const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; in i965_scale_aspect()
231 pipe_config->pipe_src_h; in i965_scale_aspect()
232 u32 scaled_height = pipe_config->pipe_src_w * in i965_scale_aspect()
242 else if (adjusted_mode->crtc_hdisplay != pipe_config->pipe_src_w) in i965_scale_aspect()
246 static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, in i9xx_scale_aspect() argument
250 struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; in i9xx_scale_aspect()
252 pipe_config->pipe_src_h; in i9xx_scale_aspect()
253 u32 scaled_height = pipe_config->pipe_src_w * in i9xx_scale_aspect()
265 pipe_config->pipe_src_h); in i9xx_scale_aspect()
268 if (pipe_config->pipe_src_h != adjusted_mode->crtc_vdisplay) { in i9xx_scale_aspect()
269 bits = panel_fitter_scaling(pipe_config->pipe_src_h, in i9xx_scale_aspect()
281 pipe_config->pipe_src_w); in i9xx_scale_aspect()
284 if (pipe_config->pipe_src_w != adjusted_mode->crtc_hdisplay) { in i9xx_scale_aspect()
285 bits = panel_fitter_scaling(pipe_config->pipe_src_w, in i9xx_scale_aspect()
304 struct intel_crtc_state *pipe_config, in intel_gmch_panel_fitting() argument
309 struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; in intel_gmch_panel_fitting()
312 if (adjusted_mode->crtc_hdisplay == pipe_config->pipe_src_w && in intel_gmch_panel_fitting()
313 adjusted_mode->crtc_vdisplay == pipe_config->pipe_src_h) in intel_gmch_panel_fitting()
322 centre_horizontally(adjusted_mode, pipe_config->pipe_src_w); in intel_gmch_panel_fitting()
323 centre_vertically(adjusted_mode, pipe_config->pipe_src_h); in intel_gmch_panel_fitting()
329 i965_scale_aspect(pipe_config, &pfit_control); in intel_gmch_panel_fitting()
331 i9xx_scale_aspect(pipe_config, &pfit_control, in intel_gmch_panel_fitting()
339 if (pipe_config->pipe_src_h != adjusted_mode->crtc_vdisplay || in intel_gmch_panel_fitting()
340 pipe_config->pipe_src_w != adjusted_mode->crtc_hdisplay) { in intel_gmch_panel_fitting()
369 if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18) in intel_gmch_panel_fitting()
372 pipe_config->gmch_pfit.control = pfit_control; in intel_gmch_panel_fitting()
373 pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios; in intel_gmch_panel_fitting()
374 pipe_config->gmch_pfit.lvds_border_bits = border; in intel_gmch_panel_fitting()