Commit 22629adc authored by Jani Nikula's avatar Jani Nikula

drm/rockchip: cdn-dp: get rid of drm_edid_raw()

The dimensions are available in display info, so there's no need for raw
EDID access. While at it, move the debug logging to where the EDID is
actually read.
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/d0807fbde7b0bd06ebfcb5df5c3b1cdad4c4ef84.1715691257.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent fde7679a
...@@ -266,15 +266,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector) ...@@ -266,15 +266,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
mutex_lock(&dp->lock); mutex_lock(&dp->lock);
if (dp->drm_edid) {
/* FIXME: get rid of drm_edid_raw() */
const struct edid *edid = drm_edid_raw(dp->drm_edid);
DRM_DEV_DEBUG_KMS(dp->dev, "got edid: width[%d] x height[%d]\n",
edid->width_cm, edid->height_cm);
}
ret = drm_edid_connector_add_modes(connector); ret = drm_edid_connector_add_modes(connector);
mutex_unlock(&dp->lock); mutex_unlock(&dp->lock);
...@@ -369,6 +360,7 @@ static int cdn_dp_firmware_init(struct cdn_dp_device *dp) ...@@ -369,6 +360,7 @@ static int cdn_dp_firmware_init(struct cdn_dp_device *dp)
static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp) static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
{ {
const struct drm_display_info *info = &dp->connector.display_info;
int ret; int ret;
if (!cdn_dp_check_sink_connection(dp)) if (!cdn_dp_check_sink_connection(dp))
...@@ -386,7 +378,11 @@ static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp) ...@@ -386,7 +378,11 @@ static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
cdn_dp_get_edid_block, dp); cdn_dp_get_edid_block, dp);
drm_edid_connector_update(&dp->connector, dp->drm_edid); drm_edid_connector_update(&dp->connector, dp->drm_edid);
dp->sink_has_audio = dp->connector.display_info.has_audio; dp->sink_has_audio = info->has_audio;
if (dp->drm_edid)
DRM_DEV_DEBUG_KMS(dp->dev, "got edid: width[%d] x height[%d]\n",
info->width_mm / 10, info->height_mm / 10);
return 0; return 0;
} }
......
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