diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-12-17 12:06:05 -0500 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2018-01-29 08:02:36 -0500 |
commit | b8f1230dd3bf99a77b74ea87a57d45422a5981cf (patch) | |
tree | fa548d49ff5e993d1b5d8c125db67d947cbdefa2 | |
parent | 1184e09e019c3ebc657c2a9cfe51edcb19d9de10 (diff) |
drm/sun4i: framebuffer: Add a custom atomic_check
In order to support normalized zpos, we need to call
drm_atomic_normalize_zpos in our driver's drm_mode_config_funcs'
atomic_check.
Let's duplicate the definition of drm_atomic_helper_check for now.
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/67cb4ca9889e6bf29314db37127ff15eed279c53.1516617243.git-series.maxime.ripard@free-electrons.com
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index cf52fa7f495e..973ee1fc95c9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c | |||
@@ -20,9 +20,21 @@ | |||
20 | #include "sun4i_drv.h" | 20 | #include "sun4i_drv.h" |
21 | #include "sun4i_framebuffer.h" | 21 | #include "sun4i_framebuffer.h" |
22 | 22 | ||
23 | static int sun4i_de_atomic_check(struct drm_device *dev, | ||
24 | struct drm_atomic_state *state) | ||
25 | { | ||
26 | int ret; | ||
27 | |||
28 | ret = drm_atomic_helper_check_modeset(dev, state); | ||
29 | if (ret) | ||
30 | return ret; | ||
31 | |||
32 | return drm_atomic_helper_check_planes(dev, state); | ||
33 | } | ||
34 | |||
23 | static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { | 35 | static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { |
24 | .output_poll_changed = drm_fb_helper_output_poll_changed, | 36 | .output_poll_changed = drm_fb_helper_output_poll_changed, |
25 | .atomic_check = drm_atomic_helper_check, | 37 | .atomic_check = sun4i_de_atomic_check, |
26 | .atomic_commit = drm_atomic_helper_commit, | 38 | .atomic_commit = drm_atomic_helper_commit, |
27 | .fb_create = drm_gem_fb_create, | 39 | .fb_create = drm_gem_fb_create, |
28 | }; | 40 | }; |