Skip to content

Commit

Permalink
drm/sun4i: framebuffer: Add a custom atomic_check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Maxime Ripard committed Jan 29, 2018
1 parent 1184e09 commit b8f1230
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/gpu/drm/sun4i/sun4i_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,21 @@
#include "sun4i_drv.h"
#include "sun4i_framebuffer.h"

static int sun4i_de_atomic_check(struct drm_device *dev,
struct drm_atomic_state *state)
{
int ret;

ret = drm_atomic_helper_check_modeset(dev, state);
if (ret)
return ret;

return drm_atomic_helper_check_planes(dev, state);
}

static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {
.output_poll_changed = drm_fb_helper_output_poll_changed,
.atomic_check = drm_atomic_helper_check,
.atomic_check = sun4i_de_atomic_check,
.atomic_commit = drm_atomic_helper_commit,
.fb_create = drm_gem_fb_create,
};
Expand Down

0 comments on commit b8f1230

Please sign in to comment.