drm/i915: Set invert bit for hpd based on VBT
authorShubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Thu, 31 Mar 2016 10:41:47 +0000 (16:11 +0530)
committerJani Nikula <jani.nikula@intel.com>
Wed, 6 Apr 2016 11:22:48 +0000 (14:22 +0300)
commitd252bf68b75792108ae2821c3a6e1cdc58e88cb9
tree9ab7307ec317858af544fc984265af7fc639a99f
parent4e27bd50739e41250a93dd131d6a4180e288cb10
drm/i915: Set invert bit for hpd based on VBT

This patch sets the invert bit for hpd detection for each port
based on VBT configuration. Since each AOB can be designed to
depend on invert bit or not, it is expected if an AOB requires
invert bit, the user will set respective bit in VBT.

v2: Separated VBT parsing from the rest of the logic. (Jani)

v3: Moved setting invert bit logic to bxt_hpd_irq_setup()
    and changed its logic to avoid looping twice. (Ville)

v4: Changed the logic to mask out the bits first and then
    set them to remove need of temporary variable. (Ville)

v5: Moved defines to existing set of defines for the register
    and added required breaks. (Ville)

Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[Jani: fixed some checkpatch noise, added kernel-doc.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459420907-11383-2-git-send-email-shubhangi.shrivastava@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_bios.c