drm/exynos: remove exynos_drm_crtc_plane_* wrappers
This functions were doing nothing but calling a manager op function, so remove them and call the manager directly. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
2bf053eb26
commit
1e3b423d0b
|
@ -410,39 +410,6 @@ void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe)
|
||||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exynos_drm_crtc_plane_mode_set(struct drm_crtc *crtc,
|
|
||||||
struct exynos_drm_overlay *overlay)
|
|
||||||
{
|
|
||||||
struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
|
|
||||||
|
|
||||||
if (manager->ops->win_mode_set)
|
|
||||||
manager->ops->win_mode_set(manager, overlay);
|
|
||||||
}
|
|
||||||
|
|
||||||
void exynos_drm_crtc_plane_commit(struct drm_crtc *crtc, int zpos)
|
|
||||||
{
|
|
||||||
struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
|
|
||||||
|
|
||||||
if (manager->ops->win_commit)
|
|
||||||
manager->ops->win_commit(manager, zpos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void exynos_drm_crtc_plane_enable(struct drm_crtc *crtc, int zpos)
|
|
||||||
{
|
|
||||||
struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
|
|
||||||
|
|
||||||
if (manager->ops->win_enable)
|
|
||||||
manager->ops->win_enable(manager, zpos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos)
|
|
||||||
{
|
|
||||||
struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
|
|
||||||
|
|
||||||
if (manager->ops->win_disable)
|
|
||||||
manager->ops->win_disable(manager, zpos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb)
|
void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb)
|
||||||
{
|
{
|
||||||
struct exynos_drm_manager *manager;
|
struct exynos_drm_manager *manager;
|
||||||
|
|
|
@ -76,6 +76,7 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||||
uint32_t src_w, uint32_t src_h)
|
uint32_t src_w, uint32_t src_h)
|
||||||
{
|
{
|
||||||
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
||||||
|
struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
|
||||||
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
||||||
unsigned int actual_w;
|
unsigned int actual_w;
|
||||||
unsigned int actual_h;
|
unsigned int actual_h;
|
||||||
|
@ -141,7 +142,8 @@ int exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||||
|
|
||||||
plane->crtc = crtc;
|
plane->crtc = crtc;
|
||||||
|
|
||||||
exynos_drm_crtc_plane_mode_set(crtc, overlay);
|
if (manager->ops->win_mode_set)
|
||||||
|
manager->ops->win_mode_set(manager, overlay);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -150,26 +152,35 @@ void exynos_plane_commit(struct drm_plane *plane)
|
||||||
{
|
{
|
||||||
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
||||||
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
||||||
|
struct exynos_drm_manager *manager = to_exynos_crtc(plane->crtc)->manager;
|
||||||
|
|
||||||
exynos_drm_crtc_plane_commit(plane->crtc, overlay->zpos);
|
if (manager->ops->win_commit)
|
||||||
|
manager->ops->win_commit(manager, overlay->zpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exynos_plane_dpms(struct drm_plane *plane, int mode)
|
void exynos_plane_dpms(struct drm_plane *plane, int mode)
|
||||||
{
|
{
|
||||||
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
struct exynos_plane *exynos_plane = to_exynos_plane(plane);
|
||||||
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
|
||||||
|
struct exynos_drm_manager *manager;
|
||||||
|
|
||||||
if (mode == DRM_MODE_DPMS_ON) {
|
if (mode == DRM_MODE_DPMS_ON) {
|
||||||
if (exynos_plane->enabled)
|
if (exynos_plane->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
exynos_drm_crtc_plane_enable(plane->crtc, overlay->zpos);
|
manager = to_exynos_crtc(plane->crtc)->manager;
|
||||||
|
if (manager->ops->win_enable)
|
||||||
|
manager->ops->win_enable(manager, overlay->zpos);
|
||||||
|
|
||||||
exynos_plane->enabled = true;
|
exynos_plane->enabled = true;
|
||||||
} else {
|
} else {
|
||||||
if (!exynos_plane->enabled)
|
if (!exynos_plane->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
exynos_drm_crtc_plane_disable(plane->crtc, overlay->zpos);
|
manager = to_exynos_crtc(plane->crtc)->manager;
|
||||||
|
if (manager->ops->win_disable)
|
||||||
|
manager->ops->win_disable(manager, overlay->zpos);
|
||||||
|
|
||||||
exynos_plane->enabled = false;
|
exynos_plane->enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue