[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1544789421-5265-6-git-send-email-c.manszewski@samsung.com>
Date: Fri, 14 Dec 2018 13:10:20 +0100
From: Christoph Manszewski <c.manszewski@...sung.com>
To: dri-devel@...ts.freedesktop.org
Cc: Christoph Manszewski <c.manszewski@...sung.com>,
Inki Dae <inki.dae@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
David Airlie <airlied@...ux.ie>, Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Sean Paul <sean@...rly.run>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Andrzej Hajda <a.hajda@...sung.com>
Subject: [PATCH 5/6] drm/exynos: plane: Add range property to exynos plane
Create range property within exynos_drm_plane_init and set to default value
in exynos_drm_plane_reset.
Signed-off-by: Christoph Manszewski <c.manszewski@...sung.com>
---
drivers/gpu/drm/exynos/exynos_drm_plane.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
index cf352d980eee..a6ab0e7277f0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
@@ -140,6 +140,7 @@ static void exynos_drm_plane_reset(struct drm_plane *plane)
if (exynos_state) {
__drm_atomic_helper_plane_reset(plane, &exynos_state->base);
plane->state->zpos = exynos_plane->config->zpos;
+ plane->state->color_range = exynos_plane->config->range;
}
}
@@ -301,6 +302,10 @@ int exynos_plane_init(struct drm_device *dev,
unsigned int supported_modes = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
BIT(DRM_MODE_BLEND_PREMULTI) |
BIT(DRM_MODE_BLEND_COVERAGE);
+
+ u32 supported_ranges = BIT(DRM_COLOR_LIMITED_RANGE) |
+ BIT(DRM_COLOR_FULL_RANGE);
+
struct drm_plane *plane = &exynos_plane->base;
err = drm_universal_plane_init(dev, plane,
@@ -328,5 +333,9 @@ int exynos_plane_init(struct drm_device *dev,
if (config->capabilities & EXYNOS_DRM_PLANE_CAP_WIN_BLEND)
drm_plane_create_alpha_property(plane);
+ if (config->capabilities & EXYNOS_DRM_PLANE_CAP_RANGE)
+ drm_plane_create_range_property(plane, supported_ranges,
+ config->range);
+
return 0;
}
--
2.7.4
Powered by blists - more mailing lists