drm/i915: Add function to output Aksv over GMBUS
authorSean Paul <seanpaul@chromium.org>
Mon, 8 Jan 2018 19:55:41 +0000 (14:55 -0500)
committerSean Paul <seanpaul@chromium.org>
Mon, 8 Jan 2018 19:58:29 +0000 (14:58 -0500)
commit07e17a75922a593393b7eb8f73622723b76d3706
tree75de30efd8d957ceb4a0c1b5f31bf69a56915f86
parentd02cf0a4f4db3bdbf1f7fa6915db0a96bd98ed9e
drm/i915: Add function to output Aksv over GMBUS

Once the Aksv is available in the PCH, we need to get it on the wire to
the receiver via DDC. The hardware doesn't allow us to read the value
directly, so we need to tell GMBUS to source the Aksv internally and
send it to the right offset on the receiver.

The way we do this is to initiate an indexed write where the index is
the Aksv register offset. We write dummy values to GMBUS3 as if we were
sending the key, and the hardware slips in the "real" values when it
goes out.

Changes in v2:
- None
Changes in v3:
- Uses new index write feature (Ville)
Changes in v4:
- None
Changes in v5:
- checkpatch whitespace fix
Changes in v6:
- None

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-8-seanpaul@chromium.org
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_i2c.c