Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp151477pxb; Mon, 13 Sep 2021 15:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4LeCPA/VSSfq9cJ9fFZzcKqF/le3Hq4XhekCbpAVowJAiRUEU11SeYoj+bF3F+946H/Pw X-Received: by 2002:a5d:87d2:: with SMTP id q18mr11109914ios.78.1631572608143; Mon, 13 Sep 2021 15:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631572608; cv=none; d=google.com; s=arc-20160816; b=YUwl+EHs7UzPSM6kBwa7ObjKqLJMMRnEWWro6+7rl5OurQ2du4mkGJ/NjpX42CSaj6 k8z7kW06nvWQUOT38kfXhHh8wzemoHsvtymjej3HEfpDeqiUIQuVL3wKb7iOA2C2ZPOh Vu5I+jyVirlXYLVu8F2/u1sHSZjZonIeiKw9/5e9AQLNTdI7wh80ptgqAGf0KpZ5WEwt 52ww3HpfUfdkU9TAdcF/P1oJmQLMM3CkML2HuqkHDK9bPVI7YU8tBffpT8kCNz8VKte5 TjQs9teTAX3h00IajzDB+MmWkSZR1eUKrEGpQWRFiESvAKLdApwjkGRgB0DKSrccdGM3 /qTw== 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=4gh8cVIuNV1HbbqavseWkRv0Ww7kWxHCUBr0/F6TTwE=; b=D8WFC7/d0GOmG2/rinnYX0hCHKrwvBqUvwsIql1mTaa+r5N6EoO7tupScVWmy+uGyK 5rC2nGpMdIpdpfYTHuZfgwG/S0lFocQTa64/V6eWgG3L7/nDSxlmCQNKz4q271/H9AzI 0wMSsTPsLDcZxlzg/W1XSpS2zbLYTiVgAjZvHEbRjXA9BPIbbFIRG991Aa+FPjZFkLCz 9fl/26NDWr699bsjk6fSqreIS5SU+zgMktYNRqgpUqZhqLuyDNMRU/iv6U61HdMShSi4 q3B4ux1oHA5hDZzBUyqGqZnwRD2FZ/MPC7t0W2NVywOH1yAczaHyVLFSwDnjAoqmZZe0 6M2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q4AQXl0s; 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 d8si7777119ilr.109.2021.09.13.15.36.36; Mon, 13 Sep 2021 15:36:48 -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=Q4AQXl0s; 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 S1344216AbhIMOLJ (ORCPT + 99 others); Mon, 13 Sep 2021 10:11:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:57882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344081AbhIMOIr (ORCPT ); Mon, 13 Sep 2021 10:08:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2EC52613D5; Mon, 13 Sep 2021 13:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540452; bh=sZs57kvddvRBJOtTFUeDBapVneoMoyyRPRCbbpMy0vQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q4AQXl0sJDTo+He1jtnMwA20Uiz8LOu6z9RMJb3Wouf8fJ/lO5BV82Ah4y/N6GovC diPw7Iw5kI7T7FkbmNNJ8G3mEomoDYFLXLHrOcDXPr0PTCZSTrurJ7HL78UunHY8FQ 2Ng3g62GTuuiTRdpULVAONt5EIEX1TDxkmhXmpGE= 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.13 167/300] drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs Date: Mon, 13 Sep 2021 15:13:48 +0200 Message-Id: <20210913131115.056008601@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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 2d4645e01ebf..e01135b7a404 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); -- 2.30.2