Commit bebdf664 authored by Russell King's avatar Russell King

imx-drm: imx-hdmi: clean up setting of vp_conf

Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 812bc615
...@@ -555,7 +555,7 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) ...@@ -555,7 +555,7 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi)
unsigned int remap_size = HDMI_VP_REMAP_YCC422_16bit; unsigned int remap_size = HDMI_VP_REMAP_YCC422_16bit;
unsigned int output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_PP; unsigned int output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_PP;
struct hdmi_data_info *hdmi_data = &hdmi->hdmi_data; struct hdmi_data_info *hdmi_data = &hdmi->hdmi_data;
u8 val; u8 val, vp_conf;
if (hdmi_data->enc_out_format == RGB if (hdmi_data->enc_out_format == RGB
|| hdmi_data->enc_out_format == YCBCR444) { || hdmi_data->enc_out_format == YCBCR444) {
...@@ -599,47 +599,42 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) ...@@ -599,47 +599,42 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi)
/* Data from pixel repeater block */ /* Data from pixel repeater block */
if (hdmi_data->pix_repet_factor > 1) { if (hdmi_data->pix_repet_factor > 1) {
hdmi_modb(hdmi, HDMI_VP_CONF_PR_EN_ENABLE | vp_conf = HDMI_VP_CONF_PR_EN_ENABLE |
HDMI_VP_CONF_BYPASS_SELECT_PIX_REPEATER, HDMI_VP_CONF_BYPASS_SELECT_PIX_REPEATER;
HDMI_VP_CONF_PR_EN_MASK |
HDMI_VP_CONF_BYPASS_SELECT_MASK, HDMI_VP_CONF);
} else { /* data from packetizer block */ } else { /* data from packetizer block */
hdmi_modb(hdmi, HDMI_VP_CONF_PR_EN_DISABLE | vp_conf = HDMI_VP_CONF_PR_EN_DISABLE |
HDMI_VP_CONF_BYPASS_SELECT_VID_PACKETIZER, HDMI_VP_CONF_BYPASS_SELECT_VID_PACKETIZER;
HDMI_VP_CONF_PR_EN_MASK |
HDMI_VP_CONF_BYPASS_SELECT_MASK, HDMI_VP_CONF);
} }
hdmi_modb(hdmi, vp_conf,
HDMI_VP_CONF_PR_EN_MASK |
HDMI_VP_CONF_BYPASS_SELECT_MASK, HDMI_VP_CONF);
hdmi_modb(hdmi, 1 << HDMI_VP_STUFF_IDEFAULT_PHASE_OFFSET, hdmi_modb(hdmi, 1 << HDMI_VP_STUFF_IDEFAULT_PHASE_OFFSET,
HDMI_VP_STUFF_IDEFAULT_PHASE_MASK, HDMI_VP_STUFF); HDMI_VP_STUFF_IDEFAULT_PHASE_MASK, HDMI_VP_STUFF);
hdmi_writeb(hdmi, remap_size, HDMI_VP_REMAP); hdmi_writeb(hdmi, remap_size, HDMI_VP_REMAP);
if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_PP) { if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_PP) {
hdmi_modb(hdmi, HDMI_VP_CONF_BYPASS_EN_DISABLE | vp_conf = HDMI_VP_CONF_BYPASS_EN_DISABLE |
HDMI_VP_CONF_PP_EN_ENABLE | HDMI_VP_CONF_PP_EN_ENABLE |
HDMI_VP_CONF_YCC422_EN_DISABLE, HDMI_VP_CONF_YCC422_EN_DISABLE;
HDMI_VP_CONF_BYPASS_EN_MASK |
HDMI_VP_CONF_PP_EN_ENMASK |
HDMI_VP_CONF_YCC422_EN_MASK, HDMI_VP_CONF);
} else if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_YCC422) { } else if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_YCC422) {
hdmi_modb(hdmi, HDMI_VP_CONF_BYPASS_EN_DISABLE | vp_conf = HDMI_VP_CONF_BYPASS_EN_DISABLE |
HDMI_VP_CONF_PP_EN_DISABLE | HDMI_VP_CONF_PP_EN_DISABLE |
HDMI_VP_CONF_YCC422_EN_ENABLE, HDMI_VP_CONF_YCC422_EN_ENABLE;
HDMI_VP_CONF_BYPASS_EN_MASK |
HDMI_VP_CONF_PP_EN_ENMASK |
HDMI_VP_CONF_YCC422_EN_MASK, HDMI_VP_CONF);
} else if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS) { } else if (output_select == HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS) {
hdmi_modb(hdmi, HDMI_VP_CONF_BYPASS_EN_ENABLE | vp_conf = HDMI_VP_CONF_BYPASS_EN_ENABLE |
HDMI_VP_CONF_PP_EN_DISABLE | HDMI_VP_CONF_PP_EN_DISABLE |
HDMI_VP_CONF_YCC422_EN_DISABLE, HDMI_VP_CONF_YCC422_EN_DISABLE;
HDMI_VP_CONF_BYPASS_EN_MASK |
HDMI_VP_CONF_PP_EN_ENMASK |
HDMI_VP_CONF_YCC422_EN_MASK, HDMI_VP_CONF);
} else { } else {
return; return;
} }
hdmi_modb(hdmi, vp_conf,
HDMI_VP_CONF_BYPASS_EN_MASK | HDMI_VP_CONF_PP_EN_ENMASK |
HDMI_VP_CONF_YCC422_EN_MASK, HDMI_VP_CONF);
hdmi_modb(hdmi, HDMI_VP_STUFF_PP_STUFFING_STUFFING_MODE | hdmi_modb(hdmi, HDMI_VP_STUFF_PP_STUFFING_STUFFING_MODE |
HDMI_VP_STUFF_YCC422_STUFFING_STUFFING_MODE, HDMI_VP_STUFF_YCC422_STUFFING_STUFFING_MODE,
HDMI_VP_STUFF_PP_STUFFING_MASK | HDMI_VP_STUFF_PP_STUFFING_MASK |
......
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