Commit bb4954c7 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Archit Taneja

drm/bridge/sii8620: add MHL3 mode check helper

MHL3 modes differs significantly from MHL1 mode, this helper will be used
frequently to clearly distinguish them.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-3-git-send-email-a.hajda@samsung.com
parent dd123129
...@@ -227,6 +227,11 @@ static void sii8620_setbits(struct sii8620 *ctx, u16 addr, u8 mask, u8 val) ...@@ -227,6 +227,11 @@ static void sii8620_setbits(struct sii8620 *ctx, u16 addr, u8 mask, u8 val)
sii8620_write(ctx, addr, val); sii8620_write(ctx, addr, val);
} }
static inline bool sii8620_is_mhl3(struct sii8620 *ctx)
{
return ctx->mode >= CM_MHL3;
}
static void sii8620_mt_cleanup(struct sii8620 *ctx) static void sii8620_mt_cleanup(struct sii8620 *ctx)
{ {
struct sii8620_mt_msg *msg, *n; struct sii8620_mt_msg *msg, *n;
...@@ -724,7 +729,7 @@ static void sii8620_start_hdmi(struct sii8620 *ctx) ...@@ -724,7 +729,7 @@ static void sii8620_start_hdmi(struct sii8620 *ctx)
static void sii8620_start_video(struct sii8620 *ctx) static void sii8620_start_video(struct sii8620 *ctx)
{ {
if (ctx->mode < CM_MHL3) if (!sii8620_is_mhl3(ctx))
sii8620_stop_video(ctx); sii8620_stop_video(ctx);
switch (ctx->sink_type) { switch (ctx->sink_type) {
...@@ -838,7 +843,7 @@ static void sii8620_mhl_discover(struct sii8620 *ctx) ...@@ -838,7 +843,7 @@ static void sii8620_mhl_discover(struct sii8620 *ctx)
static void sii8620_peer_specific_init(struct sii8620 *ctx) static void sii8620_peer_specific_init(struct sii8620 *ctx)
{ {
if (ctx->mode == CM_MHL3) if (sii8620_is_mhl3(ctx))
sii8620_write_seq_static(ctx, sii8620_write_seq_static(ctx,
REG_SYS_CTRL1, BIT_SYS_CTRL1_BLOCK_DDC_BY_HPD, REG_SYS_CTRL1, BIT_SYS_CTRL1_BLOCK_DDC_BY_HPD,
REG_EMSCINTRMASK1, REG_EMSCINTRMASK1,
......
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