diff options
author | Mark Yao <mark.yao@rock-chips.com> | 2016-04-20 10:41:42 +0800 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2016-05-03 14:11:23 +0800 |
commit | 4e257d9eee23582e36637ce7ea6b14f6f56b1839 (patch) | |
tree | f0e468f54da21d6f0561ca5313d5d73fbc773d91 /drivers/gpu/drm/rockchip/inno_hdmi.c | |
parent | 2743becb3338cf012dbe7b70c6c39bbac81cc101 (diff) | |
download | blackbird-op-linux-4e257d9eee23582e36637ce7ea6b14f6f56b1839.tar.gz blackbird-op-linux-4e257d9eee23582e36637ce7ea6b14f6f56b1839.zip |
drm/rockchip: get rid of rockchip_drm_crtc_mode_config
We need to take care of the vop status when use
rockchip_drm_crtc_mode_config, if vop is disabled,
the function would failed, that is terrible.
Save output_type and output_mode into rockchip_crtc_state,
it's nice to make them into atomic.
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Tested-by: John Keeping <john@metanate.com>
Diffstat (limited to 'drivers/gpu/drm/rockchip/inno_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/rockchip/inno_hdmi.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index f25244199626..f8b4feb60b25 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -500,9 +500,6 @@ static void inno_hdmi_encoder_enable(struct drm_encoder *encoder) { struct inno_hdmi *hdmi = to_inno_hdmi(encoder); - rockchip_drm_crtc_mode_config(encoder->crtc, DRM_MODE_CONNECTOR_HDMIA, - ROCKCHIP_OUT_MODE_P888); - inno_hdmi_set_pwr_mode(hdmi, NORMAL); } @@ -520,11 +517,25 @@ static bool inno_hdmi_encoder_mode_fixup(struct drm_encoder *encoder, return true; } +static int +inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state); + + s->output_mode = ROCKCHIP_OUT_MODE_P888; + s->output_type = DRM_MODE_CONNECTOR_HDMIA; + + return 0; +} + static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = { .enable = inno_hdmi_encoder_enable, .disable = inno_hdmi_encoder_disable, .mode_fixup = inno_hdmi_encoder_mode_fixup, .mode_set = inno_hdmi_encoder_mode_set, + .atomic_check = inno_hdmi_encoder_atomic_check, }; static struct drm_encoder_funcs inno_hdmi_encoder_funcs = { |