drm/edid: clean up connector update error handling and debug logging

Bail out on all errors, debug log all errors, and convert to drm device
based debug logging.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/de4270b3d2e61fe42b9248490376594d472d19aa.1656494768.git.jani.nikula@intel.com
This commit is contained in:
Jani Nikula 2022-06-29 12:27:48 +03:00
parent a819451eda
commit f999b37eef

View File

@ -6231,29 +6231,44 @@ static int _drm_connector_update_edid_property(struct drm_connector *connector,
if (old_edid) { if (old_edid) {
if (!drm_edid_are_equal(drm_edid ? drm_edid->edid : NULL, old_edid)) { if (!drm_edid_are_equal(drm_edid ? drm_edid->edid : NULL, old_edid)) {
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Edid was changed.\n", connector->epoch_counter++;
connector->base.id, connector->name); drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID changed, epoch counter %llu\n",
connector->base.id, connector->name,
connector->epoch_counter += 1; connector->epoch_counter);
DRM_DEBUG_KMS("Updating change counter to %llu\n",
connector->epoch_counter);
} }
} }
} }
drm_object_property_set_value(&connector->base,
dev->mode_config.non_desktop_property,
connector->display_info.non_desktop);
ret = drm_property_replace_global_blob(dev, ret = drm_property_replace_global_blob(dev,
&connector->edid_blob_ptr, &connector->edid_blob_ptr,
drm_edid ? drm_edid->size : 0, drm_edid ? drm_edid->size : 0,
drm_edid ? drm_edid->edid : NULL, drm_edid ? drm_edid->edid : NULL,
&connector->base, &connector->base,
dev->mode_config.edid_property); dev->mode_config.edid_property);
if (ret) if (ret) {
return ret; drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID property update failed (%d)\n",
return drm_connector_set_tile_property(connector); connector->base.id, connector->name, ret);
goto out;
}
ret = drm_object_property_set_value(&connector->base,
dev->mode_config.non_desktop_property,
connector->display_info.non_desktop);
if (ret) {
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Non-desktop property update failed (%d)\n",
connector->base.id, connector->name, ret);
goto out;
}
ret = drm_connector_set_tile_property(connector);
if (ret) {
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Tile property update failed (%d)\n",
connector->base.id, connector->name, ret);
goto out;
}
out:
return ret;
} }
/** /**