aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-07-17 23:30:03 -0400
committerDave Airlie <airlied@redhat.com>2014-07-18 00:25:04 -0400
commit6d385c0aa31de99da391fda0fc43462e2df20863 (patch)
tree6bcac6c7ce37f1ce4551e87b629038592b52fe08 /drivers/gpu
parenta4cd5d68570cc7614d50da156545919af83a3548 (diff)
drm/nouveau: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 680f46d007a0..dbdc9ad59546 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -63,7 +63,7 @@ find_encoder(struct drm_connector *connector, int type)
63{ 63{
64 struct drm_device *dev = connector->dev; 64 struct drm_device *dev = connector->dev;
65 struct nouveau_encoder *nv_encoder; 65 struct nouveau_encoder *nv_encoder;
66 struct drm_mode_object *obj; 66 struct drm_encoder *enc;
67 int i, id; 67 int i, id;
68 68
69 for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { 69 for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
@@ -71,10 +71,10 @@ find_encoder(struct drm_connector *connector, int type)
71 if (!id) 71 if (!id)
72 break; 72 break;
73 73
74 obj = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER); 74 enc = drm_encoder_find(dev, id);
75 if (!obj) 75 if (!enc)
76 continue; 76 continue;
77 nv_encoder = nouveau_encoder(obj_to_encoder(obj)); 77 nv_encoder = nouveau_encoder(enc);
78 78
79 if (type == DCB_OUTPUT_ANY || 79 if (type == DCB_OUTPUT_ANY ||
80 (nv_encoder->dcb && nv_encoder->dcb->type == type)) 80 (nv_encoder->dcb && nv_encoder->dcb->type == type))
@@ -119,7 +119,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
119 struct nouveau_drm *drm = nouveau_drm(dev); 119 struct nouveau_drm *drm = nouveau_drm(dev);
120 struct nouveau_gpio *gpio = nouveau_gpio(drm->device); 120 struct nouveau_gpio *gpio = nouveau_gpio(drm->device);
121 struct nouveau_encoder *nv_encoder; 121 struct nouveau_encoder *nv_encoder;
122 struct drm_mode_object *obj; 122 struct drm_encoder *encoder;
123 int i, panel = -ENODEV; 123 int i, panel = -ENODEV;
124 124
125 /* eDP panels need powering on by us (if the VBIOS doesn't default it 125 /* eDP panels need powering on by us (if the VBIOS doesn't default it
@@ -139,10 +139,10 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)
139 if (id == 0) 139 if (id == 0)
140 break; 140 break;
141 141
142 obj = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER); 142 encoder = drm_encoder_find(dev, id);
143 if (!obj) 143 if (!encoder)
144 continue; 144 continue;
145 nv_encoder = nouveau_encoder(obj_to_encoder(obj)); 145 nv_encoder = nouveau_encoder(encoder);
146 146
147 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) { 147 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
148 int ret = nouveau_dp_detect(nv_encoder); 148 int ret = nouveau_dp_detect(nv_encoder);