Commit f650af72 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: s/pipe_config/crtc_state/ in pfit functions

Follow the new naming convention and call the crtc state
"crtc_state", and while at it drop the redundant crtc argument.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200422161917.17389-4-ville.syrjala@linux.intel.comReviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
parent 35dd95b4
...@@ -1525,7 +1525,6 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, ...@@ -1525,7 +1525,6 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi, struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
base); base);
struct intel_connector *intel_connector = intel_dsi->attached_connector; struct intel_connector *intel_connector = intel_dsi->attached_connector;
struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
const struct drm_display_mode *fixed_mode = const struct drm_display_mode *fixed_mode =
intel_connector->panel.fixed_mode; intel_connector->panel.fixed_mode;
struct drm_display_mode *adjusted_mode = struct drm_display_mode *adjusted_mode =
...@@ -1533,7 +1532,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, ...@@ -1533,7 +1532,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
intel_fixed_panel_mode(fixed_mode, adjusted_mode); intel_fixed_panel_mode(fixed_mode, adjusted_mode);
intel_pch_panel_fitting(crtc, pipe_config, conn_state->scaling_mode); intel_pch_panel_fitting(pipe_config, conn_state->scaling_mode);
adjusted_mode->flags = 0; adjusted_mode->flags = 0;
......
...@@ -2345,7 +2345,6 @@ intel_dp_ycbcr420_config(struct intel_dp *intel_dp, ...@@ -2345,7 +2345,6 @@ intel_dp_ycbcr420_config(struct intel_dp *intel_dp,
const struct drm_display_info *info = &connector->display_info; const struct drm_display_info *info = &connector->display_info;
const struct drm_display_mode *adjusted_mode = const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode; &crtc_state->hw.adjusted_mode;
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
if (!drm_mode_is_420_only(info, adjusted_mode) || if (!drm_mode_is_420_only(info, adjusted_mode) ||
!intel_dp_get_colorimetry_status(intel_dp) || !intel_dp_get_colorimetry_status(intel_dp) ||
...@@ -2354,7 +2353,7 @@ intel_dp_ycbcr420_config(struct intel_dp *intel_dp, ...@@ -2354,7 +2353,7 @@ intel_dp_ycbcr420_config(struct intel_dp *intel_dp,
crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420; crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
intel_pch_panel_fitting(crtc, crtc_state, DRM_MODE_SCALE_FULLSCREEN); intel_pch_panel_fitting(crtc_state, DRM_MODE_SCALE_FULLSCREEN);
return 0; return 0;
} }
...@@ -2535,7 +2534,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, ...@@ -2535,7 +2534,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_dp *intel_dp = enc_to_intel_dp(encoder); struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct intel_lspcon *lspcon = enc_to_intel_lspcon(encoder); struct intel_lspcon *lspcon = enc_to_intel_lspcon(encoder);
enum port port = encoder->port; enum port port = encoder->port;
struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
struct intel_connector *intel_connector = intel_dp->attached_connector; struct intel_connector *intel_connector = intel_dp->attached_connector;
struct intel_digital_connector_state *intel_conn_state = struct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(conn_state); to_intel_digital_connector_state(conn_state);
...@@ -2569,10 +2567,10 @@ intel_dp_compute_config(struct intel_encoder *encoder, ...@@ -2569,10 +2567,10 @@ intel_dp_compute_config(struct intel_encoder *encoder,
adjusted_mode); adjusted_mode);
if (HAS_GMCH(dev_priv)) if (HAS_GMCH(dev_priv))
intel_gmch_panel_fitting(intel_crtc, pipe_config, intel_gmch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
else else
intel_pch_panel_fitting(intel_crtc, pipe_config, intel_pch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
} }
......
...@@ -2326,7 +2326,6 @@ intel_hdmi_ycbcr420_config(struct drm_connector *connector, ...@@ -2326,7 +2326,6 @@ intel_hdmi_ycbcr420_config(struct drm_connector *connector,
struct intel_crtc_state *config) struct intel_crtc_state *config)
{ {
struct drm_i915_private *i915 = to_i915(connector->dev); struct drm_i915_private *i915 = to_i915(connector->dev);
struct intel_crtc *intel_crtc = to_intel_crtc(config->uapi.crtc);
if (!connector->ycbcr_420_allowed) { if (!connector->ycbcr_420_allowed) {
drm_err(&i915->drm, drm_err(&i915->drm,
...@@ -2336,8 +2335,7 @@ intel_hdmi_ycbcr420_config(struct drm_connector *connector, ...@@ -2336,8 +2335,7 @@ intel_hdmi_ycbcr420_config(struct drm_connector *connector,
config->output_format = INTEL_OUTPUT_FORMAT_YCBCR420; config->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
intel_pch_panel_fitting(intel_crtc, config, intel_pch_panel_fitting(config, DRM_MODE_SCALE_FULLSCREEN);
DRM_MODE_SCALE_FULLSCREEN);
return true; return true;
} }
......
...@@ -439,10 +439,10 @@ static int intel_lvds_compute_config(struct intel_encoder *intel_encoder, ...@@ -439,10 +439,10 @@ static int intel_lvds_compute_config(struct intel_encoder *intel_encoder,
if (HAS_PCH_SPLIT(dev_priv)) { if (HAS_PCH_SPLIT(dev_priv)) {
pipe_config->has_pch_encoder = true; pipe_config->has_pch_encoder = true;
intel_pch_panel_fitting(intel_crtc, pipe_config, intel_pch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
} else { } else {
intel_gmch_panel_fitting(intel_crtc, pipe_config, intel_gmch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
} }
......
...@@ -177,23 +177,23 @@ intel_panel_vbt_fixed_mode(struct intel_connector *connector) ...@@ -177,23 +177,23 @@ intel_panel_vbt_fixed_mode(struct intel_connector *connector)
/* adjusted_mode has been preset to be the panel's fixed mode */ /* adjusted_mode has been preset to be the panel's fixed mode */
void void
intel_pch_panel_fitting(struct intel_crtc *intel_crtc, intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
struct intel_crtc_state *pipe_config,
int fitting_mode) int fitting_mode)
{ {
const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode;
int x, y, width, height; int x, y, width, height;
/* Native modes don't need fitting */ /* Native modes don't need fitting */
if (adjusted_mode->crtc_hdisplay == pipe_config->pipe_src_w && if (adjusted_mode->crtc_hdisplay == crtc_state->pipe_src_w &&
adjusted_mode->crtc_vdisplay == pipe_config->pipe_src_h && adjusted_mode->crtc_vdisplay == crtc_state->pipe_src_h &&
pipe_config->output_format != INTEL_OUTPUT_FORMAT_YCBCR420) crtc_state->output_format != INTEL_OUTPUT_FORMAT_YCBCR420)
return; return;
switch (fitting_mode) { switch (fitting_mode) {
case DRM_MODE_SCALE_CENTER: case DRM_MODE_SCALE_CENTER:
width = pipe_config->pipe_src_w; width = crtc_state->pipe_src_w;
height = pipe_config->pipe_src_h; height = crtc_state->pipe_src_h;
x = (adjusted_mode->crtc_hdisplay - width + 1)/2; x = (adjusted_mode->crtc_hdisplay - width + 1)/2;
y = (adjusted_mode->crtc_vdisplay - height + 1)/2; y = (adjusted_mode->crtc_vdisplay - height + 1)/2;
break; break;
...@@ -202,18 +202,18 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -202,18 +202,18 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc,
/* Scale but preserve the aspect ratio */ /* Scale but preserve the aspect ratio */
{ {
u32 scaled_width = adjusted_mode->crtc_hdisplay u32 scaled_width = adjusted_mode->crtc_hdisplay
* pipe_config->pipe_src_h; * crtc_state->pipe_src_h;
u32 scaled_height = pipe_config->pipe_src_w u32 scaled_height = crtc_state->pipe_src_w
* adjusted_mode->crtc_vdisplay; * adjusted_mode->crtc_vdisplay;
if (scaled_width > scaled_height) { /* pillar */ if (scaled_width > scaled_height) { /* pillar */
width = scaled_height / pipe_config->pipe_src_h; width = scaled_height / crtc_state->pipe_src_h;
if (width & 1) if (width & 1)
width++; width++;
x = (adjusted_mode->crtc_hdisplay - width + 1) / 2; x = (adjusted_mode->crtc_hdisplay - width + 1) / 2;
y = 0; y = 0;
height = adjusted_mode->crtc_vdisplay; height = adjusted_mode->crtc_vdisplay;
} else if (scaled_width < scaled_height) { /* letter */ } else if (scaled_width < scaled_height) { /* letter */
height = scaled_width / pipe_config->pipe_src_w; height = scaled_width / crtc_state->pipe_src_w;
if (height & 1) if (height & 1)
height++; height++;
y = (adjusted_mode->crtc_vdisplay - height + 1) / 2; y = (adjusted_mode->crtc_vdisplay - height + 1) / 2;
...@@ -238,9 +238,9 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -238,9 +238,9 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc,
return; return;
} }
drm_rect_init(&pipe_config->pch_pfit.dst, drm_rect_init(&crtc_state->pch_pfit.dst,
x, y, width, height); x, y, width, height);
pipe_config->pch_pfit.enabled = true; crtc_state->pch_pfit.enabled = true;
} }
static void static void
...@@ -299,13 +299,14 @@ static u32 panel_fitter_scaling(u32 source, u32 target) ...@@ -299,13 +299,14 @@ static u32 panel_fitter_scaling(u32 source, u32 target)
return (FACTOR * ratio + FACTOR/2) / FACTOR; return (FACTOR * ratio + FACTOR/2) / FACTOR;
} }
static void i965_scale_aspect(struct intel_crtc_state *pipe_config, static void i965_scale_aspect(struct intel_crtc_state *crtc_state,
u32 *pfit_control) u32 *pfit_control)
{ {
const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode;
u32 scaled_width = adjusted_mode->crtc_hdisplay * u32 scaled_width = adjusted_mode->crtc_hdisplay *
pipe_config->pipe_src_h; crtc_state->pipe_src_h;
u32 scaled_height = pipe_config->pipe_src_w * u32 scaled_height = crtc_state->pipe_src_w *
adjusted_mode->crtc_vdisplay; adjusted_mode->crtc_vdisplay;
/* 965+ is easy, it does everything in hw */ /* 965+ is easy, it does everything in hw */
...@@ -315,18 +316,18 @@ static void i965_scale_aspect(struct intel_crtc_state *pipe_config, ...@@ -315,18 +316,18 @@ static void i965_scale_aspect(struct intel_crtc_state *pipe_config,
else if (scaled_width < scaled_height) else if (scaled_width < scaled_height)
*pfit_control |= PFIT_ENABLE | *pfit_control |= PFIT_ENABLE |
PFIT_SCALING_LETTER; PFIT_SCALING_LETTER;
else if (adjusted_mode->crtc_hdisplay != pipe_config->pipe_src_w) else if (adjusted_mode->crtc_hdisplay != crtc_state->pipe_src_w)
*pfit_control |= PFIT_ENABLE | PFIT_SCALING_AUTO; *pfit_control |= PFIT_ENABLE | PFIT_SCALING_AUTO;
} }
static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, static void i9xx_scale_aspect(struct intel_crtc_state *crtc_state,
u32 *pfit_control, u32 *pfit_pgm_ratios, u32 *pfit_control, u32 *pfit_pgm_ratios,
u32 *border) u32 *border)
{ {
struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
u32 scaled_width = adjusted_mode->crtc_hdisplay * u32 scaled_width = adjusted_mode->crtc_hdisplay *
pipe_config->pipe_src_h; crtc_state->pipe_src_h;
u32 scaled_height = pipe_config->pipe_src_w * u32 scaled_height = crtc_state->pipe_src_w *
adjusted_mode->crtc_vdisplay; adjusted_mode->crtc_vdisplay;
u32 bits; u32 bits;
...@@ -338,11 +339,11 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, ...@@ -338,11 +339,11 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config,
if (scaled_width > scaled_height) { /* pillar */ if (scaled_width > scaled_height) { /* pillar */
centre_horizontally(adjusted_mode, centre_horizontally(adjusted_mode,
scaled_height / scaled_height /
pipe_config->pipe_src_h); crtc_state->pipe_src_h);
*border = LVDS_BORDER_ENABLE; *border = LVDS_BORDER_ENABLE;
if (pipe_config->pipe_src_h != adjusted_mode->crtc_vdisplay) { if (crtc_state->pipe_src_h != adjusted_mode->crtc_vdisplay) {
bits = panel_fitter_scaling(pipe_config->pipe_src_h, bits = panel_fitter_scaling(crtc_state->pipe_src_h,
adjusted_mode->crtc_vdisplay); adjusted_mode->crtc_vdisplay);
*pfit_pgm_ratios |= (bits << PFIT_HORIZ_SCALE_SHIFT | *pfit_pgm_ratios |= (bits << PFIT_HORIZ_SCALE_SHIFT |
...@@ -354,11 +355,11 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, ...@@ -354,11 +355,11 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config,
} else if (scaled_width < scaled_height) { /* letter */ } else if (scaled_width < scaled_height) { /* letter */
centre_vertically(adjusted_mode, centre_vertically(adjusted_mode,
scaled_width / scaled_width /
pipe_config->pipe_src_w); crtc_state->pipe_src_w);
*border = LVDS_BORDER_ENABLE; *border = LVDS_BORDER_ENABLE;
if (pipe_config->pipe_src_w != adjusted_mode->crtc_hdisplay) { if (crtc_state->pipe_src_w != adjusted_mode->crtc_hdisplay) {
bits = panel_fitter_scaling(pipe_config->pipe_src_w, bits = panel_fitter_scaling(crtc_state->pipe_src_w,
adjusted_mode->crtc_hdisplay); adjusted_mode->crtc_hdisplay);
*pfit_pgm_ratios |= (bits << PFIT_HORIZ_SCALE_SHIFT | *pfit_pgm_ratios |= (bits << PFIT_HORIZ_SCALE_SHIFT |
...@@ -376,17 +377,17 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, ...@@ -376,17 +377,17 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config,
} }
} }
void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, void intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
struct intel_crtc_state *pipe_config,
int fitting_mode) int fitting_mode)
{ {
struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev); struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0;
struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
/* Native modes don't need fitting */ /* Native modes don't need fitting */
if (adjusted_mode->crtc_hdisplay == pipe_config->pipe_src_w && if (adjusted_mode->crtc_hdisplay == crtc_state->pipe_src_w &&
adjusted_mode->crtc_vdisplay == pipe_config->pipe_src_h) adjusted_mode->crtc_vdisplay == crtc_state->pipe_src_h)
goto out; goto out;
switch (fitting_mode) { switch (fitting_mode) {
...@@ -395,16 +396,16 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -395,16 +396,16 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
* For centered modes, we have to calculate border widths & * For centered modes, we have to calculate border widths &
* heights and modify the values programmed into the CRTC. * heights and modify the values programmed into the CRTC.
*/ */
centre_horizontally(adjusted_mode, pipe_config->pipe_src_w); centre_horizontally(adjusted_mode, crtc_state->pipe_src_w);
centre_vertically(adjusted_mode, pipe_config->pipe_src_h); centre_vertically(adjusted_mode, crtc_state->pipe_src_h);
border = LVDS_BORDER_ENABLE; border = LVDS_BORDER_ENABLE;
break; break;
case DRM_MODE_SCALE_ASPECT: case DRM_MODE_SCALE_ASPECT:
/* Scale but preserve the aspect ratio */ /* Scale but preserve the aspect ratio */
if (INTEL_GEN(dev_priv) >= 4) if (INTEL_GEN(dev_priv) >= 4)
i965_scale_aspect(pipe_config, &pfit_control); i965_scale_aspect(crtc_state, &pfit_control);
else else
i9xx_scale_aspect(pipe_config, &pfit_control, i9xx_scale_aspect(crtc_state, &pfit_control,
&pfit_pgm_ratios, &border); &pfit_pgm_ratios, &border);
break; break;
case DRM_MODE_SCALE_FULLSCREEN: case DRM_MODE_SCALE_FULLSCREEN:
...@@ -412,8 +413,8 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -412,8 +413,8 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
* Full scaling, even if it changes the aspect ratio. * Full scaling, even if it changes the aspect ratio.
* Fortunately this is all done for us in hw. * Fortunately this is all done for us in hw.
*/ */
if (pipe_config->pipe_src_h != adjusted_mode->crtc_vdisplay || if (crtc_state->pipe_src_h != adjusted_mode->crtc_vdisplay ||
pipe_config->pipe_src_w != adjusted_mode->crtc_hdisplay) { crtc_state->pipe_src_w != adjusted_mode->crtc_hdisplay) {
pfit_control |= PFIT_ENABLE; pfit_control |= PFIT_ENABLE;
if (INTEL_GEN(dev_priv) >= 4) if (INTEL_GEN(dev_priv) >= 4)
pfit_control |= PFIT_SCALING_AUTO; pfit_control |= PFIT_SCALING_AUTO;
...@@ -433,7 +434,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -433,7 +434,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
/* 965+ wants fuzzy fitting */ /* 965+ wants fuzzy fitting */
/* FIXME: handle multiple panels by failing gracefully */ /* FIXME: handle multiple panels by failing gracefully */
if (INTEL_GEN(dev_priv) >= 4) if (INTEL_GEN(dev_priv) >= 4)
pfit_control |= PFIT_PIPE(intel_crtc->pipe) | PFIT_FILTER_FUZZY; pfit_control |= PFIT_PIPE(crtc->pipe) | PFIT_FILTER_FUZZY;
out: out:
if ((pfit_control & PFIT_ENABLE) == 0) { if ((pfit_control & PFIT_ENABLE) == 0) {
...@@ -442,12 +443,12 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, ...@@ -442,12 +443,12 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
} }
/* Make sure pre-965 set dither correctly for 18bpp panels. */ /* Make sure pre-965 set dither correctly for 18bpp panels. */
if (INTEL_GEN(dev_priv) < 4 && pipe_config->pipe_bpp == 18) if (INTEL_GEN(dev_priv) < 4 && crtc_state->pipe_bpp == 18)
pfit_control |= PANEL_8TO6_DITHER_ENABLE; pfit_control |= PANEL_8TO6_DITHER_ENABLE;
pipe_config->gmch_pfit.control = pfit_control; crtc_state->gmch_pfit.control = pfit_control;
pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios; crtc_state->gmch_pfit.pgm_ratios = pfit_pgm_ratios;
pipe_config->gmch_pfit.lvds_border_bits = border; crtc_state->gmch_pfit.lvds_border_bits = border;
} }
/** /**
......
...@@ -25,11 +25,9 @@ int intel_panel_init(struct intel_panel *panel, ...@@ -25,11 +25,9 @@ int intel_panel_init(struct intel_panel *panel,
void intel_panel_fini(struct intel_panel *panel); void intel_panel_fini(struct intel_panel *panel);
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode, void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
struct drm_display_mode *adjusted_mode); struct drm_display_mode *adjusted_mode);
void intel_pch_panel_fitting(struct intel_crtc *crtc, void intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
struct intel_crtc_state *pipe_config,
int fitting_mode); int fitting_mode);
void intel_gmch_panel_fitting(struct intel_crtc *crtc, void intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
struct intel_crtc_state *pipe_config,
int fitting_mode); int fitting_mode);
void intel_panel_set_backlight_acpi(const struct drm_connector_state *conn_state, void intel_panel_set_backlight_acpi(const struct drm_connector_state *conn_state,
u32 level, u32 max); u32 level, u32 max);
......
...@@ -267,7 +267,6 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder, ...@@ -267,7 +267,6 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi, struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
base); base);
struct intel_connector *intel_connector = intel_dsi->attached_connector; struct intel_connector *intel_connector = intel_dsi->attached_connector;
struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
int ret; int ret;
...@@ -279,10 +278,10 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder, ...@@ -279,10 +278,10 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
intel_fixed_panel_mode(fixed_mode, adjusted_mode); intel_fixed_panel_mode(fixed_mode, adjusted_mode);
if (HAS_GMCH(dev_priv)) if (HAS_GMCH(dev_priv))
intel_gmch_panel_fitting(crtc, pipe_config, intel_gmch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
else else
intel_pch_panel_fitting(crtc, pipe_config, intel_pch_panel_fitting(pipe_config,
conn_state->scaling_mode); conn_state->scaling_mode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment