Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp631518pxb; Tue, 2 Feb 2021 13:47:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjSCHBwShirolA26tB7RHRPReWxeHyEUVKzEPmYN7qHYm0wNA30ssQTehjDMTj3QnLQa0l X-Received: by 2002:a17:907:2d87:: with SMTP id gt7mr25608ejc.123.1612302439530; Tue, 02 Feb 2021 13:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302439; cv=none; d=google.com; s=arc-20160816; b=lpu9iUo9j6b3yxG4vCt4E85oRuTwHtHWVE3wlExgIMr+/TWRasq+F2JLi3UJfDQgjj /8ack1P1Etf7KRC95P9f6r2SYWuB9XQogSzVvyqQf0y8iKZmSAo2aALcUYAiPMTzNfl1 WrjOPnqrDmPdWpzrOWz4bTCJYibh+yqaTV7h8wrlCn77j4PapIGHfeY3jhErUHQJbkcX FWdj6KR+kMCjEhI2c8h/F8pWF8+7qyp8YaFEC1wdlPUZH60hU1Xh8mgmv2WiMHwBonyG Qf06kPcOSUznBXMb/xD7BH3GJQ5WW/qWjSKKSLWbCUvorj5KzfIrj4sKanQBJk8Attas THbw== 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=Ds4eLaJu14ID5T/zSkvoqlVUI/DI04EOufgmLhqXCkI=; b=qwG2ZXdXg1xuTEOYCtgA9CFlQ4Qn0D/P9x3ev1Rt/tP2cyw2ErSJSbmX8Cw/x2V8Jo Qe7OqKEdvN++L4Gby6rfwMWwI1uigt1guizLsdBY2o+0Yj78S0Zc0zd9KhrYXfIsag4s ynJyFjwStIPBPjkW2sRJxdkmRrSRhR3av8Fb8xz1O8F9XmMewBdY+E1KMvOw9DYWgyQw 7LE6ApAhTYZ2lzK023z1cFh9Uq4KCFnFfScKvw63A6TOEh5tQTuVKyS2AEZyrbuZOmjf Y3FShsqzPAq2vwp3ZFP8BhUgJHjq1jJRqGB1cCqi6TNYbtS1ZGhRJsZs50XV8FoVFMIk 9T8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gLqalmvH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si13010755edx.383.2021.02.02.13.46.55; Tue, 02 Feb 2021 13:47:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gLqalmvH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233314AbhBBNyU (ORCPT + 99 others); Tue, 2 Feb 2021 08:54:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:38220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbhBBNrt (ORCPT ); Tue, 2 Feb 2021 08:47:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6742A64F9A; Tue, 2 Feb 2021 13:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273322; bh=hl2DDHucC2R88wa5cqog4n3A36paPwNoybWeEjJ60iU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gLqalmvHVp6+4BiArfKem8hQkdlWVqf1kLjrQBoU77Ykc7pBzy9sVkfbIIu9lUgCD 71zAOgW9dzI+z9TjhXN3gtPMA/Xh2MMXCRymyFzA+Ag+VDn/tEcAKeZl29S0UBMo2O +4DERvlJeGisSIjmd4QohWBxliRHzFVghgtnT7ls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tvrtko Ursulin , Umesh Nerlige Ramappa , Chris Wilson , Jani Nikula Subject: [PATCH 5.10 063/142] drm/i915: Check for all subplatform bits Date: Tue, 2 Feb 2021 14:37:06 +0100 Message-Id: <20210202133000.318913172@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Umesh Nerlige Ramappa commit 8f6d08c9af284d74276da6681348e4673f13caea upstream. Current code is checking only 2 bits in the subplatform, but actually 3 bits are allocated for the field. Check all 3 bits. Fixes: 805446c8347c ("drm/i915: Introduce concept of a sub-platform") Cc: Tvrtko Ursulin Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210121161936.746591-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 27b695ee1af9bb36605e67055874ec081306ac28) Signed-off-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1347,7 +1347,7 @@ intel_subplatform(const struct intel_run { const unsigned int pi = __platform_mask_index(info, p); - return info->platform_mask[pi] & INTEL_SUBPLATFORM_BITS; + return info->platform_mask[pi] & ((1 << INTEL_SUBPLATFORM_BITS) - 1); } static __always_inline bool