Convert amd to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> Cc: Harry Wentland <harry.wentland@xxxxxxx> Cc: Leo Li <sunpeng.li@xxxxxxx> Cc: Alex Deucher <alexander.deucher@xxxxxxx> Cc: "Christian König" <christian.koenig@xxxxxxx> Cc: "David (ChunMing) Zhou" <David1.Zhou@xxxxxxx> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0642dfe22582..975ed22e39d2 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3072,18 +3072,12 @@ static void dm_crtc_destroy_state(struct drm_crtc *crtc, static void dm_crtc_reset_state(struct drm_crtc *crtc) { - struct dm_crtc_state *state; + struct dm_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL); if (crtc->state) dm_crtc_destroy_state(crtc, crtc->state); - state = kzalloc(sizeof(*state), GFP_KERNEL); - if (WARN_ON(!state)) - return; - - crtc->state = &state->base; - crtc->state->crtc = crtc; - + __drm_atomic_helper_crtc_reset(crtc, &state->base); } static struct drm_crtc_state * -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx