Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3667645lfo; Mon, 23 May 2022 10:50:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDkDDVXZhXuGUKpXcDMlMHFAfrLBR97Ird4KS4WBK2OZcAp+u907GOuiQQ0OUvH4m12PNB X-Received: by 2002:a17:90b:4c07:b0:1df:f11a:7d4a with SMTP id na7-20020a17090b4c0700b001dff11a7d4amr171050pjb.214.1653328239978; Mon, 23 May 2022 10:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653328239; cv=none; d=google.com; s=arc-20160816; b=G0cE6msCT1UUkGmDkKd/gdoW0XlbuLMliQDy0luCSHG6v1oaPFC4SRs3Tl3Znnyvh2 PpyDWbBsT0NktmNtsXTx4HupDxdA+I5FWUHd+owmp/v0Y6I7E02+YzdKTgtQDxro9Q6Z PstIzSrt/1HqmyEHMQvoQFDxHqkpMH0BlRXBm6YSqmTo5LKISbYZUTeT++0x68RrKMel /ex5+dQGBpnvSZWMN3a+D7OYAalRjFBkCB74YaoTSdRIOqkb/KRgEO/pIsqp2lkqgtRm BkGHixFZl3fcHW8ogm23OLf1pIjjU+q2OykwnyZQE0Zinpz7YMaPGM9Kp3NawuftLAIY BkVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jFsnlhro2C89QYRjZZ6dVFQPRTc0ACL1wmREo3J1rwM=; b=BFp3nSlR74U5MUzp+q3/An+6Ln68cj7mgQgTp6waPx95CAVQpcRtsrCUVfaCWkYhK6 W8zRCsyI7QtTrZIP4Wtm+F8VSeSkoWzNY/TYQQyH8BnJpmVaSNntXbsVgRWUuig+k6iC 8db9y5CgTU3Sm6CGMpaBf3jX0ExHjFOyyxMArkBcuECPy1JyN6TvNYWA9tY3UascOTgL fwxPLJb4c5AtI05LBZj6uB3TCBE0mWjlhpgyySui3oJNW3zcHWs0mbPkXRlAo18Q7ijc ifwLc5qPGIm1hLIliI2i2bR62oe9cLGLDsKLHAMlW7dVGX1suvLlCP6gPnW1vrt70Do3 b0lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GIreRv9C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l23-20020a63ea57000000b00398f1f7ab55si374203pgk.333.2022.05.23.10.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GIreRv9C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 075DF106346; Mon, 23 May 2022 10:50:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244188AbiEWRrh (ORCPT + 99 others); Mon, 23 May 2022 13:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243033AbiEWR2R (ORCPT ); Mon, 23 May 2022 13:28:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16E2D84A10; Mon, 23 May 2022 10:25:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8973A608C0; Mon, 23 May 2022 17:25:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B00DC385A9; Mon, 23 May 2022 17:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326712; bh=xEVNdeNhZjk77i/I9aZlNN5jc8Dr99dJMo/hpb7T4e0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIreRv9C9UcBgpnFfRDaXhBRFagSdeNXprz7l6wGTBFE3rTAvCnXh7+p0F+w3TfCD kYQp62FX2t2ztsbMYwhLa/oCBiZdOkajJgjaQXIfAK/5lvXlXnJxFd0R+EXIG6YmjG LCJR7kjINobmMAOQHLlXu87/twpGWi7AJUS75pDQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Greg Thelen , Yu Liao Subject: [PATCH 5.17 016/158] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state" Date: Mon, 23 May 2022 19:02:53 +0200 Message-Id: <20220523165833.326212639@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165830.581652127@linuxfoundation.org> References: <20220523165830.581652127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Thelen This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f. 5.10 stable contains 2 identical commits: 1. commit eb7bf11e8ef1 ("drm/i915/opregion: check port number bounds for SWSCI display power state") 2. commit b84857c06ef9 ("drm/i915/opregion: check port number bounds for SWSCI display power state") Both commits add separate checks for the same condition. Revert the 2nd redundant check to match upstream, which only has one check. Signed-off-by: Greg Thelen Signed-off-by: Yu Liao Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_opregion.c | 15 --------------- 1 file changed, 15 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_opregion.c +++ b/drivers/gpu/drm/i915/display/intel_opregion.c @@ -375,21 +375,6 @@ int intel_opregion_notify_encoder(struct return -EINVAL; } - /* - * The port numbering and mapping here is bizarre. The now-obsolete - * swsci spec supports ports numbered [0..4]. Port E is handled as a - * special case, but port F and beyond are not. The functionality is - * supposed to be obsolete for new platforms. Just bail out if the port - * number is out of bounds after mapping. - */ - if (port > 4) { - drm_dbg_kms(&dev_priv->drm, - "[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n", - intel_encoder->base.base.id, intel_encoder->base.name, - port_name(intel_encoder->port), port); - return -EINVAL; - } - if (!enable) parm |= 4 << 8;