mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 01:52:32 -04:00
drm/amd/display: Add tracepoint for amdgpu_dm
Debug amdgpu_dm could be a complicated task, therefore, this commit adds tracepoints in some convenient functions such as plane and connector check inside amdgpu_dm. Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
21c4144582
commit
e8a982355f
@@ -5505,6 +5505,8 @@ amdgpu_dm_connector_atomic_check(struct drm_connector *conn,
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
int ret;
|
||||
|
||||
trace_amdgpu_dm_connector_atomic_check(new_con_state);
|
||||
|
||||
if (!crtc)
|
||||
return 0;
|
||||
|
||||
@@ -5610,6 +5612,8 @@ static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
|
||||
struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(state);
|
||||
int ret = -EINVAL;
|
||||
|
||||
trace_amdgpu_dm_crtc_atomic_check(state);
|
||||
|
||||
dm_update_crtc_active_planes(crtc, state);
|
||||
|
||||
if (unlikely(!dm_crtc_state->stream &&
|
||||
@@ -5985,6 +5989,8 @@ static int dm_plane_atomic_check(struct drm_plane *plane,
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
int ret;
|
||||
|
||||
trace_amdgpu_dm_plane_atomic_check(state);
|
||||
|
||||
dm_plane_state = to_dm_plane_state(state);
|
||||
|
||||
if (!dm_plane_state->dc_state)
|
||||
@@ -6025,6 +6031,8 @@ static void dm_plane_atomic_async_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state =
|
||||
drm_atomic_get_old_plane_state(new_state->state, plane);
|
||||
|
||||
trace_amdgpu_dm_atomic_update_cursor(new_state);
|
||||
|
||||
swap(plane->state->fb, new_state->fb);
|
||||
|
||||
plane->state->src_x = new_state->src_x;
|
||||
@@ -7588,6 +7596,8 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
|
||||
int crtc_disable_count = 0;
|
||||
bool mode_set_reset_required = false;
|
||||
|
||||
trace_amdgpu_dm_atomic_commit_tail_begin(state);
|
||||
|
||||
drm_atomic_helper_update_legacy_modeset_state(dev, state);
|
||||
|
||||
dm_state = dm_atomic_get_new_state(state);
|
||||
@@ -8674,6 +8684,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
int ret, i;
|
||||
bool lock_and_validation_needed = false;
|
||||
|
||||
trace_amdgpu_dm_atomic_check_begin(state);
|
||||
|
||||
ret = drm_atomic_helper_check_modeset(dev, state);
|
||||
if (ret)
|
||||
goto fail;
|
||||
@@ -8970,6 +8982,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
|
||||
/* Must be success */
|
||||
WARN_ON(ret);
|
||||
|
||||
trace_amdgpu_dm_atomic_check_finish(state, ret);
|
||||
|
||||
return ret;
|
||||
|
||||
fail:
|
||||
@@ -8980,6 +8995,8 @@ fail:
|
||||
else
|
||||
DRM_DEBUG_DRIVER("Atomic check failed with err: %d \n", ret);
|
||||
|
||||
trace_amdgpu_dm_atomic_check_finish(state, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user