From: Ramalingam C <ramalingam.c@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value
Date: Tue, 3 Mar 2020 11:55:33 +0530 [thread overview]
Message-ID: <20200303062533.GB20842@intel.com> (raw)
In-Reply-To: <20200303055202.GF9735@intel.com>
On 2020-03-03 at 11:22:03 +0530, Anshuman Gupta wrote:
> On 2020-03-03 at 11:13:25 +0530, Ramalingam C wrote:
> > On 2020-03-03 at 10:54:07 +0530, Anshuman Gupta wrote:
> > > DP shim's config_stream_type considered to be succeeded when
> > > return value of intel_dp_hdcp2_write_msg() equals to size of
> > > message to be written, it makes config_stream_type to return
> > > a zero success value in order to succeed the HDCP auth.
> > >
> > > v2:
> > > - config_stream_type() returns 0 on success. [Ram]
> > >
> > > CC: Ramalingam C <ramalingam.c@intel.com>
> > > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++++-
> > > 1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index 2db8d46f61a1..2259c2527457 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -6448,6 +6448,7 @@ static
> > > int intel_dp_hdcp2_config_stream_type(struct intel_digital_port *intel_dig_port,
> > > bool is_repeater, u8 content_type)
> > > {
> > > + int ret;
> > > struct hdcp2_dp_errata_stream_type stream_type_msg;
> > >
> > > if (is_repeater)
> > > @@ -6463,8 +6464,13 @@ int intel_dp_hdcp2_config_stream_type(struct intel_digital_port *intel_dig_port,
> > > stream_type_msg.msg_id = HDCP_2_2_ERRATA_DP_STREAM_TYPE;
> > > stream_type_msg.stream_type = content_type;
> > >
> > > - return intel_dp_hdcp2_write_msg(intel_dig_port, &stream_type_msg,
> > > + ret = intel_dp_hdcp2_write_msg(intel_dig_port, &stream_type_msg,
> > > sizeof(stream_type_msg));
> > > +
> > > + if (ret == sizeof(stream_type_msg))
> > return ret < 0 ? ret : 0;
> > Above statement will be sufficient here?
> IMHO if intel_dp_hdcp2_write_msg() is being abstracted,
> it should return success only when its return value
> is equals to size to be written.
> yes, return ret == sizeof(stream_type_msg) ? 0 : ret
> would make sense to reduced line of code.
> I can change that.
intel_dp_hdcp2_write_msg can't return >0 and != sizeof(stream_type_msg)
because that is error scenario hence return will be <0. So check for the
size of msg size is not compulsary
I am fine with this too.
-Ram
>
> Thanks,
> Anshuman.
> >
> > -Ram
> > > + return 0;
> > > + else
> > > + return ret;
> > > }
> > >
> > > static
> > > --
> > > 2.25.1
> > >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-03-03 6:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 12:32 [Intel-gfx] [PATCH v3 0/2] HDCP 2.2 Comp fixes Anshuman Gupta
2020-02-20 12:32 ` [Intel-gfx] [PATCH v3 1/2] drm/i915/hdcp: Mandate (seq_num_V==0) at first RecvId msg Anshuman Gupta
2020-02-20 12:32 ` [Intel-gfx] [PATCH v3 2/2] drm/i915/hdcp: Return 0 on config_stream_type() +ve return Anshuman Gupta
2020-03-02 14:08 ` Ramalingam C
2020-03-03 5:24 ` [Intel-gfx] [PATCH v4 2/2] drm/i915/hdcp: Fix config_stream_type() ret value Anshuman Gupta
2020-03-03 5:43 ` Ramalingam C
2020-03-03 5:52 ` Anshuman Gupta
2020-03-03 6:25 ` Ramalingam C [this message]
2020-03-03 7:38 ` Anshuman Gupta
2020-03-03 10:20 ` Ramalingam C
2020-03-03 12:45 ` Anshuman Gupta
2020-02-20 20:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success for HDCP 2.2 Comp fixes Patchwork
2020-02-23 5:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-03-03 6:05 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for HDCP 2.2 Comp fixes (rev2) Patchwork
2020-03-03 6:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-03 8:15 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for HDCP 2.2 Comp fixes (rev3) Patchwork
2020-03-03 8:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-03 16:53 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-03-04 1:43 ` [Intel-gfx] [PATCH v3 0/2] HDCP 2.2 Comp fixes Ramalingam C
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200303062533.GB20842@intel.com \
--to=ramalingam.c@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox