drm/i915/cnl: Fix SSEU Device Status.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 26 Oct 2017 00:15:46 +0000 (17:15 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 26 Oct 2017 18:35:11 +0000 (11:35 -0700)
commitf8c3dcf946bfb1e0519fb095d02f9b7def30a749
treecaaf05c28773fe64276d12a8a293ec9c40576289
parent9bdc3573a5a2824da7d7e55eac95ca5a014181d8
drm/i915/cnl: Fix SSEU Device Status.

CNL adds an extra register for slice/subslice information.
Although no SKU is planed with an extra slice let's already
handle this extra piece of information so we don't have the
risk in future of getting a part that might have chosen this
part of the die instead of other slices or anything like that.

Also if subslice is disabled the information of eu ack for that
is garbage, so let's skip checks for eu if subslice is disabled
as we skip the subslice if slice is disabled.

The rest is pretty much like gen9.

v2: Remove IS_CANNONLAKE from gen9 status function.

v3: Consider s_max = 6 and ss_max=4 to run over all possible
    slices and subslices possible by spec. Although no real
    hardware will have that many slices/subslices.
    To match with sseu info init.
v4: Fix offset calculation for slices 4 and 5.
    Removed Oscar's rv-b since this change also needs review.
v5: Let's consider only valid bits for SLICE*_PGCTL_ACK.
    This looks like wrong in Spec, but seems to be enough
    for now. Whenever Spec gets updated and fixed we come
    back and properly update the masks. Also add a FIXME,
    so we can revisit this later when we find some strange
    info on debugfs or when we noitce spec got updated.

Cc: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171026001546.28203-1-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_reg.h