Commit 9ed8ba5a authored by Jani Nikula's avatar Jani Nikula

drm/bridge: it6505: switch to ->edid_read callback

Prefer using the struct drm_edid based callback and functions.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/5d2579802e277cc562bde6c4e26a5b63ff0e02ae.1706038510.git.jani.nikula@intel.com
parent 183ea1e1
...@@ -458,7 +458,7 @@ struct it6505 { ...@@ -458,7 +458,7 @@ struct it6505 {
/* it6505 driver hold option */ /* it6505 driver hold option */
bool enable_drv_hold; bool enable_drv_hold;
struct edid *cached_edid; const struct drm_edid *cached_edid;
}; };
struct it6505_step_train_para { struct it6505_step_train_para {
...@@ -2263,7 +2263,7 @@ static void it6505_plugged_status_to_codec(struct it6505 *it6505) ...@@ -2263,7 +2263,7 @@ static void it6505_plugged_status_to_codec(struct it6505 *it6505)
static void it6505_remove_edid(struct it6505 *it6505) static void it6505_remove_edid(struct it6505 *it6505)
{ {
kfree(it6505->cached_edid); drm_edid_free(it6505->cached_edid);
it6505->cached_edid = NULL; it6505->cached_edid = NULL;
} }
...@@ -3034,15 +3034,16 @@ it6505_bridge_detect(struct drm_bridge *bridge) ...@@ -3034,15 +3034,16 @@ it6505_bridge_detect(struct drm_bridge *bridge)
return it6505_detect(it6505); return it6505_detect(it6505);
} }
static struct edid *it6505_bridge_get_edid(struct drm_bridge *bridge, static const struct drm_edid *it6505_bridge_edid_read(struct drm_bridge *bridge,
struct drm_connector *connector) struct drm_connector *connector)
{ {
struct it6505 *it6505 = bridge_to_it6505(bridge); struct it6505 *it6505 = bridge_to_it6505(bridge);
struct device *dev = it6505->dev; struct device *dev = it6505->dev;
if (!it6505->cached_edid) { if (!it6505->cached_edid) {
it6505->cached_edid = drm_do_get_edid(connector, it6505_get_edid_block, it6505->cached_edid = drm_edid_read_custom(connector,
it6505); it6505_get_edid_block,
it6505);
if (!it6505->cached_edid) { if (!it6505->cached_edid) {
DRM_DEV_DEBUG_DRIVER(dev, "failed to get edid!"); DRM_DEV_DEBUG_DRIVER(dev, "failed to get edid!");
...@@ -3050,7 +3051,7 @@ static struct edid *it6505_bridge_get_edid(struct drm_bridge *bridge, ...@@ -3050,7 +3051,7 @@ static struct edid *it6505_bridge_get_edid(struct drm_bridge *bridge,
} }
} }
return drm_edid_duplicate(it6505->cached_edid); return drm_edid_dup(it6505->cached_edid);
} }
static const struct drm_bridge_funcs it6505_bridge_funcs = { static const struct drm_bridge_funcs it6505_bridge_funcs = {
...@@ -3065,7 +3066,7 @@ static const struct drm_bridge_funcs it6505_bridge_funcs = { ...@@ -3065,7 +3066,7 @@ static const struct drm_bridge_funcs it6505_bridge_funcs = {
.atomic_pre_enable = it6505_bridge_atomic_pre_enable, .atomic_pre_enable = it6505_bridge_atomic_pre_enable,
.atomic_post_disable = it6505_bridge_atomic_post_disable, .atomic_post_disable = it6505_bridge_atomic_post_disable,
.detect = it6505_bridge_detect, .detect = it6505_bridge_detect,
.get_edid = it6505_bridge_get_edid, .edid_read = it6505_bridge_edid_read,
}; };
static __maybe_unused int it6505_bridge_resume(struct device *dev) static __maybe_unused int it6505_bridge_resume(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