Commit 7e7dc3a9 authored by Jani Nikula's avatar Jani Nikula

drm/panel-edp: switch to struct drm_edid

Prefer struct drm_edid based functions over struct edid.
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/a68ee923449a70cc7a59d0d3c96b0bb6764296bd.1713273659.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent a9c428f1
...@@ -242,7 +242,7 @@ struct panel_edp { ...@@ -242,7 +242,7 @@ struct panel_edp {
const struct edp_panel_entry *detected_panel; const struct edp_panel_entry *detected_panel;
struct edid *edid; const struct drm_edid *drm_edid;
struct drm_display_mode override_mode; struct drm_display_mode override_mode;
...@@ -617,13 +617,16 @@ static int panel_edp_get_modes(struct drm_panel *panel, ...@@ -617,13 +617,16 @@ static int panel_edp_get_modes(struct drm_panel *panel,
if (p->ddc) { if (p->ddc) {
pm_runtime_get_sync(panel->dev); pm_runtime_get_sync(panel->dev);
if (!p->edid) if (!p->drm_edid)
p->edid = drm_get_edid(connector, p->ddc); p->drm_edid = drm_edid_read_ddc(connector, p->ddc);
drm_edid_connector_update(connector, p->drm_edid);
/* /*
* If both edid and hard-coded modes exists, skip edid modes to * If both edid and hard-coded modes exists, skip edid modes to
* avoid multiple preferred modes. * avoid multiple preferred modes.
*/ */
if (p->edid && !has_hard_coded_modes) { if (p->drm_edid && !has_hard_coded_modes) {
if (has_override_edid_mode) { if (has_override_edid_mode) {
/* /*
* override_edid_mode is specified. Use * override_edid_mode is specified. Use
...@@ -632,7 +635,7 @@ static int panel_edp_get_modes(struct drm_panel *panel, ...@@ -632,7 +635,7 @@ static int panel_edp_get_modes(struct drm_panel *panel,
num += panel_edp_override_edid_mode(p, connector, num += panel_edp_override_edid_mode(p, connector,
p->detected_panel->override_edid_mode); p->detected_panel->override_edid_mode);
} else { } else {
num += drm_add_edid_modes(connector, p->edid); num += drm_edid_connector_add_modes(connector);
} }
} }
...@@ -981,8 +984,8 @@ static void panel_edp_remove(struct device *dev) ...@@ -981,8 +984,8 @@ static void panel_edp_remove(struct device *dev)
if (panel->ddc && (!panel->aux || panel->ddc != &panel->aux->ddc)) if (panel->ddc && (!panel->aux || panel->ddc != &panel->aux->ddc))
put_device(&panel->ddc->dev); put_device(&panel->ddc->dev);
kfree(panel->edid); drm_edid_free(panel->drm_edid);
panel->edid = NULL; panel->drm_edid = NULL;
} }
static void panel_edp_shutdown(struct device *dev) static void panel_edp_shutdown(struct device *dev)
......
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