drm/i915: Introduce intel_panel_init_alloc()
authorjsg <jsg@openbsd.org>
Tue, 28 Mar 2023 00:19:53 +0000 (00:19 +0000)
committerjsg <jsg@openbsd.org>
Tue, 28 Mar 2023 00:19:53 +0000 (00:19 +0000)
From Ville Syrjala
e340197a453987c48cdeeeb6447d0944513de538 in linux-6.1.y/6.1.20
f70f8153e3642337b444fbc0c64d546a46bbcd62 in mainline linux

sys/dev/pci/drm/i915/display/intel_connector.c
sys/dev/pci/drm/i915/display/intel_panel.c
sys/dev/pci/drm/i915/display/intel_panel.h

index 6d5cbeb..8bb296f 100644 (file)
@@ -54,7 +54,7 @@ int intel_connector_init(struct intel_connector *connector)
        __drm_atomic_helper_connector_reset(&connector->base,
                                            &conn_state->base);
 
-       INIT_LIST_HEAD(&connector->panel.fixed_modes);
+       intel_panel_init_alloc(connector);
 
        return 0;
 }
index f72f464..8bd7af9 100644 (file)
@@ -648,6 +648,13 @@ intel_panel_mode_valid(struct intel_connector *connector,
        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)
 {
        struct intel_panel *panel = &connector->panel;
index 5c5b5b7..4b51e1c 100644 (file)
@@ -18,6 +18,7 @@ struct intel_connector;
 struct intel_crtc_state;
 struct intel_encoder;
 
+void intel_panel_init_alloc(struct intel_connector *connector);
 int intel_panel_init(struct intel_connector *connector);
 void intel_panel_fini(struct intel_connector *connector);
 enum drm_connector_status