OSDN Git Service

drm/i915/icl: add ICL support to cnl_set_procmon_ref_values
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 5 Feb 2018 15:40:41 +0000 (13:40 -0200)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 13 Feb 2018 12:14:49 +0000 (10:14 -0200)
commit62d4a5e149552ef1f1757197652ae7be4fc9f3a3
treed464723385bedcfe20eabaf18be70cb551cfb340
parent3758d96808b9942de9272079d5a24c6c0d2b6c7a
drm/i915/icl: add ICL support to cnl_set_procmon_ref_values

On ICL we have two sets of registers: one for port A and another for
port B. The set of port A registers is the same as the CNL registers.

Since the procmon table on ICL is the same we want to reuse the CNL
function. To do that we add a port argument and make CNL always call
the function passing port A. This way, we'll be able to easily reuse
the function on ICL when we add icl_display_core_init().

v2: Don't use _PICK() when you can use a ternary operator.
v3: Don't use a ternary operation when you can use _MMIO_PORT (Ville).
    Add an extra comment about why we're passing PORT_A (James).

Reviewed-by: James Ausmus <james.ausmus@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180205154046.11485-2-paulo.r.zanoni@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_runtime_pm.c