drm/imx: ipuv3-plane: add zpos property
Add a zpos property to planes. Call drm_atomic_helper_check() instead of calling drm_atomic_helper_check_modeset() and drm_atomic_check_planes() manually. This effectively adds a call to drm_atomic_normalize_zpos() before checking planes. Reorder atomic update to allow changing plane zpos without modeset. Note that the initial zpos is set in ipu_plane_state_reset(). The initial value set in ipu_plane_init() is just for show. The zpos parameter of drm_plane_create_zpos_property() is ignored because the newly created plane do not have state yet. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
@@ -49,11 +49,7 @@ static int imx_drm_atomic_check(struct drm_device *dev,
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = drm_atomic_helper_check_modeset(dev, state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = drm_atomic_helper_check_planes(dev, state);
|
||||
ret = drm_atomic_helper_check(dev, state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -229,6 +225,7 @@ static int imx_drm_bind(struct device *dev)
|
||||
drm->mode_config.funcs = &imx_drm_mode_config_funcs;
|
||||
drm->mode_config.helper_private = &imx_drm_mode_config_helpers;
|
||||
drm->mode_config.allow_fb_modifiers = true;
|
||||
drm->mode_config.normalize_zpos = true;
|
||||
|
||||
drm_mode_config_init(drm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user