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

drm/i915: Introduce intel_panel_init_alloc()

Introduce a place where we can initialize connector->panel
after it's been allocated. We already have a intel_panel_init()
so had to get creative with the name and came up with
intel_panel_init_alloc().

Cc: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-2-ville.syrjala@linux.intel.com
parent af933978
...@@ -54,7 +54,7 @@ int intel_connector_init(struct intel_connector *connector) ...@@ -54,7 +54,7 @@ int intel_connector_init(struct intel_connector *connector)
__drm_atomic_helper_connector_reset(&connector->base, __drm_atomic_helper_connector_reset(&connector->base,
&conn_state->base); &conn_state->base);
INIT_LIST_HEAD(&connector->panel.fixed_modes); intel_panel_init_alloc(connector);
return 0; return 0;
} }
......
...@@ -661,6 +661,13 @@ intel_panel_mode_valid(struct intel_connector *connector, ...@@ -661,6 +661,13 @@ intel_panel_mode_valid(struct intel_connector *connector,
return MODE_OK; return MODE_OK;
} }
void intel_panel_init_alloc(struct intel_connector *connector)
{
struct intel_panel *panel = &connector->panel;
INIT_LIST_HEAD(&panel->fixed_modes);
}
int intel_panel_init(struct intel_connector *connector) int intel_panel_init(struct intel_connector *connector)
{ {
struct intel_panel *panel = &connector->panel; struct intel_panel *panel = &connector->panel;
......
...@@ -18,6 +18,7 @@ struct intel_connector; ...@@ -18,6 +18,7 @@ struct intel_connector;
struct intel_crtc_state; struct intel_crtc_state;
struct intel_encoder; struct intel_encoder;
void intel_panel_init_alloc(struct intel_connector *connector);
int intel_panel_init(struct intel_connector *connector); int intel_panel_init(struct intel_connector *connector);
void intel_panel_fini(struct intel_connector *connector); void intel_panel_fini(struct intel_connector *connector);
enum drm_connector_status enum drm_connector_status
......
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