Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/panel: register drm_panel and call prepare/unprepare for eDP

Allocate and register drm_panel to allow the panel_follower framework to
detect the eDP panel and pass drm_connector::kdev device to drm_panel
allocation for matching.
Call drm_panel_prepare/unprepare in ddi_enable for eDP to allow the
followers to get notified of the panel power state changes.

Note: This is for eDP with DDI platforms only.

v2: remove backlight setup from panel_register (Jani)
v3: Updated the commit message (Jani)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250624-edp_panel-v3-1-e8197b6d9fde@intel.com

authored by

Arun R Murthy and committed by
Suraj Kandpal
41de3cec c9c32507

+6 -1
+4
drivers/gpu/drm/i915/display/intel_ddi.c
··· 73 73 #include "intel_lspcon.h" 74 74 #include "intel_mg_phy_regs.h" 75 75 #include "intel_modeset_lock.h" 76 + #include "intel_panel.h" 76 77 #include "intel_pfit.h" 77 78 #include "intel_pps.h" 78 79 #include "intel_psr.h" ··· 3356 3355 drm_connector_update_privacy_screen(conn_state); 3357 3356 intel_edp_backlight_on(crtc_state, conn_state); 3358 3357 3358 + intel_panel_prepare(crtc_state, conn_state); 3359 + 3359 3360 if (!intel_lspcon_active(dig_port) || intel_dp_has_hdmi_sink(&dig_port->dp)) 3360 3361 intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); 3361 3362 ··· 3555 3552 3556 3553 intel_dp->link.active = false; 3557 3554 3555 + intel_panel_unprepare(old_conn_state); 3558 3556 intel_psr_disable(intel_dp, old_crtc_state); 3559 3557 intel_alpm_disable(intel_dp); 3560 3558 intel_edp_backlight_off(old_conn_state);
+2 -1
drivers/gpu/drm/i915/display/intel_panel.c
··· 515 515 if (ret) 516 516 return ret; 517 517 518 - if (connector->base.connector_type == DRM_MODE_CONNECTOR_DSI) { 518 + if (connector->base.connector_type == DRM_MODE_CONNECTOR_DSI || 519 + connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) { 519 520 struct device *dev = connector->base.kdev; 520 521 struct drm_panel *base; 521 522