summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_mode.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-04-24 13:12:08 +1000
committerDave Airlie <airlied@redhat.com>2020-04-24 13:12:19 +1000
commit126a34061eec2df05a5a28052edefd4e6125f31c (patch)
treec8938ff9da3670a8b354b1fa8a0980acf539891c /drivers/gpu/drm/ast/ast_mode.c
parent1aa63ddf726ea049279989b93b69b57ce6efd75b (diff)
parent776d58823a60c689816972b51100cb322a0834ce (diff)
downloadlinux-126a34061eec2df05a5a28052edefd4e6125f31c.tar.bz2
Merge tag 'drm-misc-next-2020-04-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.8: UAPI Changes: Cross-subsystem Changes: * MAINTAINERS: adapt several filenames to changes in panel code * arch/arm, fbdev: Use GPIO descriptors in sa11x0 * dma-buf: Fix typo in documentation Core Changes: * drm: Don't free framebuffer in drm_gem_fb_init() * drm: Document struct drm_device.dev_private being deprecated * drm: Merged topic/phy-compliance-202004-08 Driver Changes: * drm/adv7511: Add support for HDMI SPDIF and additional sampling rates * drm/ast: Allocate CRTC state of correct size * drm/panel: convert many driver bindings to DT schema; add port/ports property to bindings * drm/rockchip: Convert rk3066 bindings to YAML; spelling fixes * fbdev/arcfb: Call request_irq(), free_irq() at appropriate places * fbdev/controlfb: Support COMPILE_TEST; cleanups * fbdev/imxfb: Fix unbalanced enables/disables * fbdev/s1d13xxxfb: Call unregister_framebuffer() * fbdev/ssd1307fb: Use atomic PWM API, device properties and probe_new(); cleanups * fbdev/vesafb: Call release_region() * cleanups of includes, unused types/variables/fields, and fallthrough Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20200423083425.GA15883@linux-uq9g
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index cdd6c46d6557..7a9f20a2fd30 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -881,6 +881,17 @@ static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
.atomic_disable = ast_crtc_helper_atomic_disable,
};
+static void ast_crtc_reset(struct drm_crtc *crtc)
+{
+ struct ast_crtc_state *ast_state =
+ kzalloc(sizeof(*ast_state), GFP_KERNEL);
+
+ if (crtc->state)
+ crtc->funcs->atomic_destroy_state(crtc, crtc->state);
+
+ __drm_atomic_helper_crtc_reset(crtc, &ast_state->base);
+}
+
static void ast_crtc_destroy(struct drm_crtc *crtc)
{
drm_crtc_cleanup(crtc);
@@ -919,7 +930,7 @@ static void ast_crtc_atomic_destroy_state(struct drm_crtc *crtc,
}
static const struct drm_crtc_funcs ast_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .reset = ast_crtc_reset,
.set_config = drm_crtc_helper_set_config,
.gamma_set = drm_atomic_helper_legacy_gamma_set,
.destroy = ast_crtc_destroy,