#include "exynos_drm_drv.h"
#include "exynos_drm_encoder.h"
+#define to_exynos_plane(x) container_of(x, struct exynos_plane, base)
+
struct exynos_plane {
struct drm_plane base;
struct exynos_drm_overlay overlay;
uint32_t src_x, uint32_t src_y,
uint32_t src_w, uint32_t src_h)
{
- struct exynos_plane *exynos_plane =
- container_of(plane, struct exynos_plane, base);
+ struct exynos_plane *exynos_plane = to_exynos_plane(plane);
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
struct exynos_drm_crtc_pos pos;
int ret;
static int exynos_disable_plane(struct drm_plane *plane)
{
- struct exynos_plane *exynos_plane =
- container_of(plane, struct exynos_plane, base);
+ struct exynos_plane *exynos_plane = to_exynos_plane(plane);
struct exynos_drm_overlay *overlay = &exynos_plane->overlay;
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
static void exynos_plane_destroy(struct drm_plane *plane)
{
- struct exynos_plane *exynos_plane =
- container_of(plane, struct exynos_plane, base);
+ struct exynos_plane *exynos_plane = to_exynos_plane(plane);
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
}
plane = obj_to_plane(obj);
- exynos_plane = container_of(plane, struct exynos_plane, base);
+ exynos_plane = to_exynos_plane(plane);
exynos_plane->overlay.zpos = zpos_req->zpos;