• Paulo Zanoni's avatar
    drm/i915: fix FBC for cases where crtc->base.y is non-zero · 2db3366b
    Paulo Zanoni authored
    I only tested this on BDW and SKL, but since the register description
    is the same ever since gen4, let's assume that all gens take the same
    register format. If that's not true, then hopefully someone will
    bisect a bug to this patch and we'll fix it.
    
    Notice that the wrong fence offset register just means that the
    hardware tracking will be wrong.
    
    Testcases:
     - igt/kms_frontbuffer_tracking/fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt
     - igt/kms_frontbuffer_tracking/fbc-2p-primscrn-pri-shrfb-draw-mmap-gtt
    
    v2:
      - Add intel_crtc->adjusted_{x,y} so this code can work independently
        of intel_gen4_compute_page_offset(). (Ville).
      - This version also works on SKL.
    Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    2db3366b
intel_display.c 431 KB