Message ID | 20200220123217.23635-3-anshuman.gupta@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | HDCP 2.2 Comp fixes | expand |
On 2020-02-20 at 18:02:17 +0530, Anshuman Gupta wrote: > As DP shim's config_stream_type returns size of message > to be written in case of success therefore on > config_stream_type success return a zero success > value in order to succeed the HDCP auth. > > CC: Ramalingam C <ramalingam.c@intel.com> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> > --- > drivers/gpu/drm/i915/display/intel_hdcp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c > index 75f60ca282fc..464ef7ba4db4 100644 > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c > @@ -1538,7 +1538,9 @@ static int hdcp2_authenticate_sink(struct intel_connector *connector) > ret = shim->config_stream_type(intel_dig_port, > hdcp->is_repeater, > hdcp->content_type); > - if (ret < 0) > + if (ret >= 0) > + ret = 0; > + else Anshuman, could we convert the return value of intel_dp_hdcp2_config_stream_type to return the 0 or -ve, as the functions is for configuring thr stream_type? Returning the bytes written is not useful for the caller. -Ram. > return ret; > } > > -- > 2.24.0 >
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index 75f60ca282fc..464ef7ba4db4 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -1538,7 +1538,9 @@ static int hdcp2_authenticate_sink(struct intel_connector *connector) ret = shim->config_stream_type(intel_dig_port, hdcp->is_repeater, hdcp->content_type); - if (ret < 0) + if (ret >= 0) + ret = 0; + else return ret; }
As DP shim's config_stream_type returns size of message to be written in case of success therefore on config_stream_type success return a zero success value in order to succeed the HDCP auth. CC: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- drivers/gpu/drm/i915/display/intel_hdcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)