0288-drm-vc4-Fix-setting-of-vertical-timings-in-the-CRTC.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 701edcaf771736ca24a173352d9d7291f5059e17 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Mon, 15 Feb 2016 17:31:41 -0800
  4. Subject: [PATCH] drm/vc4: Fix setting of vertical timings in the CRTC.
  5. It looks like when I went to add the interlaced bits, I just took the
  6. existing PV_VERT* block and indented it, instead of copy and pasting
  7. it first. Without this, changing resolution never worked.
  8. Signed-off-by: Eric Anholt <eric@anholt.net>
  9. (cherry picked from commit a7c5047d1ce178dd2b1fa577fc8909ad663d56d5)
  10. ---
  11. drivers/gpu/drm/vc4/vc4_crtc.c | 10 ++++++++++
  12. 1 file changed, 10 insertions(+)
  13. --- a/drivers/gpu/drm/vc4/vc4_crtc.c
  14. +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
  15. @@ -217,6 +217,16 @@ static void vc4_crtc_mode_set_nofb(struc
  16. PV_HORZB_HFP) |
  17. VC4_SET_FIELD(mode->hdisplay, PV_HORZB_HACTIVE));
  18. + CRTC_WRITE(PV_VERTA,
  19. + VC4_SET_FIELD(mode->vtotal - mode->vsync_end,
  20. + PV_VERTA_VBP) |
  21. + VC4_SET_FIELD(mode->vsync_end - mode->vsync_start,
  22. + PV_VERTA_VSYNC));
  23. + CRTC_WRITE(PV_VERTB,
  24. + VC4_SET_FIELD(mode->vsync_start - mode->vdisplay,
  25. + PV_VERTB_VFP) |
  26. + VC4_SET_FIELD(vactive, PV_VERTB_VACTIVE));
  27. +
  28. if (interlace) {
  29. CRTC_WRITE(PV_VERTA_EVEN,
  30. VC4_SET_FIELD(mode->vtotal - mode->vsync_end - 1,