Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge/sii8620: improve gen2 write burst IRQ routine

The patch adds code to report back feature complete IRQ, and code
to read and drop burst writes from peer.

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-23-git-send-email-a.hajda@samsung.com

authored by

Andrzej Hajda and committed by
Archit Taneja
581a9237 269ed8ee

+20 -1
+20 -1
drivers/gpu/drm/bridge/sil-sii8620.c
··· 1605 1605 sii8620_write(ctx, REG_CBUS_DISC_INTR0, stat); 1606 1606 } 1607 1607 1608 + static void sii8620_read_burst(struct sii8620 *ctx) 1609 + { 1610 + u8 buf[17]; 1611 + 1612 + sii8620_read_buf(ctx, REG_MDT_RCV_READ_PORT, buf, ARRAY_SIZE(buf)); 1613 + sii8620_write(ctx, REG_MDT_RCV_CTRL, BIT_MDT_RCV_CTRL_MDT_RCV_EN | 1614 + BIT_MDT_RCV_CTRL_MDT_DELAY_RCV_EN | 1615 + BIT_MDT_RCV_CTRL_MDT_RFIFO_CLR_CUR); 1616 + sii8620_readb(ctx, REG_MDT_RFIFO_STAT); 1617 + } 1618 + 1608 1619 static void sii8620_irq_g2wb(struct sii8620 *ctx) 1609 1620 { 1610 1621 u8 stat = sii8620_readb(ctx, REG_MDT_INT_0); 1611 1622 1612 1623 if (stat & BIT_MDT_IDLE_AFTER_HAWB_DISABLE) 1613 - dev_dbg(ctx->dev, "HAWB idle\n"); 1624 + if (sii8620_is_mhl3(ctx)) 1625 + sii8620_mt_set_int(ctx, MHL_INT_REG(RCHANGE), 1626 + MHL_INT_RC_FEAT_COMPLETE); 1627 + 1628 + if (stat & BIT_MDT_RFIFO_DATA_RDY) 1629 + sii8620_read_burst(ctx); 1630 + 1631 + if (stat & BIT_MDT_XFIFO_EMPTY) 1632 + sii8620_write(ctx, REG_MDT_XMIT_CTRL, 0); 1614 1633 1615 1634 sii8620_write(ctx, REG_MDT_INT_0, stat); 1616 1635 }