diff options
| author | Gopikrishnaiah Anandan <agopik@codeaurora.org> | 2016-10-05 12:03:42 -0700 |
|---|---|---|
| committer | Lloyd Atkinson <latkinso@codeaurora.org> | 2016-10-05 20:15:57 -0400 |
| commit | 91652cac892fca245031cb7d1709feed68b9d465 (patch) | |
| tree | 8ff4b6a381198fb6c5cfa25e2fc677cef9bef5f7 | |
| parent | e3d64dab54a86784d7e7dab4dfd576febbef1996 (diff) | |
drm/msm: property read should return success for virtual crtc
Crtc's are virtualized in msm platforms. Properties that are attached to
crtc might not be backed by hardware. If clients call set/get property
on virtual crtc, set/get shouldn't fail if hardware is not attached
to the crtc.
Change will return success for crtc property set/get in all cases to ensure
that display will continue to work.
Change-Id: I917176d14983d1c5712352df47ec4fc2f214659b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_color_processing.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_color_processing.c b/drivers/gpu/drm/msm/sde/sde_color_processing.c index a1cf7ec95da9..c075d374fade 100644 --- a/drivers/gpu/drm/msm/sde/sde_color_processing.c +++ b/drivers/gpu/drm/msm/sde/sde_color_processing.c @@ -713,7 +713,6 @@ int sde_cp_crtc_get_property(struct drm_crtc *crtc, { struct sde_cp_node *prop_node = NULL; struct sde_crtc *sde_crtc = NULL; - int ret = -EINVAL; if (!crtc || !property || !val) { DRM_ERROR("invalid crtc %pK property %pK val %pK\n", @@ -726,15 +725,15 @@ int sde_cp_crtc_get_property(struct drm_crtc *crtc, DRM_ERROR("invalid sde_crtc %pK\n", sde_crtc); return -EINVAL; } - + /* Return 0 if property is not supported */ + *val = 0; list_for_each_entry(prop_node, &sde_crtc->feature_list, feature_list) { if (property->base.id == prop_node->property_id) { *val = prop_node->prop_val; - ret = 0; break; } } - return ret; + return 0; } void sde_cp_crtc_destroy_properties(struct drm_crtc *crtc) |
