Skip to content

Commit

Permalink
drm/i915/hdcp: Use both bits for device_count
Browse files Browse the repository at this point in the history
Smatch spotted:
drivers/gpu/drm/i915//intel_hdcp.c:1406 hdcp2_authenticate_repeater_topology() warn: should this be a bitwise op?

and indeed looks to be suspect that we do need to use a bitwise or to
combine the two register fields into one counter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190517102225.3069-3-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed May 17, 2019
1 parent 96ac081 commit af461ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,8 +1402,8 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)
return -EINVAL;
}

device_cnt = HDCP_2_2_DEV_COUNT_HI(rx_info[0]) << 4 ||
HDCP_2_2_DEV_COUNT_LO(rx_info[1]);
device_cnt = (HDCP_2_2_DEV_COUNT_HI(rx_info[0]) << 4 |
HDCP_2_2_DEV_COUNT_LO(rx_info[1]));
if (drm_hdcp_check_ksvs_revoked(dev, msgs.recvid_list.receiver_ids,
device_cnt)) {
DRM_ERROR("Revoked receiver ID(s) is in list\n");
Expand Down

0 comments on commit af461ff

Please sign in to comment.