drm/exynos: add atomic_check callback to exynos_crtc
Some CRTCs needs mode validation, this patch adds neccessary callback to Exynos DRM framework. It is called from DRM core via atomic_check helper for drm_crtc. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
b8182832c5
commit
5625b3418a
2 changed files with 15 additions and 0 deletions
|
@ -50,6 +50,17 @@ exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
|
|||
exynos_crtc->ops->commit(exynos_crtc);
|
||||
}
|
||||
|
||||
static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *state)
|
||||
{
|
||||
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
|
||||
|
||||
if (exynos_crtc->ops->atomic_check)
|
||||
return exynos_crtc->ops->atomic_check(exynos_crtc, state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void exynos_crtc_atomic_begin(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *old_crtc_state)
|
||||
{
|
||||
|
@ -86,6 +97,7 @@ static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
|
|||
.enable = exynos_drm_crtc_enable,
|
||||
.disable = exynos_drm_crtc_disable,
|
||||
.mode_set_nofb = exynos_drm_crtc_mode_set_nofb,
|
||||
.atomic_check = exynos_crtc_atomic_check,
|
||||
.atomic_begin = exynos_crtc_atomic_begin,
|
||||
.atomic_flush = exynos_crtc_atomic_flush,
|
||||
};
|
||||
|
|
|
@ -89,6 +89,7 @@ struct exynos_drm_plane {
|
|||
* @disable_vblank: specific driver callback for disabling vblank interrupt.
|
||||
* @wait_for_vblank: wait for vblank interrupt to make sure that
|
||||
* hardware overlay is updated.
|
||||
* @atomic_check: validate state
|
||||
* @atomic_begin: prepare a window to receive a update
|
||||
* @atomic_flush: mark the end of a window update
|
||||
* @update_plane: apply hardware specific overlay data to registers.
|
||||
|
@ -108,6 +109,8 @@ struct exynos_drm_crtc_ops {
|
|||
int (*enable_vblank)(struct exynos_drm_crtc *crtc);
|
||||
void (*disable_vblank)(struct exynos_drm_crtc *crtc);
|
||||
void (*wait_for_vblank)(struct exynos_drm_crtc *crtc);
|
||||
int (*atomic_check)(struct exynos_drm_crtc *crtc,
|
||||
struct drm_crtc_state *state);
|
||||
void (*atomic_begin)(struct exynos_drm_crtc *crtc,
|
||||
struct exynos_drm_plane *plane);
|
||||
void (*update_plane)(struct exynos_drm_crtc *crtc,
|
||||
|
|
Loading…
Add table
Reference in a new issue