Commit a2f9790d authored by Jani Nikula's avatar Jani Nikula

drm/edid: propagate drm_edid to drm_edid_to_eld()

We'll need to propagate drm_edid everywhere.

v3: Rebase
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511092349.4186498-1-jani.nikula@intel.com
parent e42192b4
...@@ -4883,13 +4883,13 @@ static void clear_eld(struct drm_connector *connector) ...@@ -4883,13 +4883,13 @@ static void clear_eld(struct drm_connector *connector)
/* /*
* drm_edid_to_eld - build ELD from EDID * drm_edid_to_eld - build ELD from EDID
* @connector: connector corresponding to the HDMI/DP sink * @connector: connector corresponding to the HDMI/DP sink
* @edid: EDID to parse * @drm_edid: EDID to parse
* *
* Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The
* HDCP and Port_ID ELD fields are left for the graphics driver to fill in. * HDCP and Port_ID ELD fields are left for the graphics driver to fill in.
*/ */
static void drm_edid_to_eld(struct drm_connector *connector, static void drm_edid_to_eld(struct drm_connector *connector,
const struct edid *edid) const struct drm_edid *drm_edid)
{ {
const struct drm_display_info *info = &connector->display_info; const struct drm_display_info *info = &connector->display_info;
const struct cea_db *db; const struct cea_db *db;
...@@ -4900,10 +4900,10 @@ static void drm_edid_to_eld(struct drm_connector *connector, ...@@ -4900,10 +4900,10 @@ static void drm_edid_to_eld(struct drm_connector *connector,
clear_eld(connector); clear_eld(connector);
if (!edid) if (!drm_edid)
return; return;
mnl = get_monitor_name(edid, &eld[DRM_ELD_MONITOR_NAME_STRING]); mnl = get_monitor_name(drm_edid->edid, &eld[DRM_ELD_MONITOR_NAME_STRING]);
DRM_DEBUG_KMS("ELD monitor %s\n", &eld[DRM_ELD_MONITOR_NAME_STRING]); DRM_DEBUG_KMS("ELD monitor %s\n", &eld[DRM_ELD_MONITOR_NAME_STRING]);
eld[DRM_ELD_CEA_EDID_VER_MNL] = info->cea_rev << DRM_ELD_CEA_EDID_VER_SHIFT; eld[DRM_ELD_CEA_EDID_VER_MNL] = info->cea_rev << DRM_ELD_CEA_EDID_VER_SHIFT;
...@@ -4911,12 +4911,12 @@ static void drm_edid_to_eld(struct drm_connector *connector, ...@@ -4911,12 +4911,12 @@ static void drm_edid_to_eld(struct drm_connector *connector,
eld[DRM_ELD_VER] = DRM_ELD_VER_CEA861D; eld[DRM_ELD_VER] = DRM_ELD_VER_CEA861D;
eld[DRM_ELD_MANUFACTURER_NAME0] = edid->mfg_id[0]; eld[DRM_ELD_MANUFACTURER_NAME0] = drm_edid->edid->mfg_id[0];
eld[DRM_ELD_MANUFACTURER_NAME1] = edid->mfg_id[1]; eld[DRM_ELD_MANUFACTURER_NAME1] = drm_edid->edid->mfg_id[1];
eld[DRM_ELD_PRODUCT_CODE0] = edid->prod_code[0]; eld[DRM_ELD_PRODUCT_CODE0] = drm_edid->edid->prod_code[0];
eld[DRM_ELD_PRODUCT_CODE1] = edid->prod_code[1]; eld[DRM_ELD_PRODUCT_CODE1] = drm_edid->edid->prod_code[1];
cea_db_iter_edid_begin(edid, &iter); cea_db_iter_edid_begin(drm_edid->edid, &iter);
cea_db_iter_for_each(db, &iter) { cea_db_iter_for_each(db, &iter) {
const u8 *data = cea_db_data(db); const u8 *data = cea_db_data(db);
int len = cea_db_payload_len(db); int len = cea_db_payload_len(db);
...@@ -5864,7 +5864,7 @@ static int drm_edid_connector_update(struct drm_connector *connector, ...@@ -5864,7 +5864,7 @@ static int drm_edid_connector_update(struct drm_connector *connector,
quirks = update_display_info(connector, drm_edid); quirks = update_display_info(connector, drm_edid);
/* Depends on info->cea_rev set by update_display_info() above */ /* Depends on info->cea_rev set by update_display_info() above */
drm_edid_to_eld(connector, edid); drm_edid_to_eld(connector, drm_edid);
/* /*
* EDID spec says modes should be preferred in this order: * EDID spec says modes should be preferred in this order:
......
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