From d2face3acebbf895127f32e78cebd24bf526f860 Mon Sep 17 00:00:00 2001 From: yzq Date: Mon, 7 May 2012 16:06:24 +0800 Subject: [PATCH] rk610:fix bug DVI and HDMI mode switch err --- drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.c | 5 ++++- drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.c b/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.c index d3c72aca9e09..bdfe2aed5c90 100644 --- a/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.c +++ b/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.c @@ -955,7 +955,10 @@ static int Rk610_hdmi_Display_switch(struct i2c_client *client) int mode; mode = (g_edid.HDMI_Sink == TRUE)? DISPLAY_HDMI:DISPLAY_DVI; ret = Rk610_hdmi_i2c_read_p0_reg(client, 0x52, &c); - c &= ((~(1<<1))| mode<<1); + if(mode == DISPLAY_HDMI) + c |= DISPLAY_MODE; + else + c &= ~DISPLAY_MODE; ret = Rk610_hdmi_i2c_write_p0_reg(client, 0x52, &c); RK610_DBG(&client->dev,">>>%s mode=%d,c=%x",__func__,mode,c); return ret; diff --git a/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.h b/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.h index bc84f151fa30..15a5014568fb 100644 --- a/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.h +++ b/drivers/video/hdmi/chips/rk610/rk610_hdmi_hw.h @@ -97,7 +97,7 @@ enum{ //output mode 0x52 #define DISPLAY_DVI 0 #define DISPLAY_HDMI 1 - +#define DISPLAY_MODE (1<<1) //0x00 #define RK610_INT_POL 1 #define RK610_SYS_PWR_ON 0 -- 2.34.1