Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4584163pxj; Wed, 12 May 2021 08:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeZ6+mkzjq3peYMLTPup7gYg9OFUWk7cQa1OzpGH6AFQ10OK41y2qVYwBzcw8bwBPjeT1z X-Received: by 2002:a17:906:bc8e:: with SMTP id lv14mr38182792ejb.418.1620834065841; Wed, 12 May 2021 08:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620834065; cv=none; d=google.com; s=arc-20160816; b=jTREceVvjLZWwlCZnhjcBz6hF5M0c9uHmFe6oUNnDjBHQnkfcRsQEjPt1apvlCPfKe hjBd5iQqS6bdhG14M12P/p10upVe11RsfcDhC1rCyS2gGrpW9Fj98ACyOBe1UGfWH+Nd jI0zXhpniI4bIntk22L5uItrLmAnGUYvLnaLvj6ABP3/6d4rrdRU6WPAlOQprJYJ6u8v HlYcByF0OH91DTi+lUWPwLtOTsPb9G6D+VeAsDqkTUg5DYBVgjE7QPVzXh9hiLCOANVZ b75OoVpZVbmUBMKrXdXn6kPHL8VTcUVt/vPcNLkyAsosCztv7MhcTztRX+0N1z8ZL+px Q5IA== 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=o4VBgUoD9xNgoK5C8+1kRe8R+4IyW/z5QUHuwp5jIi8=; b=HkaNB/mOiJZFWFjeeHV8sAwV8dYoKhjFr/A6x1bOHRkBJOR+fIQ4h/+JlLlYpZzHYL Uz8UBIYgLqwiHXSWBIoCmiYZm7yOCPOjghs1MXL9YEpZTj5ZwQaCIOcn0MBJA8ovstW9 HyY6tyt0EQYQRNV1M9xwbdSfOgTJMVRzfZAS+YATEVtXzqoP9wLRghRAmrtwzAXeE+Lj UutqZJdYMwibXD5wGqwvT44MKpAgRItNN+kSpKRqbUkvvgeZx66C5WY0KbVSV8CMYGqQ 5vfwP7xAZEKlgO2tCaEUXidg+4a8V7UCg4cwxm10/DIzCyWQFZ+b36qimvUxqSll9sne sw5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HNPGGDvi; 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 v26si21025edw.489.2021.05.12.08.40.41; Wed, 12 May 2021 08:41:05 -0700 (PDT) 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=HNPGGDvi; 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 S234613AbhELPdY (ORCPT + 99 others); Wed, 12 May 2021 11:33:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233963AbhELPPu (ORCPT ); Wed, 12 May 2021 11:15:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D88D661946; Wed, 12 May 2021 15:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620831915; bh=jkaV2nmw3Gi8Q5AUWIBWA7kjbfP1eMYNfSxPqktk22w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HNPGGDviCypv24pfX5P8u0Rdn2IJy4ZD64NlKl9tXLADH/f5ZsT6HLqx6O8+kUw4/ rkRAT57WbSR/COXZA6/HB5tDW3QupXI+nkFSlWFxIrTd8i8/3GV3VuXjz8PYrD4LZx FKo0SPfK6v/rh6uUK/DfFVLL+/WLH4IhKn/NFIKI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wayne Lin , Lyude Paul Subject: [PATCH 5.10 065/530] drm/dp_mst: Revise broadcast msg lct & lcr Date: Wed, 12 May 2021 16:42:55 +0200 Message-Id: <20210512144821.895553542@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: Wayne Lin commit 419e91ea3143bf26991442465ac64d9461e98d96 upstream. [Why & How] According to DP spec, broadcast message LCT equals to 1 and LCR equals to 6. Current implementation is incorrect. Fix it. In addition, revise a bit the hdr->rad handling to include broadcast case. Signed-off-by: Wayne Lin Cc: stable@vger.kernel.org Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210224101521.6713-2-Wayne.Lin@amd.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2829,10 +2829,15 @@ static int set_hdr_from_dst_qlock(struct else hdr->broadcast = 0; hdr->path_msg = txmsg->path_msg; - hdr->lct = mstb->lct; - hdr->lcr = mstb->lct - 1; - if (mstb->lct > 1) - memcpy(hdr->rad, mstb->rad, mstb->lct / 2); + if (hdr->broadcast) { + hdr->lct = 1; + hdr->lcr = 6; + } else { + hdr->lct = mstb->lct; + hdr->lcr = mstb->lct - 1; + } + + memcpy(hdr->rad, mstb->rad, hdr->lct / 2); return 0; }