For some special hdmi pixclock we should add support for this clock in hdmi phy mpll table.
Add new format SUPPORT_RK_DISCRETE_VR for rockchip discrete vr device,if hdmi device
is rockchip discrete vr device, please set the vic = HDMI_VIDEO_DISCRETE_VR in hdmi timing.
Change-Id: I820f967a84fbb7737cd9e1c2951b89df63863298
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
else
video->color_input = HDMI_COLOR_RGB_0_255;
- if (hdmi->vic & HDMI_VIDEO_DMT) {
+ if ((hdmi->vic & HDMI_VIDEO_DMT) || (hdmi->vic & HDMI_VIDEO_DISCRETE_VR)) {
video->vic = hdmi->vic;
video->color_output_depth = 8;
} else {
.pixelrepeat = 1,
.interface = OUT_P888,
},
+ {
+ .mode = {
+ .name = "1440x1280@60Hz",
+ .refresh = 60,
+ .xres = 1440,
+ .yres = 1280,
+ .pixclock = 148500000,
+ .left_margin = 84,
+ .right_margin = 360,
+ .upper_margin = 8,
+ .lower_margin = 10,
+ .hsync_len = 20,
+ .vsync_len = 2,
+ .sync = 0,
+ .vmode = 0,
+ .flag = 0,
+ },
+ .vic = HDMI_VIDEO_DISCRETE_VR | 1,
+ .vic_2nd = 0,
+ .pixelrepeat = 1,
+ .interface = OUT_P888,
+ },
+ {
+ .mode = {
+ .name = "1440x2560@60Hz",
+ .refresh = 60,
+ .xres = 1440,
+ .yres = 2560,
+ .pixclock = 269390000,
+ .left_margin = 80,
+ .right_margin = 180,
+ .upper_margin = 7,
+ .lower_margin = 7,
+ .hsync_len = 40,
+ .vsync_len = 6,
+ .sync = 0,
+ .vmode = 0,
+ .flag = 0,
+ },
+ .vic = HDMI_VIDEO_DISCRETE_VR | 2,
+ .vic_2nd = 0,
+ .pixelrepeat = 1,
+ .interface = OUT_P888,
+ },
};
static int hdmi_set_info(struct rk_screen *screen, struct hdmi *hdmi)
if (hdmi->vic == 0)
hdmi->vic = hdmi->property->defaultmode;
- if (hdmi->vic & HDMI_VIDEO_DMT)
+ if ((hdmi->vic & HDMI_VIDEO_DMT) || (hdmi->vic & HDMI_VIDEO_DISCRETE_VR))
vic = hdmi->vic;
else
vic = hdmi->vic & HDMI_VIC_MASK;
modelist = list_entry(pos, struct display_modelist, list);
/*pr_info("%s vic %d\n", __function__, modelist->vic);*/
for (i = 0; i < ARRAY_SIZE(hdmi_mode); i++) {
- if (modelist->vic & HDMI_VIDEO_DMT) {
- if (feature & SUPPORT_VESA_DMT)
+ if ((modelist->vic & HDMI_VIDEO_DMT) || (modelist->vic & HDMI_VIDEO_DISCRETE_VR)) {
+ if (feature & (SUPPORT_VESA_DMT | SUPPORT_RK_DISCRETE_VR))
vic = modelist->vic;
else
continue;
if (mode->xres > 3840 ||
mode->refresh < 50 ||
(mode->vmode & FB_VMODE_INTERLACED) ||
- hdmi_mode[i].vic & HDMI_VIDEO_DMT)
+ hdmi_mode[i].vic & HDMI_VIDEO_DMT ||
+ hdmi_mode[i].vic & HDMI_VIDEO_DISCRETE_VR)
continue;
}
if ((feature & SUPPORT_TMDS_600M) == 0 &&
if (vic == 0)
return NULL;
- else if (vic & HDMI_VIDEO_DMT)
+ else if ((vic & HDMI_VIDEO_DMT) || (vic & HDMI_VIDEO_DISCRETE_VR))
vid = vic;
else
vid = vic & HDMI_VIC_MASK;
feature = hdmi->property->feature;
INIT_LIST_HEAD(&hdmi->edid.modelist);
for (i = 0; i < ARRAY_SIZE(hdmi_mode); i++) {
- if (hdmi_mode[i].vic & HDMI_VIDEO_DMT)
+ if ((hdmi_mode[i].vic & HDMI_VIDEO_DMT) || (hdmi_mode[i].vic & HDMI_VIDEO_DISCRETE_VR))
continue;
if ((feature & SUPPORT_TMDS_600M) == 0 &&
hdmi_mode[i].mode.pixclock > 340000000)
#define HDMI_VIDEO_NORMAL 0
#define HDMI_VIDEO_DMT BIT(9)
#define HDMI_VIDEO_YUV420 BIT(10)
+#define HDMI_VIDEO_DISCRETE_VR BIT(11)
#define HDMI_VIC_MASK (0xFF)
#define HDMI_TYPE_MASK (0xFF << 8)
#define HDMI_MAX_ID 4
SUPPORT_HDCP = (1 << 10),
SUPPORT_HDCP2 = (1 << 11),
SUPPORT_YCBCR_INPUT = (1 << 12),
- SUPPORT_VESA_DMT = (1 << 13)
+ SUPPORT_VESA_DMT = (1 << 13),
+ SUPPORT_RK_DISCRETE_VR = (1 << 14)
};
struct hdmi_property {
SUPPORT_YCBCR_INPUT |
SUPPORT_1080I |
SUPPORT_480I_576I |
- SUPPORT_VESA_DMT;
+ SUPPORT_VESA_DMT |
+ SUPPORT_RK_DISCRETE_VR;
if (rk_hdmi_property.videosrc == DISPLAY_SOURCE_LCDC0)
rk_hdmi_property.feature |=
SUPPORT_4K |
1, 1, 0, 0, 0, 0, 3},
{148500000, 594000000, 0, 8, 0, 3, 1,
1, 3, 0, 0, 0, 0, 3},
+ {269390000, 269390000, 0, 8, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 3},
{297000000, 148500000, 0, 8, 0, 0, 0,
1, 0, 1, 0, 0, 0, 3},
{297000000, 297000000, 0, 8, 0, 0, 0,
/* Set AVI infoFrame Data byte4 */
if ((vpara->vic > 92 && vpara->vic < 96) ||
(vpara->vic == 98) ||
- (vpara->vic & HDMI_VIDEO_DMT))
+ (vpara->vic & HDMI_VIDEO_DMT) ||
+ (vpara->vic & HDMI_VIDEO_DISCRETE_VR))
hdmi_writel(hdmi_dev, FC_AVIVID, 0);
else
hdmi_writel(hdmi_dev, FC_AVIVID, vpara->vic & 0xff);