diff options
-rw-r--r-- | samsung/exynos_drm_crtc.c | 26 | ||||
-rw-r--r-- | samsung/exynos_drm_drv.h | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/samsung/exynos_drm_crtc.c b/samsung/exynos_drm_crtc.c index 6a5987a..eff9eb8 100644 --- a/samsung/exynos_drm_crtc.c +++ b/samsung/exynos_drm_crtc.c @@ -624,6 +624,8 @@ static int exynos_drm_crtc_get_property(struct drm_crtc *crtc, dma_buf_fd(exynos_crtc_state->cgc_gem->dma_buf, 0) : 0; else if (property == exynos_crtc->props.expected_present_time) *val = exynos_crtc_state->expected_present_time; + else if (property == exynos_crtc->props.rcd_plane_id) + *val = decon->rcd->plane.base.base.id; else return -EINVAL; @@ -881,6 +883,23 @@ exynos_drm_crtc_create_partial_property(struct exynos_drm_crtc *exynos_crtc) return 0; } +static int exynos_drm_crtc_create_rcd_id_property(struct exynos_drm_crtc *exynos_crtc, + u32 rcd_plane_id) +{ + struct drm_crtc *crtc = &exynos_crtc->base; + struct drm_property *prop; + + prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_IMMUTABLE, "rcd_plane_id", 0, + UINT_MAX); + if (!prop) + return -ENOMEM; + + drm_object_attach_property(&crtc->base, prop, rcd_plane_id); + exynos_crtc->props.rcd_plane_id = prop; + + return 0; +} + struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, struct drm_plane *plane, enum exynos_drm_output_type type, @@ -972,6 +991,13 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, goto err_crtc; } + if (decon->rcd) { + ret = exynos_drm_crtc_create_rcd_id_property(exynos_crtc, + decon->rcd->plane.base.base.id); + if (ret) + goto err_crtc; + } + ret = exynos_drm_crtc_create_partial_property(exynos_crtc); if (ret) goto err_crtc; diff --git a/samsung/exynos_drm_drv.h b/samsung/exynos_drm_drv.h index 3a56368..88ea0b8 100644 --- a/samsung/exynos_drm_drv.h +++ b/samsung/exynos_drm_drv.h @@ -318,6 +318,7 @@ struct exynos_drm_crtc { struct drm_property *partial; struct drm_property *cgc_lut_fd; struct drm_property *expected_present_time; + struct drm_property *rcd_plane_id; } props; u8 active_state; u32 rcd_plane_mask; |