Commit 54c40ded authored by Sean Paul's avatar Sean Paul Committed by Inki Dae

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: default avatarSean Paul <seanpaul@chromium.org>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent e5b89916
...@@ -128,7 +128,7 @@ struct exynos_drm_overlay { ...@@ -128,7 +128,7 @@ struct exynos_drm_overlay {
* @get_edid: get edid modes from display driver. * @get_edid: get edid modes from display driver.
* @get_panel: get panel object from display driver. * @get_panel: get panel object from display driver.
* @check_mode: check if mode is valid or not. * @check_mode: check if mode is valid or not.
* @power_on: display device on or off. * @dpms: display device on or off.
*/ */
struct exynos_drm_display_ops { struct exynos_drm_display_ops {
enum exynos_drm_output_type type; enum exynos_drm_output_type type;
...@@ -138,7 +138,7 @@ struct exynos_drm_display_ops { ...@@ -138,7 +138,7 @@ struct exynos_drm_display_ops {
struct drm_connector *connector); struct drm_connector *connector);
void *(*get_panel)(struct device *dev); void *(*get_panel)(struct device *dev);
int (*check_mode)(struct device *dev, struct drm_display_mode *mode); int (*check_mode)(struct device *dev, struct drm_display_mode *mode);
int (*power_on)(struct device *dev, int mode); int (*dpms)(struct device *dev, int mode);
}; };
/* /*
......
...@@ -50,8 +50,8 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode) ...@@ -50,8 +50,8 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
return; return;
} }
if (display_ops && display_ops->power_on) if (display_ops && display_ops->dpms)
display_ops->power_on(manager->ctx, mode); display_ops->dpms(manager->ctx, mode);
exynos_encoder->dpms = mode; exynos_encoder->dpms = mode;
} }
......
...@@ -169,19 +169,11 @@ static int fimd_check_mode(struct device *dev, struct drm_display_mode *mode) ...@@ -169,19 +169,11 @@ static int fimd_check_mode(struct device *dev, struct drm_display_mode *mode)
return 0; return 0;
} }
static int fimd_display_power_on(struct device *dev, int mode)
{
/* TODO */
return 0;
}
static struct exynos_drm_display_ops fimd_display_ops = { static struct exynos_drm_display_ops fimd_display_ops = {
.type = EXYNOS_DISPLAY_TYPE_LCD, .type = EXYNOS_DISPLAY_TYPE_LCD,
.is_connected = fimd_display_is_connected, .is_connected = fimd_display_is_connected,
.get_panel = fimd_get_panel, .get_panel = fimd_get_panel,
.check_mode = fimd_check_mode, .check_mode = fimd_check_mode,
.power_on = fimd_display_power_on,
}; };
static int fimd_mgr_initialize(struct exynos_drm_manager *mgr, static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
......
...@@ -159,12 +159,12 @@ static int drm_hdmi_check_mode(struct device *dev, ...@@ -159,12 +159,12 @@ static int drm_hdmi_check_mode(struct device *dev,
return drm_hdmi_check_mode_ctx(ctx, mode); return drm_hdmi_check_mode_ctx(ctx, mode);
} }
static int drm_hdmi_power_on(struct device *dev, int mode) static int drm_hdmi_display_dpms(struct device *dev, int mode)
{ {
struct drm_hdmi_context *ctx = to_context(dev); struct drm_hdmi_context *ctx = to_context(dev);
if (hdmi_ops && hdmi_ops->power_on) if (hdmi_ops && hdmi_ops->dpms)
return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode); hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode);
return 0; return 0;
} }
...@@ -175,7 +175,7 @@ static struct exynos_drm_display_ops drm_hdmi_display_ops = { ...@@ -175,7 +175,7 @@ static struct exynos_drm_display_ops drm_hdmi_display_ops = {
.is_connected = drm_hdmi_is_connected, .is_connected = drm_hdmi_is_connected,
.get_edid = drm_hdmi_get_edid, .get_edid = drm_hdmi_get_edid,
.check_mode = drm_hdmi_check_mode, .check_mode = drm_hdmi_check_mode,
.power_on = drm_hdmi_power_on, .dpms = drm_hdmi_display_dpms,
}; };
static int drm_hdmi_enable_vblank(struct exynos_drm_manager *mgr) static int drm_hdmi_enable_vblank(struct exynos_drm_manager *mgr)
......
...@@ -33,14 +33,13 @@ struct exynos_hdmi_ops { ...@@ -33,14 +33,13 @@ struct exynos_hdmi_ops {
struct edid *(*get_edid)(void *ctx, struct edid *(*get_edid)(void *ctx,
struct drm_connector *connector); struct drm_connector *connector);
int (*check_mode)(void *ctx, struct drm_display_mode *mode); int (*check_mode)(void *ctx, struct drm_display_mode *mode);
int (*power_on)(void *ctx, int mode); void (*dpms)(void *ctx, int mode);
/* manager */ /* manager */
void (*mode_set)(void *ctx, struct drm_display_mode *mode); void (*mode_set)(void *ctx, struct drm_display_mode *mode);
void (*get_max_resol)(void *ctx, unsigned int *width, void (*get_max_resol)(void *ctx, unsigned int *width,
unsigned int *height); unsigned int *height);
void (*commit)(void *ctx); void (*commit)(void *ctx);
void (*dpms)(void *ctx, int mode);
}; };
struct exynos_mixer_ops { struct exynos_mixer_ops {
......
...@@ -136,20 +136,12 @@ static int vidi_check_mode(struct device *dev, struct drm_display_mode *mode) ...@@ -136,20 +136,12 @@ static int vidi_check_mode(struct device *dev, struct drm_display_mode *mode)
return 0; return 0;
} }
static int vidi_display_power_on(struct device *dev, int mode)
{
/* TODO */
return 0;
}
static struct exynos_drm_display_ops vidi_display_ops = { static struct exynos_drm_display_ops vidi_display_ops = {
.type = EXYNOS_DISPLAY_TYPE_VIDI, .type = EXYNOS_DISPLAY_TYPE_VIDI,
.is_connected = vidi_display_is_connected, .is_connected = vidi_display_is_connected,
.get_edid = vidi_get_edid, .get_edid = vidi_get_edid,
.get_panel = vidi_get_panel, .get_panel = vidi_get_panel,
.check_mode = vidi_check_mode, .check_mode = vidi_check_mode,
.power_on = vidi_display_power_on,
}; };
static void vidi_dpms(struct exynos_drm_manager *mgr, int mode) static void vidi_dpms(struct exynos_drm_manager *mgr, int mode)
......
...@@ -1813,12 +1813,12 @@ static struct exynos_hdmi_ops hdmi_ops = { ...@@ -1813,12 +1813,12 @@ static struct exynos_hdmi_ops hdmi_ops = {
.is_connected = hdmi_is_connected, .is_connected = hdmi_is_connected,
.get_edid = hdmi_get_edid, .get_edid = hdmi_get_edid,
.check_mode = hdmi_check_mode, .check_mode = hdmi_check_mode,
.dpms = hdmi_dpms,
/* manager */ /* manager */
.mode_set = hdmi_mode_set, .mode_set = hdmi_mode_set,
.get_max_resol = hdmi_get_max_resol, .get_max_resol = hdmi_get_max_resol,
.commit = hdmi_commit, .commit = hdmi_commit,
.dpms = hdmi_dpms,
}; };
static irqreturn_t hdmi_irq_thread(int irq, void *arg) static irqreturn_t hdmi_irq_thread(int irq, void *arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment