diff options
author | Maarten Lankhorst | 2019-06-26 12:22:54 +0200 |
---|---|---|
committer | Maarten Lankhorst | 2019-06-26 12:22:54 +0200 |
commit | 355a47ae7ebcf9d605aa809b259d380422e81b8d (patch) | |
tree | f42b3196986c7de89a335b4f57384d249f5663e9 /drivers/gpu/drm/tegra/dc.c | |
parent | drm/bridge: tfp410: fix use of cancel_delayed_work_sync (diff) | |
parent | drm/edid: use for_each_displayid_db where applicable (diff) | |
download | kernel-qcow2-linux-355a47ae7ebcf9d605aa809b259d380422e81b8d.tar.gz kernel-qcow2-linux-355a47ae7ebcf9d605aa809b259d380422e81b8d.tar.xz kernel-qcow2-linux-355a47ae7ebcf9d605aa809b259d380422e81b8d.zip |
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next-fixes
Some fixes have been accidentally pushed to this, so I cannot fost-forward.
Required to pull in the remove-fbcon-notifiers fixes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.c')
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 607a6ea17ecc..079250c85733 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -26,6 +26,9 @@ #include <drm/drm_atomic_helper.h> #include <drm/drm_plane_helper.h> +static void tegra_crtc_atomic_destroy_state(struct drm_crtc *crtc, + struct drm_crtc_state *state); + static void tegra_dc_stats_reset(struct tegra_dc_stats *stats) { stats->frames = 0; @@ -1155,20 +1158,12 @@ static void tegra_dc_destroy(struct drm_crtc *crtc) static void tegra_crtc_reset(struct drm_crtc *crtc) { - struct tegra_dc_state *state; + struct tegra_dc_state *state = kzalloc(sizeof(*state), GFP_KERNEL); if (crtc->state) - __drm_atomic_helper_crtc_destroy_state(crtc->state); - - kfree(crtc->state); - crtc->state = NULL; - - state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) { - crtc->state = &state->base; - crtc->state->crtc = crtc; - } + tegra_crtc_atomic_destroy_state(crtc, crtc->state); + __drm_atomic_helper_crtc_reset(crtc, &state->base); drm_crtc_vblank_reset(crtc); } |