drm/i915: Pass intel_connector to intel_panel_{init,fini}()
All the other intel_panel functions take struct intel_connector, so might as well make init()/fini() take one as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
d13dde4495
commit
5d2fd49db9
|
@ -2057,7 +2057,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
|
|||
goto err;
|
||||
}
|
||||
|
||||
intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
|
||||
intel_panel_init(intel_connector, fixed_mode, NULL);
|
||||
intel_backlight_setup(intel_connector, INVALID_PIPE);
|
||||
|
||||
if (dev_priv->vbt.dsi.config->dual_link)
|
||||
|
|
|
@ -102,7 +102,7 @@ void intel_connector_destroy(struct drm_connector *connector)
|
|||
if (!IS_ERR_OR_NULL(intel_connector->edid))
|
||||
kfree(intel_connector->edid);
|
||||
|
||||
intel_panel_fini(&intel_connector->panel);
|
||||
intel_panel_fini(intel_connector);
|
||||
|
||||
drm_connector_cleanup(connector);
|
||||
|
||||
|
|
|
@ -5053,7 +5053,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
|
|||
pipe_name(pipe));
|
||||
}
|
||||
|
||||
intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
|
||||
intel_panel_init(intel_connector, fixed_mode, downclock_mode);
|
||||
if (!(dev_priv->quirks & QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK))
|
||||
intel_connector->panel.backlight.power = intel_pps_backlight_power;
|
||||
intel_backlight_setup(intel_connector, pipe);
|
||||
|
|
|
@ -549,7 +549,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
|
|||
* headers, likely), so for now, just get the current
|
||||
* mode being output through DVO.
|
||||
*/
|
||||
intel_panel_init(&intel_connector->panel,
|
||||
intel_panel_init(intel_connector,
|
||||
intel_dvo_get_current_mode(intel_encoder),
|
||||
NULL);
|
||||
intel_dvo->panel_wants_dither = true;
|
||||
|
|
|
@ -996,7 +996,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
|
|||
out:
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
|
||||
intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
|
||||
intel_panel_init(intel_connector, fixed_mode, downclock_mode);
|
||||
intel_backlight_setup(intel_connector, INVALID_PIPE);
|
||||
|
||||
lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder, fixed_mode);
|
||||
|
|
|
@ -599,10 +599,12 @@ intel_panel_mode_valid(struct intel_connector *connector,
|
|||
return MODE_OK;
|
||||
}
|
||||
|
||||
int intel_panel_init(struct intel_panel *panel,
|
||||
int intel_panel_init(struct intel_connector *connector,
|
||||
struct drm_display_mode *fixed_mode,
|
||||
struct drm_display_mode *downclock_mode)
|
||||
{
|
||||
struct intel_panel *panel = &connector->panel;
|
||||
|
||||
intel_backlight_init_funcs(panel);
|
||||
|
||||
if (fixed_mode)
|
||||
|
@ -613,16 +615,15 @@ int intel_panel_init(struct intel_panel *panel,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void intel_panel_fini(struct intel_panel *panel)
|
||||
void intel_panel_fini(struct intel_connector *connector)
|
||||
{
|
||||
struct intel_connector *intel_connector =
|
||||
container_of(panel, struct intel_connector, panel);
|
||||
struct intel_panel *panel = &connector->panel;
|
||||
struct drm_display_mode *fixed_mode, *next;
|
||||
|
||||
intel_backlight_destroy(panel);
|
||||
|
||||
list_for_each_entry_safe(fixed_mode, next, &panel->fixed_modes, head) {
|
||||
list_del(&fixed_mode->head);
|
||||
drm_mode_destroy(intel_connector->base.dev, fixed_mode);
|
||||
drm_mode_destroy(connector->base.dev, fixed_mode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,12 +16,11 @@ struct drm_display_mode;
|
|||
struct drm_i915_private;
|
||||
struct intel_connector;
|
||||
struct intel_crtc_state;
|
||||
struct intel_panel;
|
||||
|
||||
int intel_panel_init(struct intel_panel *panel,
|
||||
int intel_panel_init(struct intel_connector *connector,
|
||||
struct drm_display_mode *fixed_mode,
|
||||
struct drm_display_mode *downclock_mode);
|
||||
void intel_panel_fini(struct intel_panel *panel);
|
||||
void intel_panel_fini(struct intel_connector *connector);
|
||||
enum drm_connector_status
|
||||
intel_panel_detect(struct drm_connector *connector, bool force);
|
||||
bool intel_panel_use_ssc(struct drm_i915_private *i915);
|
||||
|
|
|
@ -2928,7 +2928,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
|
|||
struct drm_display_mode *fixed_mode =
|
||||
drm_mode_duplicate(connector->dev, mode);
|
||||
|
||||
intel_panel_init(&intel_connector->panel,
|
||||
intel_panel_init(intel_connector,
|
||||
fixed_mode, NULL);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1987,7 +1987,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
|
|||
goto err_cleanup_connector;
|
||||
}
|
||||
|
||||
intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
|
||||
intel_panel_init(intel_connector, fixed_mode, NULL);
|
||||
intel_backlight_setup(intel_connector, INVALID_PIPE);
|
||||
|
||||
vlv_dsi_add_properties(intel_connector, fixed_mode);
|
||||
|
|
Loading…
Reference in New Issue