diff options
author | Mark Yao <mark.yao@rock-chips.com> | 2015-11-30 05:41:06 -0500 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2015-12-27 19:57:16 -0500 |
commit | a8eef71d38da2bb03e187d3284aac6d3e0540f0f (patch) | |
tree | ccdad751c1187d2f92f2f6ea33f7a58a3cfae833 | |
parent | 2c5b2cccdbde278fb702893404a2ea20f81f0345 (diff) |
drm/rockchip: dw_hdmi: use encoder enable function
encoder.enable is more compatible to atomic api than encoder.prepare/commit
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
-rw-r--r-- | drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index bddcabd7a370..c65ce8cb30d3 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | |||
@@ -195,12 +195,15 @@ static void dw_hdmi_rockchip_encoder_mode_set(struct drm_encoder *encoder, | |||
195 | { | 195 | { |
196 | } | 196 | } |
197 | 197 | ||
198 | static void dw_hdmi_rockchip_encoder_commit(struct drm_encoder *encoder) | 198 | static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder) |
199 | { | 199 | { |
200 | struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder); | 200 | struct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder); |
201 | u32 val; | 201 | u32 val; |
202 | int mux; | 202 | int mux; |
203 | 203 | ||
204 | rockchip_drm_crtc_mode_config(encoder->crtc, DRM_MODE_CONNECTOR_HDMIA, | ||
205 | ROCKCHIP_OUT_MODE_AAAA); | ||
206 | |||
204 | mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder); | 207 | mux = rockchip_drm_encoder_get_mux_id(hdmi->dev->of_node, encoder); |
205 | if (mux) | 208 | if (mux) |
206 | val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16); | 209 | val = HDMI_SEL_VOP_LIT | (HDMI_SEL_VOP_LIT << 16); |
@@ -212,17 +215,10 @@ static void dw_hdmi_rockchip_encoder_commit(struct drm_encoder *encoder) | |||
212 | (mux) ? "LIT" : "BIG"); | 215 | (mux) ? "LIT" : "BIG"); |
213 | } | 216 | } |
214 | 217 | ||
215 | static void dw_hdmi_rockchip_encoder_prepare(struct drm_encoder *encoder) | ||
216 | { | ||
217 | rockchip_drm_crtc_mode_config(encoder->crtc, DRM_MODE_CONNECTOR_HDMIA, | ||
218 | ROCKCHIP_OUT_MODE_AAAA); | ||
219 | } | ||
220 | |||
221 | static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { | 218 | static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { |
222 | .mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup, | 219 | .mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup, |
223 | .mode_set = dw_hdmi_rockchip_encoder_mode_set, | 220 | .mode_set = dw_hdmi_rockchip_encoder_mode_set, |
224 | .prepare = dw_hdmi_rockchip_encoder_prepare, | 221 | .enable = dw_hdmi_rockchip_encoder_enable, |
225 | .commit = dw_hdmi_rockchip_encoder_commit, | ||
226 | .disable = dw_hdmi_rockchip_encoder_disable, | 222 | .disable = dw_hdmi_rockchip_encoder_disable, |
227 | }; | 223 | }; |
228 | 224 | ||