From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91B13C433DB for ; Fri, 15 Jan 2021 14:06:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45EB3223E0 for ; Fri, 15 Jan 2021 14:06:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45EB3223E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7FF56E342; Fri, 15 Jan 2021 14:06:22 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C0B56E342 for ; Fri, 15 Jan 2021 14:06:22 +0000 (UTC) IronPort-SDR: VaaZXwXruePtoQNzKjyjyOitn2liUeAt1o9CzAwLReZOaHAccnT7A8uAUHl2+j4Ct8fSRJVgvJ MKJmeKYwaaBg== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="178699804" X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="178699804" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 06:06:21 -0800 IronPort-SDR: sIsTkiWKCnWVfpnPhquX6SjgGwk2gMW46GTZ+KDYLBNSHulMxKqn6ZkeMuO7XbghyUoeaWgm5d eCC6JaDHqtTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="352818763" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 15 Jan 2021 06:06:21 -0800 Received: from bgsmsx604.gar.corp.intel.com (10.67.234.6) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Jan 2021 06:06:20 -0800 Received: from bgsmsx604.gar.corp.intel.com (10.67.234.6) by BGSMSX604.gar.corp.intel.com (10.67.234.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Jan 2021 19:36:18 +0530 Received: from bgsmsx604.gar.corp.intel.com ([10.67.234.6]) by BGSMSX604.gar.corp.intel.com ([10.67.234.6]) with mapi id 15.01.1713.004; Fri, 15 Jan 2021 19:36:17 +0530 From: "Gupta, Anshuman" To: "Nikula, Jani" , Chris Wilson , "intel-gfx@lists.freedesktop.org" Thread-Topic: [PATCH] drm/i915/display: Set error value before returning in intel_hdcp*_disable() Thread-Index: AQHW6x+0T/xASFKdy0KCgF3Xy3Dv+6ooIbmAgABufqCAACh60A== Date: Fri, 15 Jan 2021 14:06:17 +0000 Message-ID: References: <20210115092034.8804-1-chris@chris-wilson.co.uk> <87bldqpjxi.fsf@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-originating-ip: [10.223.10.1] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Set error value before returning in intel_hdcp*_disable() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul , Chris Wilson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" > -----Original Message----- > From: Gupta, Anshuman > Sent: Friday, January 15, 2021 5:39 PM > To: 'Jani Nikula' ; Chris Wilson wilson.co.uk>; intel-gfx@lists.freedesktop.org > Cc: Chris Wilson ; C, Ramalingam > ; Shankar, Uma ; > Sean Paul > Subject: RE: [PATCH] drm/i915/display: Set error value before returning in > intel_hdcp*_disable() > > > > > -----Original Message----- > > From: Jani Nikula > > Sent: Friday, January 15, 2021 4:05 PM > > To: Chris Wilson ; > > intel-gfx@lists.freedesktop.org > > Cc: Chris Wilson ; C, Ramalingam > > ; Shankar, Uma ; > Gupta, > > Anshuman ; Sean Paul > > > Subject: Re: [PATCH] drm/i915/display: Set error value before > > returning in > > intel_hdcp*_disable() > > > > On Fri, 15 Jan 2021, Chris Wilson wrote: > > > drivers/gpu/drm/i915/display/intel_hdcp.c:886 _intel_hdcp_disable() > > error: uninitialized symbol 'ret'. > > > drivers/gpu/drm/i915/display/intel_hdcp.c:1951 > > > _intel_hdcp2_disable() > > error: uninitialized symbol 'ret'. > > > > > > Given the comment that this error reflects the status of all > > > connectors within this MST topology, I opted to use -EBUSY to > > > indicate not all were ready. > > > > > > Fixes: 2a743b7b8a8b ("drm/i915/hdcp: Configure HDCP1.4 MST steram > > > encryption status") > > > Fixes: 899c8762f981 ("drm/i915/hdcp: Configure HDCP2.2 MST steram > > > encryption status") > > > Signed-off-by: Chris Wilson > > > Cc: Ramalingam C > > > Cc: Uma Shankar > > > Cc: Anshuman Gupta > > > Cc: Sean Paul > > > Cc: Jani Nikula > > > > Reviewed-by: Jani Nikula > > > > > --- > > > drivers/gpu/drm/i915/display/intel_hdcp.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c > > > b/drivers/gpu/drm/i915/display/intel_hdcp.c > > > index db8dff2eeb0a..2be4822b91a0 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c > > > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c > > > @@ -883,7 +883,7 @@ static int _intel_hdcp_disable(struct > > intel_connector *connector) > > > * until it disabled HDCP encryption for all connectors in MST > > topology. > > > */ > > > if (dig_port->num_hdcp_streams > 0) > > > - return ret; > > > + return -EBUSY; > Please return 0 as a fix to static analysis warning, It is not an error. > Above condition will only true for MST case, so it always was returning > return value from stream_encryption(). > > Thanks, > Anshuman Gupta. Floated a patch to fix this https://patchwork.freedesktop.org/patch/414427/?series=85917&rev=1 Thanks, Anshuman Gupta. > > > > > > hdcp->hdcp_encrypted = false; > > > intel_de_write(dev_priv, HDCP_CONF(dev_priv, cpu_transcoder, > > port), > > > 0); @@ -1948,7 +1948,7 @@ static int _intel_hdcp2_disable(struct > > intel_connector *connector) > > > } > > > > > > if (dig_port->num_hdcp_streams > 0) > > > - return ret; > > > + return -EBUSY; > > > > > > ret = hdcp2_disable_encryption(connector); > > > > -- > > Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx