summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_display.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-02-23 10:11:49 -0500
committerAlex Deucher <alexander.deucher@amd.com>2015-03-19 12:26:25 -0400
commit67ba31d3528e2460b2243b2d139b70fa479602e8 (patch)
treedb280d4956d9c12d0a53aed43f2955d30e4aabca /drivers/gpu/drm/radeon/radeon_display.c
parent6b94aea01d4f96235e947892f6c39f837045e741 (diff)
downloadop-kernel-dev-67ba31d3528e2460b2243b2d139b70fa479602e8.zip
op-kernel-dev-67ba31d3528e2460b2243b2d139b70fa479602e8.tar.gz
drm/radeon: add an output_csc property
This adds the drm property for output csc (e.g., transform of output display colorspace). Currently only common ones (TV RGB, BT.601, BT.709) are supported, but bypass and tv rgb are really the only useful ones at the moment. Additionally we could expose a user adjustable matrix in the future. This commit just adds the property. The hw support will be added in subsequent patches. bug: https://bugs.freedesktop.org/show_bug.cgi?id=83226 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_display.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 913fafa..d57dfb9 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1382,6 +1382,13 @@ static struct drm_prop_enum_list radeon_dither_enum_list[] =
{ RADEON_FMT_DITHER_ENABLE, "on" },
};
+static struct drm_prop_enum_list radeon_output_csc_enum_list[] =
+{ { RADEON_OUTPUT_CSC_BYPASS, "bypass" },
+ { RADEON_OUTPUT_CSC_TVRGB, "tvrgb" },
+ { RADEON_OUTPUT_CSC_YCBCR601, "ycbcr601" },
+ { RADEON_OUTPUT_CSC_YCBCR709, "ycbcr709" },
+};
+
static int radeon_modeset_create_props(struct radeon_device *rdev)
{
int sz;
@@ -1444,6 +1451,12 @@ static int radeon_modeset_create_props(struct radeon_device *rdev)
"dither",
radeon_dither_enum_list, sz);
+ sz = ARRAY_SIZE(radeon_output_csc_enum_list);
+ rdev->mode_info.output_csc_property =
+ drm_property_create_enum(rdev->ddev, 0,
+ "output_csc",
+ radeon_output_csc_enum_list, sz);
+
return 0;
}
OpenPOWER on IntegriCloud