From patchwork Mon Sep 13 13:14:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 509766 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp618505jao; Mon, 13 Sep 2021 07:35:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsIrJBbYxqFNqX7P63b1ApRrV+6WJXMErrCeMuAB03QthKUzLAdtsIRUsz0kobG9PNKP6T X-Received: by 2002:a05:6512:33c7:: with SMTP id d7mr9145134lfg.18.1631543720443; Mon, 13 Sep 2021 07:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631543720; cv=none; d=google.com; s=arc-20160816; b=WtqeM15p8SCXfU5twTkmP5r18z7jEdgAg90mt6NvO1Wu3Q+RJ0TBtGJQFqOGgfhcr0 iWch1WBTc08LZR+Vzy6VW8cxX02IdDqmwYVk9CfzvKRfo/A70X6r8v/Cg45mGEOd2TVz EtfS9OeZkdc5KpejjzHuw7BvkLB+WJlZXSuh0qcRjVKlhhJf8ZT6XxQ0+8p8gGMt1r11 TztwDfcUB4dxMp+u+DoF5sq9ORfEdlHZw1eG7v1Y37ENH/ygQQmjyvPXJyK1Ou1sijQR 3CuiRASfRk2JCqLg3Qa7OwtA7WVOabQdAi5tnswvSIrm4bDvgBOO6TtUr4v52VinhMi2 WexQ== 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=Rwt3/bKyAzPJ/hCrUl6GqDK+buYHscY7QPO2n3025Uk=; b=E7Vpn5LzYGCu3GVW8siSh4xXxqIvtV3sLW7h8VeWxMK1gnq6gk2lRSHjdELFFrGyE6 2LQpPsEFFpbWio2zUPKxnr9Ofn751lQlz35rM6RShInHmAviUDOfs45bAl963nBrwBib cWoWgK/LQNQImQ7GrpqvMZnJvQvN/UIZcYw93Cs/S0xToQKuRL8WDCvrOMUEf+zjT+Pl Gvygy0sFCVqr6GEH6SHefm8Xw2KMAo4gxGbtGkZqXJH73AWFDXN0bnnsK5u4nDOTogcV i/+qXqVjTsYmwNROgUIShBA4pv3hu6u1Gc67NOP2QHzYBo6qQluscZsFLIjwoQOLc3vU ZIvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lXQ7bMDF; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 er10si175213ejc.675.2021.09.13.07.35.20; Mon, 13 Sep 2021 07:35:20 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=lXQ7bMDF; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1345514AbhIMOgK (ORCPT + 11 others); Mon, 13 Sep 2021 10:36:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346558AbhIMOdX (ORCPT ); Mon, 13 Sep 2021 10:33:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C516C617E5; Mon, 13 Sep 2021 13:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541160; bh=gv5N2Mev9qyZpg7l6F+Ly/x459Xf+FFA9ha7rJSKSC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lXQ7bMDFghC3AypnBptx+g8Z7d36YQMyJC7vUkWJ38qxkPVxXMvNli8YBmSQPVbJL RmdVF6b7C4lldDJUmQTpMsfllQFOk9WI8HAnICQGU06ma0m0/+i4FmIFfUqog5tJdM k6nHxe9Vc1Zl+HrFy89IIK3cqul6SuURXi5M/SRM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Baryshkov , Rob Clark , Sasha Levin Subject: [PATCH 5.14 187/334] drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs Date: Mon, 13 Sep 2021 15:14:01 +0200 Message-Id: <20210913131119.678694194@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Baryshkov [ Upstream commit a41cdb693595ae1904dd793fc15d6954f4295e27 ] dpu_hw_ctl_clear_all_blendstages() clears settings for the few first LMs instead of mixers actually used for the CTL. Change it to clear necessary data, using provided mixer ids. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210704230519.4081467-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c index f8a74f6cdc4c..64740ddb983e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -345,10 +345,12 @@ static void dpu_hw_ctl_clear_all_blendstages(struct dpu_hw_ctl *ctx) int i; for (i = 0; i < ctx->mixer_count; i++) { - DPU_REG_WRITE(c, CTL_LAYER(LM_0 + i), 0); - DPU_REG_WRITE(c, CTL_LAYER_EXT(LM_0 + i), 0); - DPU_REG_WRITE(c, CTL_LAYER_EXT2(LM_0 + i), 0); - DPU_REG_WRITE(c, CTL_LAYER_EXT3(LM_0 + i), 0); + enum dpu_lm mixer_id = ctx->mixer_hw_caps[i].id; + + DPU_REG_WRITE(c, CTL_LAYER(mixer_id), 0); + DPU_REG_WRITE(c, CTL_LAYER_EXT(mixer_id), 0); + DPU_REG_WRITE(c, CTL_LAYER_EXT2(mixer_id), 0); + DPU_REG_WRITE(c, CTL_LAYER_EXT3(mixer_id), 0); } DPU_REG_WRITE(c, CTL_FETCH_PIPE_ACTIVE, 0);