]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_display.c
drm/i915: Shuffle fifo underrun disable/enable points for gmch platforms
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 May 2014 16:40:25 +0000 (19:40 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 May 2014 13:06:31 +0000 (15:06 +0200)
commit4a3436e85ccc2925f4ee7e363131107bb00aab77
tree84cc639a9db602f68e3f7df3d568f3caf93c11cb
parent29c6b0c5ee33d54ada586040eca2a258f0ce0650
drm/i915: Shuffle fifo underrun disable/enable points for gmch platforms

Gen2 reports FIFO underruns whenever no planes are enabled on the pipe.
So in order to avoid false positives we must enable the FIFO underrun
reporting only when at least one plane is enabled on the pipe. For
now just move the underrun reporting enable/disable points to the
other side of the plane enable/disable point. That doesn't cover cases
when we turn off all the planes for the pipe but leave the pipe running
on purpose, but it's better than the current situation.

On gen4+ we can actually move the underrun reporting enable/disable to
the opposite ends of the crtc enable/disable hooks. I suppose in theory
we could leave the underrun reporting enabled all the time, except on
VLV where PIPESTAT stops working when the display power well is down.
If we ever get around to unifying the PIPESTAT irq handling for all
gmch platforms, we should still follow the VLV route for other platforms.
It would also micro-optimize the irq handler a bit since we could then
skip the PIPESTAT reads for all disabled pipes.

Gen3 is still a mystery, but for now I'm going to assume it behaves
like gen4+.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c