Commit 54c40dede10876868d62699e49b5f2b413f18b88

Authored by Sean Paul
Committed by Inki Dae
1 parent e5b89916bc

drm/exynos: Rename display_op power_on to dpms

This patch renames the display_op power_on to dpms to accurately reflect
what the function does.

The side-effect of this patch is that the new hdmi dpms callback is now
invoked twice in the dpms path. This is safe and will be dealt with when
the exynos_drm shim goes away.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>

Showing 7 changed files with 10 additions and 27 deletions Side-by-side Diff

drivers/gpu/drm/exynos/exynos_drm_drv.h
... ... @@ -128,7 +128,7 @@
128 128 * @get_edid: get edid modes from display driver.
129 129 * @get_panel: get panel object from display driver.
130 130 * @check_mode: check if mode is valid or not.
131   - * @power_on: display device on or off.
  131 + * @dpms: display device on or off.
132 132 */
133 133 struct exynos_drm_display_ops {
134 134 enum exynos_drm_output_type type;
... ... @@ -138,7 +138,7 @@
138 138 struct drm_connector *connector);
139 139 void *(*get_panel)(struct device *dev);
140 140 int (*check_mode)(struct device *dev, struct drm_display_mode *mode);
141   - int (*power_on)(struct device *dev, int mode);
  141 + int (*dpms)(struct device *dev, int mode);
142 142 };
143 143  
144 144 /*
drivers/gpu/drm/exynos/exynos_drm_encoder.c
... ... @@ -50,8 +50,8 @@
50 50 return;
51 51 }
52 52  
53   - if (display_ops && display_ops->power_on)
54   - display_ops->power_on(manager->ctx, mode);
  53 + if (display_ops && display_ops->dpms)
  54 + display_ops->dpms(manager->ctx, mode);
55 55  
56 56 exynos_encoder->dpms = mode;
57 57 }
drivers/gpu/drm/exynos/exynos_drm_fimd.c
... ... @@ -169,19 +169,11 @@
169 169 return 0;
170 170 }
171 171  
172   -static int fimd_display_power_on(struct device *dev, int mode)
173   -{
174   - /* TODO */
175   -
176   - return 0;
177   -}
178   -
179 172 static struct exynos_drm_display_ops fimd_display_ops = {
180 173 .type = EXYNOS_DISPLAY_TYPE_LCD,
181 174 .is_connected = fimd_display_is_connected,
182 175 .get_panel = fimd_get_panel,
183 176 .check_mode = fimd_check_mode,
184   - .power_on = fimd_display_power_on,
185 177 };
186 178  
187 179 static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
drivers/gpu/drm/exynos/exynos_drm_hdmi.c
... ... @@ -159,12 +159,12 @@
159 159 return drm_hdmi_check_mode_ctx(ctx, mode);
160 160 }
161 161  
162   -static int drm_hdmi_power_on(struct device *dev, int mode)
  162 +static int drm_hdmi_display_dpms(struct device *dev, int mode)
163 163 {
164 164 struct drm_hdmi_context *ctx = to_context(dev);
165 165  
166   - if (hdmi_ops && hdmi_ops->power_on)
167   - return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode);
  166 + if (hdmi_ops && hdmi_ops->dpms)
  167 + hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode);
168 168  
169 169 return 0;
170 170 }
... ... @@ -175,7 +175,7 @@
175 175 .is_connected = drm_hdmi_is_connected,
176 176 .get_edid = drm_hdmi_get_edid,
177 177 .check_mode = drm_hdmi_check_mode,
178   - .power_on = drm_hdmi_power_on,
  178 + .dpms = drm_hdmi_display_dpms,
179 179 };
180 180  
181 181 static int drm_hdmi_enable_vblank(struct exynos_drm_manager *mgr)
drivers/gpu/drm/exynos/exynos_drm_hdmi.h
... ... @@ -33,14 +33,13 @@
33 33 struct edid *(*get_edid)(void *ctx,
34 34 struct drm_connector *connector);
35 35 int (*check_mode)(void *ctx, struct drm_display_mode *mode);
36   - int (*power_on)(void *ctx, int mode);
  36 + void (*dpms)(void *ctx, int mode);
37 37  
38 38 /* manager */
39 39 void (*mode_set)(void *ctx, struct drm_display_mode *mode);
40 40 void (*get_max_resol)(void *ctx, unsigned int *width,
41 41 unsigned int *height);
42 42 void (*commit)(void *ctx);
43   - void (*dpms)(void *ctx, int mode);
44 43 };
45 44  
46 45 struct exynos_mixer_ops {
drivers/gpu/drm/exynos/exynos_drm_vidi.c
... ... @@ -136,20 +136,12 @@
136 136 return 0;
137 137 }
138 138  
139   -static int vidi_display_power_on(struct device *dev, int mode)
140   -{
141   - /* TODO */
142   -
143   - return 0;
144   -}
145   -
146 139 static struct exynos_drm_display_ops vidi_display_ops = {
147 140 .type = EXYNOS_DISPLAY_TYPE_VIDI,
148 141 .is_connected = vidi_display_is_connected,
149 142 .get_edid = vidi_get_edid,
150 143 .get_panel = vidi_get_panel,
151 144 .check_mode = vidi_check_mode,
152   - .power_on = vidi_display_power_on,
153 145 };
154 146  
155 147 static void vidi_dpms(struct exynos_drm_manager *mgr, int mode)
drivers/gpu/drm/exynos/exynos_hdmi.c
... ... @@ -1813,12 +1813,12 @@
1813 1813 .is_connected = hdmi_is_connected,
1814 1814 .get_edid = hdmi_get_edid,
1815 1815 .check_mode = hdmi_check_mode,
  1816 + .dpms = hdmi_dpms,
1816 1817  
1817 1818 /* manager */
1818 1819 .mode_set = hdmi_mode_set,
1819 1820 .get_max_resol = hdmi_get_max_resol,
1820 1821 .commit = hdmi_commit,
1821   - .dpms = hdmi_dpms,
1822 1822 };
1823 1823  
1824 1824 static irqreturn_t hdmi_irq_thread(int irq, void *arg)