summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDhaval Patel <pdhaval@quicinc.com>2016-08-11 09:52:37 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-11 09:52:37 -0700
commite61b02b35bc3b2b93f7db12be9e039350b9cacd1 (patch)
tree9ff983f1224c9e704a95f1fc3756113416b55bb9 /drivers/gpu
parentfef0b40b11563219bafb86dbc9108db4b42d78dc (diff)
parent504e1e881f49c8901950acebd1c4eaf545e6a320 (diff)
Merge "drm/msm: allow flags to be set in property helpers" into dev/msm-4.4-drm_kms
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/msm_prop.c16
-rw-r--r--drivers/gpu/drm/msm/msm_prop.h4
-rw-r--r--drivers/gpu/drm/msm/sde/sde_connector.c2
-rw-r--r--drivers/gpu/drm/msm/sde/sde_crtc.c4
-rw-r--r--drivers/gpu/drm/msm/sde/sde_plane.c14
-rw-r--r--drivers/gpu/drm/msm/sde/sde_wb.c10
6 files changed, 27 insertions, 23 deletions
diff --git a/drivers/gpu/drm/msm/msm_prop.c b/drivers/gpu/drm/msm/msm_prop.c
index a67b1d548b5d..2191674ac924 100644
--- a/drivers/gpu/drm/msm/msm_prop.c
+++ b/drivers/gpu/drm/msm/msm_prop.c
@@ -73,8 +73,8 @@ void msm_property_destroy(struct msm_property_info *info)
}
void msm_property_install_range(struct msm_property_info *info,
- const char *name, uint64_t min, uint64_t max, uint64_t init,
- uint32_t property_idx)
+ const char *name, int flags, uint64_t min, uint64_t max,
+ uint64_t init, uint32_t property_idx)
{
struct drm_property **prop;
@@ -93,7 +93,7 @@ void msm_property_install_range(struct msm_property_info *info,
*/
if (*prop == 0) {
*prop = drm_property_create_range(info->dev,
- 0 /* flags */, name, min, max);
+ flags, name, min, max);
if (*prop == 0)
DRM_ERROR("create %s property failed\n", name);
}
@@ -146,7 +146,7 @@ void msm_property_install_rotation(struct msm_property_info *info,
}
void msm_property_install_enum(struct msm_property_info *info,
- const char *name, int is_bitmask,
+ const char *name, int flags, int is_bitmask,
const struct drm_prop_enum_list *values, int num_values,
uint32_t property_idx)
{
@@ -170,12 +170,12 @@ void msm_property_install_enum(struct msm_property_info *info,
/* 'bitmask' is a special type of 'enum' */
if (is_bitmask)
*prop = drm_property_create_bitmask(info->dev,
- DRM_MODE_PROP_BITMASK, name,
- values, num_values, -1);
+ DRM_MODE_PROP_BITMASK | flags,
+ name, values, num_values, -1);
else
*prop = drm_property_create_enum(info->dev,
- DRM_MODE_PROP_ENUM, name,
- values, num_values);
+ DRM_MODE_PROP_ENUM | flags,
+ name, values, num_values);
if (*prop == 0)
DRM_ERROR("create %s property failed\n", name);
}
diff --git a/drivers/gpu/drm/msm/msm_prop.h b/drivers/gpu/drm/msm/msm_prop.h
index 6c59dd727ebb..f83013f87e32 100644
--- a/drivers/gpu/drm/msm/msm_prop.h
+++ b/drivers/gpu/drm/msm/msm_prop.h
@@ -115,6 +115,7 @@ void msm_property_destroy(struct msm_property_info *info);
* msm_property_install_range - install standard drm range property
* @info: Pointer to property info container struct
* @name: Property name
+ * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
* @min: Min property value
* @max: Max property value
* @init: Default property value
@@ -122,6 +123,7 @@ void msm_property_destroy(struct msm_property_info *info);
*/
void msm_property_install_range(struct msm_property_info *info,
const char *name,
+ int flags,
uint64_t min,
uint64_t max,
uint64_t init,
@@ -142,6 +144,7 @@ void msm_property_install_rotation(struct msm_property_info *info,
* msm_property_install_enum - install standard drm enum/bitmask property
* @info: Pointer to property info container struct
* @name: Property name
+ * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
* @is_bitmask: Set to non-zero to create a bitmask property, rather than an
* enumeration one
* @values: Array of allowable enumeration/bitmask values
@@ -150,6 +153,7 @@ void msm_property_install_rotation(struct msm_property_info *info,
*/
void msm_property_install_enum(struct msm_property_info *info,
const char *name,
+ int flags,
int is_bitmask,
const struct drm_prop_enum_list *values,
int num_values,
diff --git a/drivers/gpu/drm/msm/sde/sde_connector.c b/drivers/gpu/drm/msm/sde/sde_connector.c
index 0eb71fcd60fe..1b86f00e5647 100644
--- a/drivers/gpu/drm/msm/sde/sde_connector.c
+++ b/drivers/gpu/drm/msm/sde/sde_connector.c
@@ -552,7 +552,7 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
}
msm_property_install_range(&c_conn->property_info, "RETIRE_FENCE",
- 0, ~0, ~0, CONNECTOR_PROP_RETIRE_FENCE);
+ 0x0, 0, ~0, ~0, CONNECTOR_PROP_RETIRE_FENCE);
rc = msm_property_install_get_status(&c_conn->property_info);
if (rc) {
diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.c b/drivers/gpu/drm/msm/sde/sde_crtc.c
index ab0c9ad794e4..ee8ff92746a0 100644
--- a/drivers/gpu/drm/msm/sde/sde_crtc.c
+++ b/drivers/gpu/drm/msm/sde/sde_crtc.c
@@ -1047,11 +1047,11 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc)
/* range properties */
msm_property_install_range(&sde_crtc->property_info,
"input_fence_timeout",
- 0, ~0, SDE_CRTC_INPUT_FENCE_TIMEOUT,
+ 0x0, 0, ~0, SDE_CRTC_INPUT_FENCE_TIMEOUT,
CRTC_PROP_INPUT_FENCE_TIMEOUT);
msm_property_install_range(&sde_crtc->property_info,
"output_fence",
- 0, ~0, ~0,
+ 0x0, 0, ~0, ~0,
CRTC_PROP_OUTPUT_FENCE);
}
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index 1be9a8caf6e4..f67a1732435e 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -1136,21 +1136,21 @@ static void _sde_plane_install_properties(struct drm_plane *plane)
}
/* range properties */
- msm_property_install_range(&psde->property_info, "zpos", 0, 255,
+ msm_property_install_range(&psde->property_info, "zpos", 0x0, 0, 255,
plane->type == DRM_PLANE_TYPE_PRIMARY ?
STAGE_BASE : STAGE0 + drm_plane_index(plane),
PLANE_PROP_ZPOS);
- msm_property_install_range(&psde->property_info, "alpha", 0, 255, 255,
- PLANE_PROP_ALPHA);
+ msm_property_install_range(&psde->property_info, "alpha",
+ 0x0, 0, 255, 255, PLANE_PROP_ALPHA);
if (psde->pipe_hw->ops.setup_solidfill)
msm_property_install_range(&psde->property_info, "color_fill",
- 0, 0xFFFFFFFF, 0,
+ 0, 0, 0xFFFFFFFF, 0,
PLANE_PROP_COLOR_FILL);
msm_property_install_range(&psde->property_info, "input_fence",
- 0, ~0, ~0,
+ 0x0, 0, ~0, ~0,
PLANE_PROP_INPUT_FENCE);
/* standard properties */
@@ -1159,10 +1159,10 @@ static void _sde_plane_install_properties(struct drm_plane *plane)
PLANE_PROP_ROTATION);
/* enum/bitmask properties */
- msm_property_install_enum(&psde->property_info, "blend_op", 0,
+ msm_property_install_enum(&psde->property_info, "blend_op", 0x0, 0,
e_blend_op, ARRAY_SIZE(e_blend_op),
PLANE_PROP_BLEND_OP);
- msm_property_install_enum(&psde->property_info, "src_config", 1,
+ msm_property_install_enum(&psde->property_info, "src_config", 0x0, 1,
e_src_config, ARRAY_SIZE(e_src_config),
PLANE_PROP_SRC_CONFIG);
diff --git a/drivers/gpu/drm/msm/sde/sde_wb.c b/drivers/gpu/drm/msm/sde/sde_wb.c
index 2d2f7cf340be..ae01d33130ab 100644
--- a/drivers/gpu/drm/msm/sde/sde_wb.c
+++ b/drivers/gpu/drm/msm/sde/sde_wb.c
@@ -308,15 +308,15 @@ int sde_wb_connector_post_init(struct drm_connector *connector,
* Add extra connector properties
*/
msm_property_install_range(&c_conn->property_info, "FB_ID",
- 0, ~0, ~0, CONNECTOR_PROP_OUT_FB);
+ 0x0, 0, ~0, ~0, CONNECTOR_PROP_OUT_FB);
msm_property_install_range(&c_conn->property_info, "DST_X",
- 0, UINT_MAX, 0, CONNECTOR_PROP_DST_X);
+ 0x0, 0, UINT_MAX, 0, CONNECTOR_PROP_DST_X);
msm_property_install_range(&c_conn->property_info, "DST_Y",
- 0, UINT_MAX, 0, CONNECTOR_PROP_DST_Y);
+ 0x0, 0, UINT_MAX, 0, CONNECTOR_PROP_DST_Y);
msm_property_install_range(&c_conn->property_info, "DST_W",
- 0, UINT_MAX, 0, CONNECTOR_PROP_DST_W);
+ 0x0, 0, UINT_MAX, 0, CONNECTOR_PROP_DST_W);
msm_property_install_range(&c_conn->property_info, "DST_H",
- 0, UINT_MAX, 0, CONNECTOR_PROP_DST_H);
+ 0x0, 0, UINT_MAX, 0, CONNECTOR_PROP_DST_H);
/*
* Populate info buffer