diff options
-rw-r--r-- | drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c index 62377e41745b..b36f815bd1d8 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | |||
@@ -74,7 +74,7 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) | |||
74 | struct drm_device *dev = crtc->dev; | 74 | struct drm_device *dev = crtc->dev; |
75 | struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; | 75 | struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; |
76 | struct drm_display_mode *mode = &crtc->state->mode; | 76 | struct drm_display_mode *mode = &crtc->state->mode; |
77 | unsigned int hbp, hfp, hsw, vbp, vfp, vsw, div, index; | 77 | unsigned int hbp, hfp, hsw, vbp, vfp, vsw, div, index, pol = 0; |
78 | unsigned long dcuclk; | 78 | unsigned long dcuclk; |
79 | 79 | ||
80 | index = drm_crtc_index(crtc); | 80 | index = drm_crtc_index(crtc); |
@@ -89,6 +89,12 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) | |||
89 | vfp = mode->vsync_start - mode->vdisplay; | 89 | vfp = mode->vsync_start - mode->vdisplay; |
90 | vsw = mode->vsync_end - mode->vsync_start; | 90 | vsw = mode->vsync_end - mode->vsync_start; |
91 | 91 | ||
92 | if (mode->flags & DRM_MODE_FLAG_NHSYNC) | ||
93 | pol |= DCU_SYN_POL_INV_HS_LOW; | ||
94 | |||
95 | if (mode->flags & DRM_MODE_FLAG_NVSYNC) | ||
96 | pol |= DCU_SYN_POL_INV_VS_LOW; | ||
97 | |||
92 | regmap_write(fsl_dev->regmap, DCU_HSYN_PARA, | 98 | regmap_write(fsl_dev->regmap, DCU_HSYN_PARA, |
93 | DCU_HSYN_PARA_BP(hbp) | | 99 | DCU_HSYN_PARA_BP(hbp) | |
94 | DCU_HSYN_PARA_PW(hsw) | | 100 | DCU_HSYN_PARA_PW(hsw) | |
@@ -101,8 +107,7 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) | |||
101 | DCU_DISP_SIZE_DELTA_Y(mode->vdisplay) | | 107 | DCU_DISP_SIZE_DELTA_Y(mode->vdisplay) | |
102 | DCU_DISP_SIZE_DELTA_X(mode->hdisplay)); | 108 | DCU_DISP_SIZE_DELTA_X(mode->hdisplay)); |
103 | regmap_write(fsl_dev->regmap, DCU_DIV_RATIO, div); | 109 | regmap_write(fsl_dev->regmap, DCU_DIV_RATIO, div); |
104 | regmap_write(fsl_dev->regmap, DCU_SYN_POL, | 110 | regmap_write(fsl_dev->regmap, DCU_SYN_POL, pol); |
105 | DCU_SYN_POL_INV_VS_LOW | DCU_SYN_POL_INV_HS_LOW); | ||
106 | regmap_write(fsl_dev->regmap, DCU_BGND, DCU_BGND_R(0) | | 111 | regmap_write(fsl_dev->regmap, DCU_BGND, DCU_BGND_R(0) | |
107 | DCU_BGND_G(0) | DCU_BGND_B(0)); | 112 | DCU_BGND_G(0) | DCU_BGND_B(0)); |
108 | regmap_write(fsl_dev->regmap, DCU_DCU_MODE, | 113 | regmap_write(fsl_dev->regmap, DCU_DCU_MODE, |
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f88a631c43ab..2164c999052c 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c | |||
@@ -1016,6 +1016,7 @@ static const struct drm_display_mode nec_nl4827hc19_05b_mode = { | |||
1016 | .vsync_end = 272 + 2 + 4, | 1016 | .vsync_end = 272 + 2 + 4, |
1017 | .vtotal = 272 + 2 + 4 + 2, | 1017 | .vtotal = 272 + 2 + 4 + 2, |
1018 | .vrefresh = 74, | 1018 | .vrefresh = 74, |
1019 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, | ||
1019 | }; | 1020 | }; |
1020 | 1021 | ||
1021 | static const struct panel_desc nec_nl4827hc19_05b = { | 1022 | static const struct panel_desc nec_nl4827hc19_05b = { |