]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Refactor the hpd irq handling functions
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 27 Aug 2015 20:56:10 +0000 (23:56 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 2 Sep 2015 15:01:32 +0000 (17:01 +0200)
commit1670736a42f0816a4620fb66b571dc1df837be4d
treee7a577fad736b2a19fb73ab9fbbd9f13ed9305aa
parenta7921cef8d223b2838a1200825fe5a6ffadb9a79
drm/i915: Refactor the hpd irq handling functions

A lot of the hpd irq handling is duplicated code, so refactor it a bit
by observing that in several places the only difference is the hpd[]
array. So pull the code to a few functions and pass in the hpd[] array
from the caller. Another option would be to determine the correct array
to use within the functions themselves, but somehow passing it in felt
nicer.

Further code reduction could be achieved by passing in the hotplug
register offset, and the long pulse detection function pointer. But that
didn't feel as good for some reason, so I left it at the middle ground.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c