forked from Minki/linux
drm/meson: fix primary plane disabling
The primary plane disable logic is flawed, when the primary plane is
disabled, it is re-enabled in the vsync irq when another plane is updated.
Handle the plane disabling correctly by handling the primary plane
enable flag in the primary plane update & disable callbacks.
Fixes: 490f50c109
("drm/meson: Add G12A support for OSD1 Plane")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605141253.24165-2-narmstrong@baylibre.com
This commit is contained in:
parent
e98c7952db
commit
c03ea50e27
@ -107,8 +107,6 @@ static void meson_g12a_crtc_atomic_enable(struct drm_crtc *crtc,
|
|||||||
priv->io_base + _REG(VPP_OUT_H_V_SIZE));
|
priv->io_base + _REG(VPP_OUT_H_V_SIZE));
|
||||||
|
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
|
||||||
priv->viu.osd1_enabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void meson_crtc_atomic_enable(struct drm_crtc *crtc,
|
static void meson_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||||
@ -137,8 +135,6 @@ static void meson_crtc_atomic_enable(struct drm_crtc *crtc,
|
|||||||
priv->io_base + _REG(VPP_MISC));
|
priv->io_base + _REG(VPP_MISC));
|
||||||
|
|
||||||
drm_crtc_vblank_on(crtc);
|
drm_crtc_vblank_on(crtc);
|
||||||
|
|
||||||
priv->viu.osd1_enabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void meson_g12a_crtc_atomic_disable(struct drm_crtc *crtc,
|
static void meson_g12a_crtc_atomic_disable(struct drm_crtc *crtc,
|
||||||
|
@ -305,6 +305,8 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
|
|||||||
meson_plane->enabled = true;
|
meson_plane->enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->viu.osd1_enabled = true;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->drm->event_lock, flags);
|
spin_unlock_irqrestore(&priv->drm->event_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +325,7 @@ static void meson_plane_atomic_disable(struct drm_plane *plane,
|
|||||||
priv->io_base + _REG(VPP_MISC));
|
priv->io_base + _REG(VPP_MISC));
|
||||||
|
|
||||||
meson_plane->enabled = false;
|
meson_plane->enabled = false;
|
||||||
|
priv->viu.osd1_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
|
static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
|
||||||
|
Loading…
Reference in New Issue
Block a user