Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1844078pxb; Mon, 13 Sep 2021 06:47:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdvN0QMR0tTklnN4VQJUUgt5dSPVhqkTlPTy8OLnCtGlVZ7MWTDjtpLKFe8udcNNi2KVde X-Received: by 2002:a6b:7212:: with SMTP id n18mr8780899ioc.175.1631540834396; Mon, 13 Sep 2021 06:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631540834; cv=none; d=google.com; s=arc-20160816; b=wkpOIy6O4H+HrZbZObK3BlZSahpnh3bcs/q/TXJQ72ilNHdP2d1tXA8W2a2PnTeQiB yC4K8X2lKqhDZ6s8gFFt6de2K13okzZQ5+1voZjeQtpZv9vn4zgE0qO6uSKBZWyy+Rnb 9BxlRyXD6pZjkqX0ByeOpodxSCNgb1vV03nVxAB2m5quRYDX2jy/L8Kpy5ykliEDPY+a ysXFFn6chi96I3Zzyeuwza18QmXwcurZSy8xedt/YdfDFt9iaLRUEZsDKMOY2WhwBZuO ZKCnpCWuAZNy1OrJCyaD2Cg2aKfSbccorn8CqVjiJlTgHy3h2d/VyJariiJZwGXmt5vX P0mQ== 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=m63xDE/iAp/2gbJkhSwIRSWqUqBnDPPKmtvNrjMCC8w=; b=ZB+0nyGYYtZxl1AYduW0VEw+upeAEjVgXE1nxkARnz2HpXAHicERKSCxTDHXnjpz6m AQzQcxKslOjVj+qQ/ocm53JazQ84tAx6CZE/rla/o6A7VA1SiL1raMy1psyyAqCwxNWO XRNaRPSC3noE2L0lJTRdkt4qKnwwU1DEsp4Dx/PXtuhzatp/UsP1IKo0GI5EvaKFvgCu dbVrYRjBtk2FNtakCsZYiUmgdlCzSrP6Dzd+n58JYrYZdlEYVqkNndajFfvRVAghQGTr azGzd3MB8HuZaAt4P6AqSu8mzdGWzrNs8raACXf2JgdPmPND1aX8ZxFNM4DWIT7Zr+1P LPXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W3+P0QH3; 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 20si6253439ioz.25.2021.09.13.06.47.02; Mon, 13 Sep 2021 06:47: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=W3+P0QH3; 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 S241577AbhIMNq7 (ORCPT + 99 others); Mon, 13 Sep 2021 09:46:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:46524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242650AbhIMNmB (ORCPT ); Mon, 13 Sep 2021 09:42:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6909B61354; Mon, 13 Sep 2021 13:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539792; bh=n1fzEh8BglQyvMQT+P5Pol8uCH4i0Nhg/xP7DY9oYuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W3+P0QH3liXIgXHxCjsTPpORiZ9SCanefXfSi2GzcsbfySOZJvbwxDQtYZ5tyQX2T BOs45eZyl8ZZC1bpV+d/Kgtyk2Tf5Ha3HdeaDrk/kKn+MckvCWAdPw7csnksZSUDsI 7VGgemjfBQ/vXDMDigxwQUUPA7lQrCfD1XSEeFIA= 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.10 135/236] drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs Date: Mon, 13 Sep 2021 15:14:00 +0200 Message-Id: <20210913131104.957159343@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 758c355b4fd8..f8c7100a8acb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -340,10 +340,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