diff options
author | Thierry Reding <treding@nvidia.com> | 2014-07-07 09:35:06 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-08-04 04:07:37 -0400 |
commit | 3f4f3b5fede02d338383619ff57744a8415ccceb (patch) | |
tree | 268bb1b63fe69b8d971a1cae5f5f63093f4b4a6d | |
parent | 054b1bd16138f92cd690324958e48f790a4cd234 (diff) |
drm/tegra: sor - Configure proper sync polarities
Program the sync signal polarities according to the display mode.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 479da1b210b4..6cb861bf1e03 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c | |||
@@ -815,12 +815,22 @@ static int tegra_output_sor_enable(struct tegra_output *output) | |||
815 | * configure panel (24bpp, vsync-, hsync-, DP-A protocol, complete | 815 | * configure panel (24bpp, vsync-, hsync-, DP-A protocol, complete |
816 | * raster, associate with display controller) | 816 | * raster, associate with display controller) |
817 | */ | 817 | */ |
818 | value = SOR_STATE_ASY_VSYNCPOL | | 818 | value = SOR_STATE_ASY_PROTOCOL_DP_A | |
819 | SOR_STATE_ASY_HSYNCPOL | | ||
820 | SOR_STATE_ASY_PROTOCOL_DP_A | | ||
821 | SOR_STATE_ASY_CRC_MODE_COMPLETE | | 819 | SOR_STATE_ASY_CRC_MODE_COMPLETE | |
822 | SOR_STATE_ASY_OWNER(dc->pipe + 1); | 820 | SOR_STATE_ASY_OWNER(dc->pipe + 1); |
823 | 821 | ||
822 | if (mode->flags & DRM_MODE_FLAG_PHSYNC) | ||
823 | value &= ~SOR_STATE_ASY_HSYNCPOL; | ||
824 | |||
825 | if (mode->flags & DRM_MODE_FLAG_NHSYNC) | ||
826 | value |= SOR_STATE_ASY_HSYNCPOL; | ||
827 | |||
828 | if (mode->flags & DRM_MODE_FLAG_PVSYNC) | ||
829 | value &= ~SOR_STATE_ASY_VSYNCPOL; | ||
830 | |||
831 | if (mode->flags & DRM_MODE_FLAG_NVSYNC) | ||
832 | value |= SOR_STATE_ASY_VSYNCPOL; | ||
833 | |||
824 | switch (config.bits_per_pixel) { | 834 | switch (config.bits_per_pixel) { |
825 | case 24: | 835 | case 24: |
826 | value |= SOR_STATE_ASY_PIXELDEPTH_BPP_24_444; | 836 | value |= SOR_STATE_ASY_PIXELDEPTH_BPP_24_444; |