Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2567664lkm; Mon, 20 Sep 2021 18:55:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMXrfEH31JXzbJtmkBDtSChQkZfUghpickrgFzpwe6HhZZ/mF42c4/88Rk9EGMuZhmmdN/ X-Received: by 2002:a5d:9949:: with SMTP id v9mr8282311ios.58.1632188894208; Mon, 20 Sep 2021 18:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188894; cv=none; d=google.com; s=arc-20160816; b=R/dPk3c0aSrRU1grWu+IPPDcQO8ti2uf+zuDdrrAc95Mm9CTvnZ/yAsNn/noP4DDK9 IrQUi0HUzDQrTHfkAYEl0BWJGTKZIjCnQG2YEMsyOnUzcevLcHNe8OFbArsUSqTdMeVe OdWKjgvSPotgRitJsy/Qh6kjDCacYevYMVYflcMuedUX4H909tQyRPdGTsiMuzUPUIsk 9qZJ8fr6huk3mHp5vm3AFb1gPvM+Jp+h5GXpdQrXNug7HCUOlk4u/e5X3aj8EHf+kM4k ak5LghuDy5b8Va29IWtyPh7/8ty1/W2czd4Vu1NKdS3Ds5yuGdZtH0S3MGU6t0fx+G4+ YHcg== 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=iBZUTkfVehrhruvZD9/hTYPGEmrGFpE69+Bsg8ZOTaY=; b=YLk2jiHAg0/wfgQvMoY1Y7eLXqvy2KVyNNg6jUxdpml9YpK0AxQV3JJBFJ5dZu7JtE uN/6V1pVO0A+7+QCdEs1Ijcp/ql1XciXs7MqhyF8hhPtyxJcwG2SW1Di7YNMoRItxg/P 9eNeGwgJM8MLEWBXaj+Y4K1b0Wu3nXD6pUz4QIRXLgm7cqMRP7SMTV8m/e0+HipCzzHX gKTFNkKnPznD/xZhyL2TXLdJVINf/+pT39J7B43g21L+1hL92qu3DjpC/tUwS0F8/n9l nx38m0NBU7SKnv78W9KT2DJj/PrxnIYeGMc6YmU63SqnALATZ6MoaRhW1AYaDNNDGiNW BfIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YZf6Rzea; 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 k3si7049274ilu.165.2021.09.20.18.48.02; Mon, 20 Sep 2021 18:48:14 -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=YZf6Rzea; 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 S1349582AbhITRkX (ORCPT + 99 others); Mon, 20 Sep 2021 13:40:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:42622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352094AbhITRhs (ORCPT ); Mon, 20 Sep 2021 13:37:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1457161B31; Mon, 20 Sep 2021 17:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157624; bh=4HeXLVWGu15t8OzVzGD9ee3B3H4cMlCbN/2q9IrAUqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YZf6RzeaPBNI3KGwlPuP3TicoXb8bUCOnyR5meuocOnyqbtS3WDDBJEWWGX24BNOk gWb9k6pQ2x1N+AiOG5NF8IEHkdU/9mgCI6fIDmZP2thgRvEa8T4bGAcKS9yyk7Owub k8O/ExV9/zR2X0b6VZGR0bZBjYM220MGw80h0O0M= 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 4.19 077/293] drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs Date: Mon, 20 Sep 2021 18:40:39 +0200 Message-Id: <20210920163935.900630287@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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: 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(-) 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 79bafea66354..a40ea5c68572 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -296,10 +296,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); } } -- 2.30.2