From patchwork Wed Nov 23 21:04:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 628091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DF9CC43219 for ; Wed, 23 Nov 2022 21:04:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237484AbiKWVEb (ORCPT ); Wed, 23 Nov 2022 16:04:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237068AbiKWVES (ORCPT ); Wed, 23 Nov 2022 16:04:18 -0500 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E511E99EB0 for ; Wed, 23 Nov 2022 13:04:12 -0800 (PST) Received: by mail-lj1-x22c.google.com with SMTP id b9so22752608ljr.5 for ; Wed, 23 Nov 2022 13:04:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8BL3dVpq4lInuNIJjCsSuR/7YS0AX1mCMhw4iqXJEL4=; b=Pii11tTJEWXqdPtDtZmrubLFVnpOkE5p5lqN5IVEykTUegm9WmZhWA3fqLoMUvenbT eLobFUp8evmILhKxD1UaNfBjsxWy8XxPvucHiK+ot4fSFsot6/FPSt54LQInzoB7dER8 1DO4uYRmg6S0zh5mmFgaLRqGfCY04ouSjVrGFUYq0BHrw7Anr/AM43RQJTFSSvre37oF 6AT6vxLCq/66BqUFqClkuBSwAMH8U3U1a1eTZaBwkzTQcTNKQnhmFLLLLi5eehGVbNMH q+Ebcc/fgXQd2CI3Bqf1GxOBMdnRT+KKrunFDaZH5UtFyYMdP4np0e5Z/ZXhduVnW9ML 27HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8BL3dVpq4lInuNIJjCsSuR/7YS0AX1mCMhw4iqXJEL4=; b=wiuXlFGC+5xKX57hFwcHmdYw/OaeOvsdK+WDfGwamwesCgsrSQsCnXk4MvS4gzQ9kR CKZyJCTqum0EYR1w3AieTO6Rns2FHFAuxzkLDiSBjANEj+Xnb+ZwxzOHomjQnLMnFxQE CSQDUx9ngzFJz5hcqd41+EoqJ3ZIPsS/JwLlSRCaJI9EISeT1J2+kk6FaVeIjabR7eYq jPM+h4uITVedoPvJyv4A0wyVULAPHuQYo/IXHrwqsFCvWohJ2OB/83V8ZYPW+UncGQay IHTVzy8e1yMtD9FjjUWlyXD4Ra4xhsxM0JwHfwa4SfilmlAJvJzezuvaryWps3JG20zT Pg0A== X-Gm-Message-State: ANoB5pmVSxTpwaEcnksOONGxFZEu1jYveL8CKib8jigFgIyq/PFq7g+V sJkhc4RoY+jL5sYJ37/UodWt/A== X-Google-Smtp-Source: AA0mqf7OHJ55sOzx13XCGgisDIl9E4avBxDZGbPFWdgpeCuwNJQmQB+9qxJNqPxCFK3/69FNUm3vmQ== X-Received: by 2002:a05:651c:32b:b0:277:8d3:4298 with SMTP id b11-20020a05651c032b00b0027708d34298mr8811264ljp.302.1669237451083; Wed, 23 Nov 2022 13:04:11 -0800 (PST) Received: from eriador.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id c3-20020ac25f63000000b004b177293a8dsm3009913lfc.210.2022.11.23.13.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 13:04:10 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Clark , Sean Paul , Abhinav Kumar , Rob Herring , Krzysztof Kozlowski Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Vinod Koul , Konrad Dybcio Subject: [PATCH v5 08/10] drm/msm/dpu: add support for MDP_TOP blackhole Date: Wed, 23 Nov 2022 23:04:01 +0200 Message-Id: <20221123210403.3593366-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221123210403.3593366-1-dmitry.baryshkov@linaro.org> References: <20221123210403.3593366-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On sm8450 a register block was removed from MDP TOP. Accessing it during snapshotting results in NoC errors / immediate reboot. Skip accessing these registers during snapshot. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 3 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 38aa38ab1568..8da4c5ba6dc3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -82,6 +82,8 @@ enum { * @DPU_MDP_UBWC_1_0, This chipsets supports Universal Bandwidth * compression initial revision * @DPU_MDP_UBWC_1_5, Universal Bandwidth compression version 1.5 + * @DPU_MDP_PERIPH_0_REMOVED Indicates that access to periph top0 block results + * in a failure * @DPU_MDP_MAX Maximum value */ @@ -92,6 +94,7 @@ enum { DPU_MDP_UBWC_1_0, DPU_MDP_UBWC_1_5, DPU_MDP_AUDIO_SELECT, + DPU_MDP_PERIPH_0_REMOVED, DPU_MDP_MAX }; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index f3660cd14f4f..4ac14de55139 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -927,8 +927,15 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k msm_disp_snapshot_add_block(disp_state, cat->wb[i].len, dpu_kms->mmio + cat->wb[i].base, "wb_%d", i); - msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len, - dpu_kms->mmio + cat->mdp[0].base, "top"); + if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) { + msm_disp_snapshot_add_block(disp_state, 0x380, + dpu_kms->mmio + cat->mdp[0].base, "top"); + msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len - 0x3a8, + dpu_kms->mmio + cat->mdp[0].base + 0x3a8, "top_2"); + } else { + msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len, + dpu_kms->mmio + cat->mdp[0].base, "top"); + } pm_runtime_put_sync(&dpu_kms->pdev->dev); }