This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN65DSI86: The screen suddenly went black during use, but there was still backlight

Part Number: SN65DSI86


Tool/software:

We use the SN65DSI86 product, which displays normally when powered on and the screen remains on for a long time. After using it for a period of time (maybe 30 minutes, maybe 3 hours or longer), the screen suddenly turns black and the backlight is normal. May I ask how to troubleshoot this situation, which registers need to be read to locate the problem, or which signals need to be measured?

  • Hi Haibin,

    For this case, I recommend performing the following procedure:

    • Register dump (all registers readback value) during normal operation 
    • Register dump during black screen with backlight still normal

    There are several diagnostic registers that are available in the device, which could help pinpoint which function (input/output protocol) is having issues during runtime.

    A direct comparison of these two logs would inform which configurations changed easily and what to focus on from there.

    Here's an example script:

    import time
    
    devReadAddress = 0x2C
    
    pages, registers = (1, 255)
    arr = [[0]*registers]*pages
    
    dateTime = time.strftime("%Y%m%d-%H%M%S")
    csv_name = 'PageDump' + str(devReadAddress) +'_'+  dateTime  + '.csv'
    f1=open(csv_name, 'w+')
    
    for x in range(-1,registers+1,1):
    	if x==-1:
    		f1.write(str("")+",")
    	else:
    		val = hex(x)
    		#print val,
    		f1.write(str(val)+",")
    #print ""
    f1.write("\r")
    
    for x in range(-1,registers+1,1):
    	if x==-1:
    		f1.write("MainPage"+",")
    	else:
    		val = hex(board.ReadI2C(devReadAddress,x))
    		#print val,
    		f1.write(str(val)+",")
    print "Main Page Done"
    #print ""
    f1.write("\r")
    
    for y in range(1,pages+1,1):
    	board.WriteI2C(devReadAddress,0x40,y*4+3)
    	board.WriteI2C(devReadAddress,0x41,0x00)
    	for x in range(-1,registers+1,1):
    		if x==-1:
    			#print 'Page'+str(y),
    			f1.write("Page"+str(y)+",")
    		else:
    			val=board.ReadI2C(devReadAddress,0x42,1)
    			#print hex(val),
    			f1.write(str(hex(val)) + ",")
    	#print ""
    	print 'Page',y,' Complete'
    	f1.write("\r")
    f1.flush()
    f1.close()
    print "Complete"
    

    Could you also provide any additional conditions during the testing, if any?

    Thanks,

    Miguel

  • Black.csvOK.csv

    The attachment OK.csv shows the dump information when displayed normally, while black.csv shows the dump information when the screen is black.

    sn65dsi86 initial code:

    int sn65dsi86_init(void)
    {
    	sn65dsi86_write(0x09, 0x00); // SW Reset
    	sn65dsi86_write(0x0A, 0x09); // DACP/N CLOCK FREQ 460.8MHz
    	sn65dsi86_write(0x0D, 0x00); // PLL DISABLE
    	sn65dsi86_write(0x10, 0x26); // Single channel DSI receiver A, DSIA 4Lanes
    	sn65dsi86_write(0x11, 0x00); // CHA/B DSI DATA/CLK EQ
    	sn65dsi86_write(0x12, 0x59); // DSIA CLK FREQ 445~450MHz
    
    	sn65dsi86_write(0x5A, 0x05); // enhanced framing and ASSR
    	sn65dsi86_write(0x93, 0x20); // 2 DP lanes no SSC
    	sn65dsi86_write(0x94, 0x80); // HBR (2.7Gbps)
    	sn65dsi86_write(0x5C, 0x01); // HPD DISABLE
    
    	sn65dsi86_write(0x0D, 0x01); // PLL ENABLE
        mdelay(15);
    
    	sn65dsi86_write(0x95, 0x00);
        /* Write DPCD Register 0x0010A in Sink to Enable ASSR */
    	sn65dsi86_write(0x64, 0x01);
    	sn65dsi86_write(0x74, 0x00, 0x01, 0x0A); // AUX_ADDR: 0x00010A
    	sn65dsi86_write(0x77, 0x01); // AUX_LENGTH: 1
    	sn65dsi86_write(0x78, 0x81); // AUX_CMD: 0x8(Native Aux Write), SEND:0x1
    	mdelay(10);
    
        sn65dsi86_write(0x96, 0x0A); // 0x01: Normal TRAIN, 0x0A: Semi-Auto TRAIN
    	mdelay(20);
    
        /* W = 1920(0x0780) */
    	sn65dsi86_write(0x20, 0x80, 0x07);
        /* H = 1080(0x0438) */
    	sn65dsi86_write(0x24, 0x38, 0x04);
        /* HS = 44(0x002C) */
    	sn65dsi86_write(0x2C, 0x2C, 0x00);
        /* VS = 5 , CHA_VSYNC_POLARITY active low Pulse */
    	sn65dsi86_write(0x30, 0x05, 0x00);
        /* HBP = 148 */
    	sn65dsi86_write(0x34, 0x94);
        /* VBP = 36 */
    	sn65dsi86_write(0x36, 0x24);
        /* HFP = 88 */
    	sn65dsi86_write(0x38, 0x58);
        /* VFP = 4 */
    	sn65dsi86_write(0x3A, 0x04);
        sn65dsi86_write(0x5A, 0x0D); // enhanced framing, ASSR, and Vstream enable
    
        mdelay(10);
        return 0;
    }

  • Haibin,

    Thanks for providing this detailed information.

    From the register logs I can only see one difference between these DP registers, the MDIV is different for the CSR:

    0x40 = 0xCD (205d) --> 0x40 = 0xD2 (210)

    This is seen from the DisplayPort perspective.

    I can only imagine this runtime issue occurs after some clock delay or frequency shifting since the MDIV value changes, is there any diagnostics from the source side or sink display that indicates any timings are changed?

    Can you try setting this MDIV to the normal log value (0xCD) and see if the screen will blank after the given duration?

    Best,

    Miguel

  • Thanks for your reply!

    I reported this phenomenon to the screen factory, and they measured that the eDP main link frequency was 2.62G, which does not comply with VESA specifications. Then I adjusted the MIPI clock (HS/HBP/HFP/VS/VBP/VFP, etc.), and changed the 0x12 register from 0x59 to 0x5A. The measured eDP main link frequency was 2.64G, and the black screen phenomenon did not reappear, but still did not meet the VESA specification of 2.7G, which may still pose a risk. The 0x94 register of sn65dsi86 has been confirmed to be set to 2.7G (corresponding to a register value of 0x80). How can I ensure that the output main link frequency of sn65dsi86 is 2.7G?

    The modified initialization code is as follows:

    int sn65dsi86_init(void)
    {
    	sn65dsi86_write(0x09, 0x00); // SW Reset
    	sn65dsi86_write(0x0A, 0x09); // DACP/N CLOCK FREQ 460.8MHz
    	sn65dsi86_write(0x0D, 0x00); // PLL DISABLE
    	sn65dsi86_write(0x10, 0x26); // Single channel DSI receiver A, DSIA 4Lanes
    	sn65dsi86_write(0x11, 0x00); // CHA/B DSI DATA/CLK EQ
    	sn65dsi86_write(0x12, 0x5A); // DSIA CLK FREQ 450~455MHz
    
    	sn65dsi86_write(0x5A, 0x05); // enhanced framing and ASSR
    	sn65dsi86_write(0x93, 0x20); // 2 DP lanes no SSC
    	sn65dsi86_write(0x94, 0x80); // HBR (2.7Gbps)
    	sn65dsi86_write(0x5C, 0x01); // HPD DISABLE
    
        /* W = 1920(0x0780) */
    	sn65dsi86_write(0x20, 0x80, 0x07);
        /* H = 1080(0x0438) */
    	sn65dsi86_write(0x24, 0x38, 0x04);
        /* HS = 44(0x002C) */
    	sn65dsi86_write(0x2C, 0x2C, 0x00);
        /* VS = 8 , CHA_VSYNC_POLARITY active low Pulse */
    	sn65dsi86_write(0x30, 0x08, 0x00);
        /* HBP = 148 */
    	sn65dsi86_write(0x34, 0x94);
        /* VBP = 27 */
    	sn65dsi86_write(0x36, 0x1b);
        /* HFP = 88 */
    	sn65dsi86_write(0x38, 0x58);
        /* VFP = 20 */
    	sn65dsi86_write(0x3A, 0x14);
    
    	sn65dsi86_write(0x0D, 0x01); // PLL ENABLE
        sunxi_lcd_delay_ms(20);
    
    	sn65dsi86_write(0x95, 0x00);
        /* Write DPCD Register 0x0010A in Sink to Enable ASSR */
    	sn65dsi86_write(0x64, 0x01);
    	sn65dsi86_write(0x74, 0x00, 0x01, 0x0A); // AUX_ADDR: 0x00010A
    	sn65dsi86_write(0x77, 0x01); // AUX_LENGTH: 1
    	sn65dsi86_write(0x78, 0x81); // AUX_CMD: 0x8(Native Aux Write), SEND:0x1
    	sunxi_lcd_delay_ms(40);
    
        sn65dsi86_write(0x96, 0x0A); // 0x01: Normal TRAIN, 0x0A: Semi-Auto TRAIN
    	sunxi_lcd_delay_ms(20);
    
        sn65dsi86_write(0x5A, 0x0D); // enhanced framing, ASSR, and Vstream enable
    
        return 0;
    }

  • Haibin,

    measured that the eDP main link frequency was 2.62G, which does not comply with VESA specifications.

    This is a good finding. I agree that the rate mismatch could still potentially pose a risk, so let's take a look at the configuration changes that were made;

    and changed the 0x12 register from 0x59 to 0x5A

    This changes the incoming DSI clock frequency estimated range from 445-450 MHz to 450-455 MHz, but the register 0x0A = 0x09 indicates the clock should be set to 460.8 MHz

    Maybe setting the incoming DSI clock frequency to 0x5C (460-465 MHz) will improve this output data rate even further. It makes sense that matching the rate closer allows the screen to restore based on the incoming clock passthrough.

    How can I ensure that the output main link frequency of sn65dsi86 is 2.7G?

    I don't see diagnostic registers to capture the DP data rate internally, but the DP_DATARATE is configured to 2.7 Gbps (HBR pattern), one option is to measure the waveform and ensure the EYE on the DP traces to ensure it is compliant with eDP 1.4 specificaiton.

    Please let me know if you have any further questions.

    Best,

    Miguel