From: shengyang.chen Date: Thu, 2 Mar 2023 01:51:14 +0000 (+0800) Subject: riscv:linux:vout: rgb support 1080P@60fps X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34b5e5de79cd9548318ec8ce03981d44a6124b89;p=platform%2Fkernel%2Flinux-starfive.git riscv:linux:vout: rgb support 1080P@60fps rgb support 1080P@60fps porting from: branch: CR_2896_evb_515_MIPI_RGB_dual_display_keith.zhao commit id: 51504aed4280caab91258e3faa789a9b66984bfc1a3 Signed-off-by: keith Signed-off-by: shengyang.chen --- diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi index 507a536..eb53eea 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi @@ -1108,144 +1108,144 @@ rgb-1-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-2-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-3-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-4-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-5-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-6-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-7-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-8-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-9-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-10-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-11-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-12-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-13-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-14-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-15-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-16-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-17-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-18-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-19-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-20-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-21-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-22-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-23-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-24-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-25-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-26-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; rgb-27-pins { starfive,pins = ; starfive,pinmux = ; - starfive,pin-ioconfig = ; + starfive,pin-ioconfig = ; }; }; diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index fecfb48..70a7d0e 100755 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1392,13 +1392,21 @@ static enum drm_mode_status tda998x_bridge_mode_valid(struct drm_bridge *bridge, return MODE_BAD_HVALUE; if (mode->vtotal >= BIT(11)) return MODE_BAD_VVALUE; - //u32 vic = drm_match_cea_mode(mode); - - //if (vic >= 1) + + //if ((mode->hdisplay == 1280)&&(mode->vdisplay == 720)&&(mode->clock == 74250)) // return MODE_OK; - //else - // return MODE_BAD; - return MODE_OK; + if ((mode->hdisplay == 1920)&&(mode->vdisplay == 1080)&&(mode->clock == 148500)) + { + u32 vic = drm_match_cea_mode(mode); + //printk("====> %s, %d--vic ============== %d.\n", __func__, __LINE__,vic); + if(vic == 16) + return MODE_OK; + else + return MODE_BAD; + }else + return MODE_BAD; + + //return MODE_OK; } static void tda998x_bridge_enable(struct drm_bridge *bridge) diff --git a/drivers/gpu/drm/verisilicon/inno_hdmi.c b/drivers/gpu/drm/verisilicon/inno_hdmi.c index 892ca45..d73a58a 100644 --- a/drivers/gpu/drm/verisilicon/inno_hdmi.c +++ b/drivers/gpu/drm/verisilicon/inno_hdmi.c @@ -1037,6 +1037,23 @@ static int inno_hdmi_bind(struct device *dev, struct device *master, pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); pm_runtime_enable(&pdev->dev); +#ifdef CONFIG_DRM_I2C_NXP_TDA998X + hdmi->hdmi_data.vic = 0x10; + u8 val; + + val = readl_relaxed(hdmi->regs + (0x1b0) * 0x04); + val |= 0x4; + hdmi_writeb(hdmi, 0x1b0, val); + hdmi_writeb(hdmi, 0x1cc, 0xf); + //hdmi->hdmi_data.vic = drm_match_cea_mode(mode); + + hdmi->tmds_rate = 148500 * 1000; + inno_hdmi_phy_clk_set_rate(hdmi,hdmi->tmds_rate); + + while (!(hdmi_readb(hdmi, 0x1a9) & 0x1)); + while (!(hdmi_readb(hdmi, 0x1af) & 0x1)); +#endif + inno_hdmi_disable_clk_assert_rst(dev, hdmi); dev_info(dev, "inno hdmi bind end\n");