aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_connector.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-09-22 07:07:04 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-11-02 04:48:18 -0400
commitda11bbbb10a964c293c2e2e702ea62ad6cba48b4 (patch)
tree4ec07bad531ad4dbbe1e1cccef6f2a83ad9511a4 /drivers/gpu/drm/omapdrm/omap_connector.c
parent4520ff28aaa1e7f1b45f3abc0c45429ea9e93817 (diff)
drm/omap: Use consistent name for struct videomode
Use 'vm' to refer to a struct videomode instead of 'p', 't', 'timings' or something else. The code will be easier to follow if we use consistent names. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_connector.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index b04586b7e594..2580e8673908 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -118,11 +118,11 @@ static int omap_connector_get_modes(struct drm_connector *connector)
118 kfree(edid); 118 kfree(edid);
119 } else { 119 } else {
120 struct drm_display_mode *mode = drm_mode_create(dev); 120 struct drm_display_mode *mode = drm_mode_create(dev);
121 struct videomode timings = {0}; 121 struct videomode vm = {0};
122 122
123 dssdrv->get_timings(dssdev, &timings); 123 dssdrv->get_timings(dssdev, &vm);
124 124
125 drm_display_mode_from_videomode(&timings, mode); 125 drm_display_mode_from_videomode(&vm, mode);
126 126
127 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; 127 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
128 drm_mode_set_name(mode); 128 drm_mode_set_name(mode);
@@ -140,14 +140,14 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
140 struct omap_connector *omap_connector = to_omap_connector(connector); 140 struct omap_connector *omap_connector = to_omap_connector(connector);
141 struct omap_dss_device *dssdev = omap_connector->dssdev; 141 struct omap_dss_device *dssdev = omap_connector->dssdev;
142 struct omap_dss_driver *dssdrv = dssdev->driver; 142 struct omap_dss_driver *dssdrv = dssdev->driver;
143 struct videomode timings = {0}; 143 struct videomode vm = {0};
144 struct drm_device *dev = connector->dev; 144 struct drm_device *dev = connector->dev;
145 struct drm_display_mode *new_mode; 145 struct drm_display_mode *new_mode;
146 int r, ret = MODE_BAD; 146 int r, ret = MODE_BAD;
147 147
148 drm_display_mode_to_videomode(mode, &timings); 148 drm_display_mode_to_videomode(mode, &vm);
149 timings.flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | 149 vm.flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
150 DISPLAY_FLAGS_SYNC_NEGEDGE; 150 DISPLAY_FLAGS_SYNC_NEGEDGE;
151 mode->vrefresh = drm_mode_vrefresh(mode); 151 mode->vrefresh = drm_mode_vrefresh(mode);
152 152
153 /* 153 /*
@@ -156,13 +156,13 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
156 * panel's timings 156 * panel's timings
157 */ 157 */
158 if (dssdrv->check_timings) { 158 if (dssdrv->check_timings) {
159 r = dssdrv->check_timings(dssdev, &timings); 159 r = dssdrv->check_timings(dssdev, &vm);
160 } else { 160 } else {
161 struct videomode t = {0}; 161 struct videomode t = {0};
162 162
163 dssdrv->get_timings(dssdev, &t); 163 dssdrv->get_timings(dssdev, &t);
164 164
165 if (memcmp(&timings, &t, sizeof(struct videomode))) 165 if (memcmp(&vm, &t, sizeof(struct videomode)))
166 r = -EINVAL; 166 r = -EINVAL;
167 else 167 else
168 r = 0; 168 r = 0;
@@ -171,7 +171,7 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
171 if (!r) { 171 if (!r) {
172 /* check if vrefresh is still valid */ 172 /* check if vrefresh is still valid */
173 new_mode = drm_mode_duplicate(dev, mode); 173 new_mode = drm_mode_duplicate(dev, mode);
174 new_mode->clock = timings.pixelclock / 1000; 174 new_mode->clock = vm.pixelclock / 1000;
175 new_mode->vrefresh = 0; 175 new_mode->vrefresh = 0;
176 if (mode->vrefresh == drm_mode_vrefresh(new_mode)) 176 if (mode->vrefresh == drm_mode_vrefresh(new_mode))
177 ret = MODE_OK; 177 ret = MODE_OK;