Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp80523pxb; Fri, 29 Oct 2021 06:11:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu6m5hu0baoJBM7JW0W9+N2rJHp2Pc2gQyIZ1EtNBr9SYddFuiCrrFOtGZbCYnhhVQ4YRd X-Received: by 2002:a92:4453:: with SMTP id a19mr8000513ilm.233.1635513071070; Fri, 29 Oct 2021 06:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635513071; cv=none; d=google.com; s=arc-20160816; b=I1Z7EUBfHka/O85pYVIXsMh+d2i+tTgIaa8CRRnZkOlS5xWbd4576VmZTDb/7f00zv nCTpTFAzw1Z7X49WTXrX6Lme1dw0KZmcpTu7p8BZSmOfH3GsdD39roEbY9BLjLH5942e 7Q46pST4/yvj+PIJGbwv/f+8GfzBmQQ2MfA2ixFTPR8uBfRT8lKE7rRZK7xunFaOr7bF F3QzMB9SYHXdojA+DIxDN9ZmOk32KQLJ3LiC5LhZ78gVOMocqbBC60nSfMFE9BNR4x0/ 5FmIFnsHdZ+nJOOB7O07UZPjkrkVDmZHjfHnVyRw14RMDsyQ/cVte/cPmV0ZD0s/XTtT XZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RM/bmXapeBMh8+hpkmuvSolriwwEu8yH0p43JcPWCxk=; b=hHkwIazENttHRNME8DexJ4WYTETuYJLi7b5aG3HvOLgCknc/gWPznmECSWVNtxMCqN TvH08wG/ECAJFMD/MYewj5hjI+SXWJe+JXPW9OMwZo3oS6aiLSNSmiWEK9tTxGQxMLIt npB6IG6SJlU6nrzqhIzRXvl5tOLVgeaJgecAOKGaww91Vf3H+JioEoD2aFoUyB//LE7F KWTg5KngvaCKVlgnBGdhdelVKzz4ehdxDy7RAgoQN0tNQH/v2WEH+rssE7zuFFa3Ths4 HhKf9i9s7m2KmEPuVUPSwq9FsTLdVtx/Hf/BFRlg+6FrV7/MXE+1ZN/32/Wa2/51RcLk kolw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JbrJN6TZ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si4573127ilj.67.2021.10.29.06.10.29; Fri, 29 Oct 2021 06:11:11 -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=@linaro.org header.s=google header.b=JbrJN6TZ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbhJ2NKS (ORCPT + 99 others); Fri, 29 Oct 2021 09:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231551AbhJ2NKM (ORCPT ); Fri, 29 Oct 2021 09:10:12 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC210C061745 for ; Fri, 29 Oct 2021 06:07:43 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id gh1so6240397qvb.8 for ; Fri, 29 Oct 2021 06:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RM/bmXapeBMh8+hpkmuvSolriwwEu8yH0p43JcPWCxk=; b=JbrJN6TZUsbo9JpQsvgIVP6KOjV8795JkEAt7GBb1EHJ1OA5nURuxMQ0K2v3Z6Vaj3 MT1GY/SYopL87+NU20ZTwHkq8auoreegZImNaxJMuGAKvZtRBclj2VQKCcpoUeLzWtVC imI6YyBK5Hkpvi9BoWCu4eYU+YcigCHMY0KSLezdJrRxnRtSk2WYX5GaC+gX9/qYlPxb qRWqhEaZWwE5kp07fHg+z3Qe0q2LXf7L2cgDjLdbKqcmAOIV4NNCp7fffZ425HRtAPGG 2KBecILyimsbz3joFdek1ayqQASemWcmzBwQSoegfJP6RSTyvYdYqNAv5hpYJbF8kWft CA5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RM/bmXapeBMh8+hpkmuvSolriwwEu8yH0p43JcPWCxk=; b=5oma2SBbVd8/AwPaLtdA7l1b+m+wZK9cJIoEUm0xWDncl8KyOTzN50QJCNBBIxNji9 9Yb99ItyJPT2DsEj8zT4FPHHpcDQZaQ2hJfUcLbtU/+9tZQCknlCQ9YHm2ELj9ND9nSB NiW8ZrFwTMjH61+SUfjR9lZ6mT1xRPCYejW4Z7IPID0IH7xNt/NSoarX8yW7cwHZBCiT uNro9TU8Xv/uWlB40ufGqYA/AYnOVKAXZFvHdCPSLBBqHD6KddOD5NuEnFtbmsRmpFbJ JgleAgBZCHCYxMuLBLjJEwdEp4BFrMSiLDFTYi0xp0vE2EpF3ApTHPq+f37OtmT96lFP Obhw== X-Gm-Message-State: AOAM530/8sT+g5OspNp9hYRnK12N2zpB5cOSIEYx7sFhMwIp39n60mIW trCRsbmhVpIksCWFXFWdTvz+dAdVV5L7icDCOkV3uol6NYI= X-Received: by 2002:a05:6214:229:: with SMTP id j9mr10536899qvt.27.1635512863100; Fri, 29 Oct 2021 06:07:43 -0700 (PDT) MIME-Version: 1.0 References: <1635510619-6715-1-git-send-email-quic_kalyant@quicinc.com> In-Reply-To: <1635510619-6715-1-git-send-email-quic_kalyant@quicinc.com> From: Dmitry Baryshkov Date: Fri, 29 Oct 2021 16:07:32 +0300 Message-ID: Subject: Re: [v2] drm/msm/disp/dpu1: set default group ID for CTL. To: Kalyan Thota Cc: y@qualcomm.com, "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , freedreno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , Rob Clark , Douglas Anderson , Krishna Manikandan , Stephen Boyd , Abhinav Kumar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Oct 2021 at 15:30, Kalyan Thota wrote: > > New required programming in CTL for SC7280. Group ID informs > HW of which VM owns that CTL. Force this group ID to > default/disabled until virtualization support is enabled in SW. > > Changes in v1: > - Fix documentation and add descritpion for the change (Stephen) > > Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 5 ++++- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 8 ++++++++ > 3 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > index ce6f32a..283605c 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > @@ -45,7 +45,7 @@ > (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) > > #define CTL_SC7280_MASK \ > - (BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE)) > + (BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE) | BIT(DPU_CTL_VM_CFG)) > > #define MERGE_3D_SM8150_MASK (0) > > 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 4ade44b..31af04a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > @@ -179,13 +179,16 @@ enum { > > /** > * CTL sub-blocks > - * @DPU_CTL_SPLIT_DISPLAY CTL supports video mode split display > + * @DPU_CTL_SPLIT_DISPLAY: CTL supports video mode split display > + * @DPU_CTL_FETCH_ACTIVE: Active CTL for fetch HW (SSPPs) > + * @DPU_CTL_VM_CFG: CTL config to support multiple VMs > * @DPU_CTL_MAX > */ > enum { > DPU_CTL_SPLIT_DISPLAY = 0x1, > DPU_CTL_ACTIVE_CFG, > DPU_CTL_FETCH_ACTIVE, > + DPU_CTL_VM_CFG, > DPU_CTL_MAX > }; > > 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 64740ddb..02da9ec 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > @@ -36,6 +36,7 @@ > #define MERGE_3D_IDX 23 > #define INTF_IDX 31 > #define CTL_INVALID_BIT 0xffff > +#define CTL_DEFAULT_GROUP_ID 0xf > > static const u32 fetch_tbl[SSPP_MAX] = {CTL_INVALID_BIT, 16, 17, 18, 19, > CTL_INVALID_BIT, CTL_INVALID_BIT, CTL_INVALID_BIT, CTL_INVALID_BIT, 0, > @@ -498,6 +499,13 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > u32 intf_active = 0; > u32 mode_sel = 0; > > + /* CTL_TOP[31:28] carries group_id to collate CTL paths > + * per VM. Explicitly disable it until VM support is > + * added in SW. Power on reset value is not disable. > + */ > + if ((test_bit(DPU_CTL_VM_CFG, &ctx->caps->features))) > + mode_sel = CTL_DEFAULT_GROUP_ID << 28; > + > if (cfg->intf_mode_sel == DPU_CTL_MODE_SEL_CMD) > mode_sel |= BIT(17); > > -- > 2.7.4 > -- With best wishes Dmitry