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

drm/i915/dsi: Pass fixed_mode to *_dsi_add_properties()

We want to eventually get rid of the connector->panel.fixed_mode
pointer so avoid using it during DSI property setup. Since this
all happens during the encoder init we already have the fixed_mode
around, just pass that in.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311172428.14685-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 776c6c83
...@@ -1965,7 +1965,8 @@ static void icl_dphy_param_init(struct intel_dsi *intel_dsi) ...@@ -1965,7 +1965,8 @@ static void icl_dphy_param_init(struct intel_dsi *intel_dsi)
intel_dsi_log_params(intel_dsi); intel_dsi_log_params(intel_dsi);
} }
static void icl_dsi_add_properties(struct intel_connector *connector) static void icl_dsi_add_properties(struct intel_connector *connector,
const struct drm_display_mode *fixed_mode)
{ {
u32 allowed_scalers; u32 allowed_scalers;
...@@ -1979,9 +1980,9 @@ static void icl_dsi_add_properties(struct intel_connector *connector) ...@@ -1979,9 +1980,9 @@ static void icl_dsi_add_properties(struct intel_connector *connector)
connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT; connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
drm_connector_set_panel_orientation_with_quirk(&connector->base, drm_connector_set_panel_orientation_with_quirk(&connector->base,
intel_dsi_get_panel_orientation(connector), intel_dsi_get_panel_orientation(connector),
connector->panel.fixed_mode->hdisplay, fixed_mode->hdisplay,
connector->panel.fixed_mode->vdisplay); fixed_mode->vdisplay);
} }
void icl_dsi_init(struct drm_i915_private *dev_priv) void icl_dsi_init(struct drm_i915_private *dev_priv)
...@@ -2084,7 +2085,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) ...@@ -2084,7 +2085,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
icl_dphy_param_init(intel_dsi); icl_dphy_param_init(intel_dsi);
icl_dsi_add_properties(intel_connector); icl_dsi_add_properties(intel_connector, fixed_mode);
return; return;
err: err:
......
...@@ -1657,7 +1657,8 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = { ...@@ -1657,7 +1657,8 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = {
.atomic_duplicate_state = intel_digital_connector_duplicate_state, .atomic_duplicate_state = intel_digital_connector_duplicate_state,
}; };
static void vlv_dsi_add_properties(struct intel_connector *connector) static void vlv_dsi_add_properties(struct intel_connector *connector,
const struct drm_display_mode *fixed_mode)
{ {
struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
u32 allowed_scalers; u32 allowed_scalers;
...@@ -1673,8 +1674,8 @@ static void vlv_dsi_add_properties(struct intel_connector *connector) ...@@ -1673,8 +1674,8 @@ static void vlv_dsi_add_properties(struct intel_connector *connector)
drm_connector_set_panel_orientation_with_quirk(&connector->base, drm_connector_set_panel_orientation_with_quirk(&connector->base,
intel_dsi_get_panel_orientation(connector), intel_dsi_get_panel_orientation(connector),
connector->panel.fixed_mode->hdisplay, fixed_mode->hdisplay,
connector->panel.fixed_mode->vdisplay); fixed_mode->vdisplay);
} }
#define NS_KHZ_RATIO 1000000 #define NS_KHZ_RATIO 1000000
...@@ -1989,7 +1990,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) ...@@ -1989,7 +1990,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
intel_panel_init(&intel_connector->panel, fixed_mode, NULL); intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
intel_backlight_setup(intel_connector, INVALID_PIPE); intel_backlight_setup(intel_connector, INVALID_PIPE);
vlv_dsi_add_properties(intel_connector); vlv_dsi_add_properties(intel_connector, fixed_mode);
return; return;
......
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