Skip to content

Commit bb4954c

Browse files
Andrzej Hajdaboddob
authored andcommitted
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: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1485935272-17337-3-git-send-email-a.hajda@samsung.com
1 parent dd12312 commit bb4954c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/gpu/drm/bridge/sil-sii8620.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ static void sii8620_setbits(struct sii8620 *ctx, u16 addr, u8 mask, u8 val)
227227
sii8620_write(ctx, addr, val);
228228
}
229229

230+
static inline bool sii8620_is_mhl3(struct sii8620 *ctx)
231+
{
232+
return ctx->mode >= CM_MHL3;
233+
}
234+
230235
static void sii8620_mt_cleanup(struct sii8620 *ctx)
231236
{
232237
struct sii8620_mt_msg *msg, *n;
@@ -724,7 +729,7 @@ static void sii8620_start_hdmi(struct sii8620 *ctx)
724729

725730
static void sii8620_start_video(struct sii8620 *ctx)
726731
{
727-
if (ctx->mode < CM_MHL3)
732+
if (!sii8620_is_mhl3(ctx))
728733
sii8620_stop_video(ctx);
729734

730735
switch (ctx->sink_type) {
@@ -838,7 +843,7 @@ static void sii8620_mhl_discover(struct sii8620 *ctx)
838843

839844
static void sii8620_peer_specific_init(struct sii8620 *ctx)
840845
{
841-
if (ctx->mode == CM_MHL3)
846+
if (sii8620_is_mhl3(ctx))
842847
sii8620_write_seq_static(ctx,
843848
REG_SYS_CTRL1, BIT_SYS_CTRL1_BLOCK_DDC_BY_HPD,
844849
REG_EMSCINTRMASK1,

0 commit comments

Comments
 (0)