summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-12-16 18:05:31 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-17 20:23:25 +0100
commit22b8b13b6f436ffbb6e540f5f8039b1084a72794 (patch)
treeaaef2aa15dad4b80f27a5a2e41d1f0d984347b80 /drivers/gpu/drm/drm_crtc.c
parentb17cd757a3f61e4519b70b4673f0467ec0153a10 (diff)
downloadtalos-op-linux-22b8b13b6f436ffbb6e540f5f8039b1084a72794.tar.gz
talos-op-linux-22b8b13b6f436ffbb6e540f5f8039b1084a72794.zip
drm: get rid of direct property value access
For atomic drivers, we won't use the values array but instead shunt things off to obj->atomic_get_property(). So to simplify things make all read/write of properties values go through the accessors. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2780a088051e..481bb2598b62 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2106,12 +2106,17 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
prop_values = (uint64_t __user *)(unsigned long)(out_resp->prop_values_ptr);
for (i = 0; i < connector->properties.count; i++) {
struct drm_property *prop = connector->properties.properties[i];
+ uint64_t val;
+
+ ret = drm_object_property_get_value(&connector->base, prop, &val);
+ if (ret)
+ goto out;
+
if (put_user(prop->base.id, prop_ptr + copied)) {
ret = -EFAULT;
goto out;
}
- if (put_user(connector->properties.values[i],
- prop_values + copied)) {
+ if (put_user(val, prop_values + copied)) {
ret = -EFAULT;
goto out;
}
@@ -4413,12 +4418,18 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
(arg->prop_values_ptr);
for (i = 0; i < props_count; i++) {
struct drm_property *prop = obj->properties->properties[i];
+ uint64_t val;
+
+ ret = drm_object_property_get_value(obj, prop, &val);
+ if (ret)
+ goto out;
+
if (put_user(prop->base.id, props_ptr + copied)) {
ret = -EFAULT;
goto out;
}
- if (put_user(obj->properties->values[i],
- prop_values_ptr + copied)) {
+
+ if (put_user(val, prop_values_ptr + copied)) {
ret = -EFAULT;
goto out;
}
OpenPOWER on IntegriCloud