]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
Merge tag 'gfs2-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
[linux.git] / drivers / gpu / drm / amd / display / amdgpu_dm / amdgpu_dm_helpers.c
index ee1dc75f5ddc39ee7128013ffd23d47b286c3c63..11e5784aa62a15cc2d66b0270c9d7dda99e2e2a8 100644 (file)
@@ -97,11 +97,10 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
                        (struct edid *) edid->raw_edid);
 
        sad_count = drm_edid_to_sad((struct edid *) edid->raw_edid, &sads);
-       if (sad_count <= 0) {
-               DRM_INFO("SADs count is: %d, don't need to read it\n",
-                               sad_count);
+       if (sad_count < 0)
+               DRM_ERROR("Couldn't read SADs: %d\n", sad_count);
+       if (sad_count <= 0)
                return result;
-       }
 
        edid_caps->audio_mode_count = sad_count < DC_MAX_AUDIO_DESC_COUNT ? sad_count : DC_MAX_AUDIO_DESC_COUNT;
        for (i = 0; i < edid_caps->audio_mode_count; ++i) {
@@ -282,7 +281,7 @@ void dm_helpers_dp_mst_clear_payload_allocation_table(
  * Polls for ACT (allocation change trigger) handled and sends
  * ALLOCATE_PAYLOAD message.
  */
-bool dm_helpers_dp_mst_poll_for_allocation_change_trigger(
+enum act_return_status dm_helpers_dp_mst_poll_for_allocation_change_trigger(
                struct dc_context *ctx,
                const struct dc_stream_state *stream)
 {
@@ -293,19 +292,19 @@ bool dm_helpers_dp_mst_poll_for_allocation_change_trigger(
        aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
 
        if (!aconnector || !aconnector->mst_port)
-               return false;
+               return ACT_FAILED;
 
        mst_mgr = &aconnector->mst_port->mst_mgr;
 
        if (!mst_mgr->mst_state)
-               return false;
+               return ACT_FAILED;
 
        ret = drm_dp_check_act_status(mst_mgr);
 
        if (ret)
-               return false;
+               return ACT_FAILED;
 
-       return true;
+       return ACT_SUCCESS;
 }
 
 bool dm_helpers_dp_mst_send_payload_allocation(