summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2014-08-20 10:11:22 +0900
committerJoonyoung Shim <jy0922.shim@samsung.com>2017-02-15 13:37:33 +0900
commit52294ae0de9d1bc22b8c14decfbd4f17afcdf145 (patch)
treebff47e9b0566334f3e558fcb5c513e1ad417566d
parent6fff76bd052f34bbdcbf7e24c5404e108c6b3620 (diff)
downloadlibdrm-52294ae0de9d1bc22b8c14decfbd4f17afcdf145.tar.gz
libdrm-52294ae0de9d1bc22b8c14decfbd4f17afcdf145.tar.bz2
libdrm-52294ae0de9d1bc22b8c14decfbd4f17afcdf145.zip
drm: ipptest: support ipp dynamic color range
This patch supports dynamic range for color space conversion. COLOR_RANGE_LIMITED: selects narrow -> Y(16 to 235), Cb/Cr(16 to 240) COLOR_RANGE_FULL: selects wide -> Y/Cb/Cr(0 to 255), Wide default Change-Id: I94190ac3f3630904d2461e226d34378ac2b82b9d Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
-rw-r--r--exynos/exynos_drm.h10
-rw-r--r--tests/ipptest/fimc.c2
2 files changed, 12 insertions, 0 deletions
diff --git a/exynos/exynos_drm.h b/exynos/exynos_drm.h
index 0a2d0d2e..258a2f51 100644
--- a/exynos/exynos_drm.h
+++ b/exynos/exynos_drm.h
@@ -243,6 +243,12 @@ enum drm_exynos_ipp_cmd {
IPP_CMD_MAX,
};
+/* define of color range */
+enum drm_exynos_color_range {
+ COLOR_RANGE_LIMITED, /* Narrow: Y(16 to 235), Cb/Cr(16 to 240) */
+ COLOR_RANGE_FULL, /* Wide: Y/Cb/Cr(0 to 255), Wide default */
+};
+
/**
* A structure for ipp property.
*
@@ -251,6 +257,8 @@ enum drm_exynos_ipp_cmd {
* @ipp_id: id of ipp driver.
* @prop_id: id of property.
* @refresh_rate: refresh rate.
+ * @range: dynamic range for csc.
+ * @pad: just padding to be 64-bit aligned.
*/
struct drm_exynos_ipp_property {
struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];
@@ -258,6 +266,8 @@ struct drm_exynos_ipp_property {
__u32 ipp_id;
__u32 prop_id;
__u32 refresh_rate;
+ __u32 range;
+ __u32 pad;
};
/* definition of buffer */
diff --git a/tests/ipptest/fimc.c b/tests/ipptest/fimc.c
index f48c7936..cf8fbb08 100644
--- a/tests/ipptest/fimc.c
+++ b/tests/ipptest/fimc.c
@@ -75,6 +75,7 @@ static int exynos_drm_ipp_set_property(int fd,
}
property->config[EXYNOS_DRM_OPS_DST].pos = scale_pos;
property->config[EXYNOS_DRM_OPS_DST].sz = dst_sz;
+ property->range = COLOR_RANGE_FULL; /* Wide default */
break;
case IPP_CMD_WB:
property->config[EXYNOS_DRM_OPS_SRC].ops_id = EXYNOS_DRM_OPS_SRC;
@@ -104,6 +105,7 @@ static int exynos_drm_ipp_set_property(int fd,
}
property->config[EXYNOS_DRM_OPS_DST].pos = scale_pos;
property->config[EXYNOS_DRM_OPS_DST].sz = dst_sz;
+ property->range = COLOR_RANGE_FULL; /* Wide default */
break;
case IPP_CMD_OUTPUT:
default: