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)
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);
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);
* 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;
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);
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)
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);
}
}
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);
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;
}
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);