summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-01-23 21:37:36 +0200
committerJani Nikula <jani.nikula@intel.com>2024-02-09 10:15:59 +0200
commit13a9e2beb817e17e44e61dceba347adfbc4f5bfa (patch)
tree6ecf26378382fc9afedcbd6e3f8124e28d4dedfa /drivers/gpu/drm/omapdrm/dss
parent18701c50d6610ca4be5dece93b128ca30c4550c8 (diff)
drm/omap/hdmi4: switch to ->edid_read callback
Prefer using the struct drm_edid based callback and functions. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/4c9b24a399e8f305698f8fe5ebd687bfd6ce2e59.1706038510.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index a26b77d99d52..9b8747d83ee8 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -436,11 +436,11 @@ static void hdmi4_bridge_hpd_notify(struct drm_bridge *bridge,
hdmi4_cec_set_phys_addr(&hdmi->core, CEC_PHYS_ADDR_INVALID);
}
-static struct edid *hdmi4_bridge_get_edid(struct drm_bridge *bridge,
- struct drm_connector *connector)
+static const struct drm_edid *hdmi4_bridge_edid_read(struct drm_bridge *bridge,
+ struct drm_connector *connector)
{
struct omap_hdmi *hdmi = drm_bridge_to_hdmi(bridge);
- struct edid *edid = NULL;
+ const struct drm_edid *drm_edid = NULL;
unsigned int cec_addr;
bool need_enable;
int r;
@@ -461,13 +461,21 @@ static struct edid *hdmi4_bridge_get_edid(struct drm_bridge *bridge,
if (r)
goto done;
- edid = drm_do_get_edid(connector, hdmi4_core_ddc_read, &hdmi->core);
+ drm_edid = drm_edid_read_custom(connector, hdmi4_core_ddc_read, &hdmi->core);
done:
hdmi_runtime_put(hdmi);
mutex_unlock(&hdmi->lock);
- if (edid && edid->extensions) {
+ if (drm_edid) {
+ /*
+ * FIXME: The CEC physical address should be set using
+ * hdmi4_cec_set_phys_addr(&hdmi->core,
+ * connector->display_info.source_physical_address) from a path
+ * that has read the EDID and called
+ * drm_edid_connector_update().
+ */
+ const struct edid *edid = drm_edid_raw(drm_edid);
unsigned int len = (edid->extensions + 1) * EDID_LENGTH;
cec_addr = cec_get_edid_phys_addr((u8 *)edid, len, NULL);
@@ -480,7 +488,7 @@ done:
if (need_enable)
hdmi4_core_disable(&hdmi->core);
- return edid;
+ return drm_edid;
}
static const struct drm_bridge_funcs hdmi4_bridge_funcs = {
@@ -492,7 +500,7 @@ static const struct drm_bridge_funcs hdmi4_bridge_funcs = {
.atomic_enable = hdmi4_bridge_enable,
.atomic_disable = hdmi4_bridge_disable,
.hpd_notify = hdmi4_bridge_hpd_notify,
- .get_edid = hdmi4_bridge_get_edid,
+ .edid_read = hdmi4_bridge_edid_read,
};
static void hdmi4_bridge_init(struct omap_hdmi *hdmi)