Improve eye-diagram & single-ended test for rk3288 hdmi
Subsystems (6)
v3 cover Improve eye-diagram & single-ended test for rk3288 hdmi
RK3288 hdmi eye-diagram test would fail when pixel clock is 148.5MHz, and single-ended test would failed when display mode is 74.25MHz.
To fix such problems, we make those patch set:
- Fix some code style, leave space for next patches.
- For hdmi eye-diagram test, we turn on the Transmitter Trailer-B and improve slopeboost to 10%-20% decrease.
- For hdmi single-ended test, set CKLVL to 18 and TXLVL to 19 when pixel clock is 74.25MHz. set CKLVL to 13 and TXLVL to 13 when pixel clock is 148.5MHz.
Changes in v3:
- make commit message more readable
- For pixel clock less than 148.5MHz, set txlvl to 20.
Changes in v2:
- Set slopeboost back to 10%-20%, then rasing/falling time would pass.
- For pixel clock less than 74.25MHz, set txlvl to 19 and set cklvl to 18.
Yakir Yang (3):
drm: bridge/dw_hdmi: fixed codec style
drm: bridge/dw_hdmi_rockchip: improve hdmi eye-diagram test
drm: bridge/dw_hdmi: improve hdmi single-end test
drivers/gpu/drm/bridge/dw_hdmi.c | 20 ++++++++++---------- drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 ++++++------ drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 14 +++++++------- include/drm/bridge/dw_hdmi.h | 5 +++-- 4 files changed, 26 insertions(+), 25 deletions(-)
Signature · 1 line
2.1.2
PATCH v3 1/3 drm: bridge/dw_hdmi: fixed codec style
Using a local struct pointer to reduce one level of indirection makes the code slightly more readable.
---
Changes in v3:
- make commit message more readable
Changes in v2: None
drivers/gpu/drm/bridge/dw_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/bridge/dw_hdmi.c +4 -4
@@ -900,10 +900,10 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep, {unsigned res_idx, i;u8 val, msec; -const struct dw_hdmi_mpll_config *mpll_config = - hdmi->plat_data->mpll_cfg; -const struct dw_hdmi_curr_ctrl *curr_ctrl = hdmi->plat_data->cur_ctr; -const struct dw_hdmi_sym_term *sym_term = hdmi->plat_data->sym_term; +const struct dw_hdmi_plat_data *plat_data = hdmi->plat_data; +const struct dw_hdmi_mpll_config *mpll_config = plat_data->mpll_cfg; +const struct dw_hdmi_curr_ctrl *curr_ctrl = plat_data->cur_ctr; +const struct dw_hdmi_sym_term *sym_term = plat_data->sym_term;if (prep)return -EINVAL ;
Signature · 1 line
2.1.2
PATCH v3 2/3 drm: bridge/dw_hdmi_rockchip: improve hdmi eye-diagram test
In reply to Yakir YangAs for 1920x1080 display resolution, we should turn on the Transmitter Trailer-B.
---
Changes in v3: None
Changes in v2:
- Set slopeboost back to 10%-20%, then rasing/falling time would pass.
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +1 -1
@@ -142,7 +142,7 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {static const struct dw_hdmi_sym_term rockchip_sym_term[] = {/*pixelclk symbol term*/ {74250000 ,0x8009 ,0x0004 }, - {148500000 ,0x8029 ,0x0004 }, + {148500000 ,0x802b ,0x0004 }, {297000000 ,0x8039 ,0x0005 }, { ~0UL ,0x0000 ,0x0000 } };
Signature · 1 line
2.1.2
Re: [PATCH v3 2/3] drm: bridge/dw_hdmi_rockchip: improve hdmi eye-diagram test
Quoted 5 lines · Yakir Yang
As for 1920x1080 display resolution, we should turn on the Transmitter Trailer-B.
Signed-off-by Yakir Yang <[email protected]>---
BTW, one of:
drm/rockchip: dw_hdmi-rockchip: ...
drm/rockchip: dw_hdmi: ...
drm: rockchip: dw_hdmi-rockchip: ...
drm: rockchip: dw_hdmi: ...
drm: rockchip/dw_hdmi-rockchip: ...
drm: rockchip/dw_hdmi: ...
might be a better subject line for patches which only touch the rockchip part of this driver. I'd also suggest one of:
drm/imx: dw_hdmi-imx: ...
drm/imx: dw_hdmi: ...
drm: imx: dw_hdmi-imx: ...
drm: imx: dw_hdmi: ...
drm: imx/dw_hdmi-imx: ...
drm: imx/dw_hdmi: ...
for iMX-only patches. It doesn't really mater which as we already have a mixture of these formats already.
Signature · 6 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 20150331165758.GV24899-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org
Re: [PATCH v3 2/3] drm: bridge/dw_hdmi_rockchip: improve hdmi eye-diagram test
Hi Russell,
Quoted 6 lines · Russell King - ARM Linux
Quoted 5 lines · Yakir Yang
As for 1920x1080 display resolution, we should turn on the Transmitter Trailer-B.
Signed-off-by Yakir Yang <[email protected]>---
Quoted 8 lines
BTW, one of:
drm/rockchip: dw_hdmi-rockchip: ...
drm/rockchip:dw_hdmi: ...
drm: rockchip: dw_hdmi-rockchip: ...
drm: rockchip:dw_hdmi: ...
drm: rockchip/dw_hdmi-rockchip: ...
drm: rockchip/dw_hdmi: ...
Okay, I choose the "drm: rockchip/dw_hdmi-rockchip: ...", improve in v4
Thanks :)
Yakir Yang
Quoted 10 lines
might be a better subject line for patches which only touch the rockchip part of this driver. I'd also suggest one of:
drm/imx: dw_hdmi-imx: ...
drm/imx:dw_hdmi: ...
drm: imx: dw_hdmi-imx: ...
drm: imx:dw_hdmi: ...
drm: imx/dw_hdmi-imx: ...
drm: imx/dw_hdmi: ...
Quoted 3 lines
for iMX-only patches. It doesn't really mater which as we already have a mixture of these formats already.
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH v3 2/3] drm: bridge/dw_hdmi_rockchip: improve hdmi eye-diagram test
In reply to Russell King - ARM LinuxHi Russell,
Quoted 15 lines · Russell King - ARM Linux
Quoted 5 lines · Yakir Yang
As for 1920x1080 display resolution, we should turn on the Transmitter Trailer-B.
Signed-off-by Yakir Yang <[email protected]>---
BTW, one of:
drm/rockchip: dw_hdmi-rockchip: ...
drm/rockchip:dw_hdmi: ...
drm: rockchip: dw_hdmi-rockchip: ...
drm: rockchip:dw_hdmi: ...
drm: rockchip/dw_hdmi-rockchip: ...
drm: rockchip/dw_hdmi: ...
Quoted 2 lines
might be a better subject line for patches which only touch the rockchip part of this driver. I'd also suggest one of:
Okay, I choose the "drm: rockchip/dw_hdmi-rockchip: ...", improve in v4
Thanks
Yakir Yang
Quoted 10 lines
drm/imx: dw_hdmi-imx: ...
drm/imx:dw_hdmi: ...
drm: imx: dw_hdmi-imx: ...
drm: imx:dw_hdmi: ...
drm: imx/dw_hdmi-imx: ...
drm: imx/dw_hdmi: ...for iMX-only patches. It doesn't really mater which as we already have a mixture of these formats already.
PATCH v3 3/3 drm: bridge/dw_hdmi: improve hdmi single-end test
In reply to Yakir YangBecause of iMX6 & Rockchip have differnet mpll config parameter, than the cklvl & txlvl would be different, we also should seperate this parmeter.
When pixle clock less than 148.5MHz, the cklvl set to 13(2.79v), and txlvl set to 20(2.77v).
When pixel clock less than 74.25MHz, the cklvl set to 18(2.80v), and txlvl set to 19(2.75v).
---
Changes in v3:
- For pixel clock less than 148.5MHz, set txlvl to 20.
Changes in v2:
- For pixel clock less than 74.25MHz, set txlvl to 19 and set cklvl to 18.
drivers/gpu/drm/bridge/dw_hdmi.c | 14 +++++++------- drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 ++++++------ drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 14 +++++++------- include/drm/bridge/dw_hdmi.h | 5 +++-- 4 files changed, 23 insertions(+), 22 deletions(-)
drivers/gpu/drm/bridge/dw_hdmi.c +7 -7
@@ -903,7 +903,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep,const struct dw_hdmi_plat_data *plat_data = hdmi->plat_data;const struct dw_hdmi_mpll_config *mpll_config = plat_data->mpll_cfg;const struct dw_hdmi_curr_ctrl *curr_ctrl = plat_data->cur_ctr; -const struct dw_hdmi_sym_term *sym_term = plat_data->sym_term; +const struct dw_hdmi_phy_config *phy_config = plat_data->phy_config;if (prep)return -EINVAL ;
@@ -974,18 +974,18 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep,hdmi_phy_i2c_write (hdmi,0x0000 ,0x13 );/* PLLPHBYCTRL */ hdmi_phy_i2c_write (hdmi,0x0006 ,0x17 ); -for (i =0 ; sym_term[i].mpixelclock != (~0UL ); i++) +for (i =0 ; phy_config[i].mpixelclock != (~0UL ); i++)if (hdmi->hdmi_data.video_mode.mpixelclock <= - sym_term[i].mpixelclock) + phy_config[i].mpixelclock)break ;/* RESISTANCE TERM 133Ohm Cfg */ -hdmi_phy_i2c_write (hdmi, sym_term[i].term,0x19 );/* TXTERM */ +hdmi_phy_i2c_write (hdmi, phy_config[i].term,0x19 );/* TXTERM */ /* PREEMP Cgf 0.00 */ -hdmi_phy_i2c_write (hdmi, sym_term[i].sym_ctr,0x09 );/* CKSYMTXCTRL */ - +hdmi_phy_i2c_write (hdmi, phy_config[i].sym_ctr,0x09 );/* CKSYMTXCTRL */ /* TX/CK LVL 10 */ -hdmi_phy_i2c_write (hdmi,0x01ad ,0x0E );/* VLEVCTRL */ +hdmi_phy_i2c_write (hdmi, phy_config[i].vlev_ctr,0x0E );/* VLEVCTRL */ +/* REMOVE CLK TERM */ hdmi_phy_i2c_write (hdmi,0x8000 ,0x05 );/* CKCALCTRL */
drivers/gpu/drm/imx/dw_hdmi-imx.c +6 -6
@@ -73,10 +73,10 @@ static const struct dw_hdmi_curr_ctrl imx_cur_ctr[] = { } }; -static const struct dw_hdmi_sym_term imx_sym_term[] = { -/*pixelclk symbol term*/ - {148500000 ,0x800d ,0x0005 }, - { ~0UL ,0x0000 ,0x0000 } +static const struct dw_hdmi_phy_config imx_phy_config[] = { +/*pixelclk symbol term vlev */ + {148500000 ,0x800d ,0x0005 ,0x01ad }, + { ~0UL ,0x0000 ,0x0000 ,0x0000 } };static int dw_hdmi_imx_parse_dt (struct imx_hdmi *hdmi)
@@ -139,14 +139,14 @@ static struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = {static struct dw_hdmi_plat_data imx6q_hdmi_drv_data = { .mpll_cfg = imx_mpll_cfg, .cur_ctr = imx_cur_ctr, - .sym_term = imx_sym_term, + .phy_config = imx_phy_config, .dev_type =IMX6Q_HDMI , };static struct dw_hdmi_plat_data imx6dl_hdmi_drv_data = { .mpll_cfg = imx_mpll_cfg, .cur_ctr = imx_cur_ctr, - .sym_term = imx_sym_term, + .phy_config = imx_phy_config, .dev_type =IMX6DL_HDMI , };
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +7 -7
@@ -139,12 +139,12 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = { } }; -static const struct dw_hdmi_sym_term rockchip_sym_term[] = { -/*pixelclk symbol term*/ - {74250000 ,0x8009 ,0x0004 }, - {148500000 ,0x802b ,0x0004 }, - {297000000 ,0x8039 ,0x0005 }, - { ~0UL ,0x0000 ,0x0000 } +static const struct dw_hdmi_phy_config rockchip_phy_config[] = { +/*pixelclk symbol term vlev*/ + {74250000 ,0x8009 ,0x0004 ,0x0272 }, + {148500000 ,0x802b ,0x0004 ,0x028d }, + {297000000 ,0x8039 ,0x0005 ,0x028d }, + { ~0UL ,0x0000 ,0x0000 ,0x0000 } };static int rockchip_hdmi_parse_dt (struct rockchip_hdmi *hdmi)
@@ -236,7 +236,7 @@ static const struct dw_hdmi_plat_data rockchip_hdmi_drv_data = { .mode_valid = dw_hdmi_rockchip_mode_valid, .mpll_cfg = rockchip_mpll_cfg, .cur_ctr = rockchip_cur_ctr, - .sym_term = rockchip_sym_term, + .phy_config = rockchip_phy_config, .dev_type = RK3288_HDMI, };
include/drm/bridge/dw_hdmi.h +3 -2
@@ -40,10 +40,11 @@ struct dw_hdmi_curr_ctrl {u16 curr[DW_HDMI_RES_MAX ]; }; -struct dw_hdmi_sym_term { +struct dw_hdmi_phy_config {unsigned long mpixelclock;u16 sym_ctr;/*clock symbol and transmitter control*/ u16 term;/*transmission termination value*/ +u16 vlev_ctr;/* voltage level control */ };struct dw_hdmi_audio_data {
@@ -63,7 +64,7 @@ struct dw_hdmi_plat_data {enum dw_hdmi_devtype dev_type;const struct dw_hdmi_mpll_config *mpll_cfg;const struct dw_hdmi_curr_ctrl *cur_ctr; -const struct dw_hdmi_sym_term *sym_term; +const struct dw_hdmi_phy_config *phy_config;enum drm_mode_status (*mode_valid)(struct drm_connector *connector,struct drm_display_mode *mode); };
Signature · 1 line
2.1.2
Quoted 2 lines · Yakir Yang
RK3288 hdmi eye-diagram test would fail when pixel clock is 148.5MHz, and single-ended test would failed when display mode is 74.25MHz.
Has anyone reviewed these changes yet? I don't see any replies, nor are they in David's git tree. To me, they look mostly fine - the only issue I get is that the final patch doesn't apply cleanly to dw_hdmi.h since they're generated against a tree which has audio support merged. I also see no regressions on iMX6, so I think they can be merged.
Unless anyone has any objections, I'll add these to my queue for David.
Thanks.
Signature · 6 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 20150331162548.GT24899-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org
Hi Russell,
Quoted 9 lines · Russell King - ARM Linux
Quoted 2 lines · Yakir Yang
RK3288 hdmi eye-diagram test would fail when pixel clock is 148.5MHz, and single-ended test would failed when display mode is 74.25MHz.
Has anyone reviewed these changes yet? I don't see any replies, nor are they in David's git tree. To me, they look mostly fine - the only issue I get is that the final patch doesn't apply cleanly to
dw_hdmi.hsince they're generated against a tree which has audio support merged. I also see no regressions on iMX6, so I think they can be merged.
Quoted 3 lines
Unless anyone has any objections, I'll add these to my queue for David.
Thanks.
Wooh, thanks, I will send v4 now to improve the "drm: dw_hdmi/dw_hdmi-rockchip".
Best regards,
Yakir Yang
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Russell,
Quoted 9 lines · Russell King - ARM Linux
Quoted 2 lines · Yakir Yang
RK3288 hdmi eye-diagram test would fail when pixel clock is 148.5MHz, and single-ended test would failed when display mode is 74.25MHz.
Has anyone reviewed these changes yet? I don't see any replies, nor are they in David's git tree. To me, they look mostly fine - the only issue I get is that the final patch doesn't apply cleanly to
dw_hdmi.hsince they're generated against a tree which has audio support merged. I also see no regressions on iMX6, so I think they can be merged.
Quoted 3 lines
Unless anyone has any objections, I'll add these to my queue for David.
Thanks.
Wooh, thanks, I will send v4 now to improve the "drm: dw_hdmi/dw_hdmi-rockchip".
Best regards,
Yakir Yang