Skip to content

Commit 5d68be9

Browse files
committed
drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail
During a hardware commit, the commit bit in the backend will only be cleared if the TCON is enabled. Use the runtime_pm variant of the atomic_commit_tail hook that makes sure that the CRTC, our TCON, is enabled when we perform an atomic_commit. Reviewed-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/bde95faff2078f63e9af99c3abee5360b9050fd1.1516613040.git-series.maxime.ripard@free-electrons.com
1 parent 96180dd commit 5d68be9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/sun4i/sun4i_framebuffer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* the License, or (at your option) any later version.
1111
*/
1212

13+
#include <drm/drm_atomic.h>
1314
#include <drm/drm_atomic_helper.h>
1415
#include <drm/drm_fb_helper.h>
1516
#include <drm/drm_fb_cma_helper.h>
@@ -26,6 +27,10 @@ static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {
2627
.fb_create = drm_gem_fb_create,
2728
};
2829

30+
static struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = {
31+
.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
32+
};
33+
2934
int sun4i_framebuffer_init(struct drm_device *drm)
3035
{
3136
drm_mode_config_reset(drm);
@@ -34,6 +39,7 @@ int sun4i_framebuffer_init(struct drm_device *drm)
3439
drm->mode_config.max_height = 8192;
3540

3641
drm->mode_config.funcs = &sun4i_de_mode_config_funcs;
42+
drm->mode_config.helper_private = &sun4i_de_mode_config_helpers;
3743

3844
return drm_fb_cma_fbdev_init(drm, 32, 0);
3945
}

0 commit comments

Comments
 (0)