From patchwork Fri May 21 12:49:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 444684 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp947477jac; Fri, 21 May 2021 05:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXt4fWsphAWsr4DhUoTBJSuxFzSRtydQVxPwFDkg5YdrHAZWo/InTAiY4NwLE7HPVoFUYW X-Received: by 2002:a17:90a:ae15:: with SMTP id t21mr11162274pjq.55.1621601470039; Fri, 21 May 2021 05:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601470; cv=none; d=google.com; s=arc-20160816; b=KSPS0XLEQ9jvDZa2CWLVo7cO+SC8GYSA7Mu3AB9gWWlQyIc8qTAtoDTrkZrEtPqrd7 0//ZBYidshHZ1ZwX40TlkMNtnZMpo23PXMKT+Pw8cyIIKKifidHszBXzZhclGpnoa3rf xoQYe54OkuQ6uJz1ZL1jrOdPDlq+gBCcgq3SaYeH4d4i06PjWhdwqYFgfH5SZgT7/483 CQUokKINL1p5jDzaKygeidXIDQf/shZcJmg7kV8Rw7kvYOkiHnmRjJylQ5NsDQ5o07uw RDhjTRp84v+9H7ikWVZp98VlRoEO/aCb1wxlutkibFGQW7H02775k/t4U5GV1PQFuTLg b/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=iimuAY9vsMYvuAUIInB0upgtFDgzNEGiZwmyEGL5iLQ=; b=w3g6sA1gIfFi4xlQ5Hi4baLbIbCLvABhyktcLiVePGG+oRdEaNOcGbP/yVNf9G6rfI KMkSW/f35vlZAC4p0VTqKTtPQAUBlrwpnd/3kiLNgNcbyre8Qml0YGmmsbYFEY+5xQIK 1Lo4EEaVFe1mgz+moRt1kihzH1cq23EGmh7gAZkkDWfx9cszEns3tO8xS4Lclm1Hzj1n T7yLIQdXxiOgF49/47KULyVeapQRYQesFNDf2OC9JwUG9ONVciZnV7OxPgYQxXzrhQqS gMkwT5T8Cvjcb6kdTYwQAzHI4ZBou2u/ThosWWW88vuP/Hp3FKWGI4pjpeJIbnklkBw8 peeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=FB68gwgt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s145si6522702pfs.223.2021.05.21.05.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 05:51:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=FB68gwgt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF04E6F640; Fri, 21 May 2021 12:51:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id CDEAD6F642; Fri, 21 May 2021 12:51:05 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id E14876128A; Fri, 21 May 2021 12:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621601465; bh=eVVDh8nCN1Yb9AXj+WoqxP1WMiIq4cunVQYwXJ411+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FB68gwgtGq+RZ4lPSxPU+13XhnB3Z1HeAi0q79m3DM6PjhpWtWjDip5fcFjxrhvM+ ol7wYkrEr/NS9MtlEPiMHD5yeRWP/rNHxZq/8s5zBSsycfFi/dKlY8U7G7Vp9LFHDK 0TPbbcvegHUcB+CFnPLq3eobXs3T2Qh0NrwKe3TXRhEBu9bWPlTlhlsmWZpbGuHNKV d+puPRLs5D9EuQjNB2ZGpFT8MHAOlRq50wK0+8TfTxTFhFHVKNumlwUfWr11TapcJp OHdKcxj4MVyXluooa23nXv8aiPKvyA1FHPCfRmUVf4GRGlqYtATn9Rt5czTjmcvivR q+TIbdNhsEpaQ== From: Vinod Koul To: Rob Clark Subject: [RFC PATCH 11/13] drm/msm/disp/dpu1: Add support for DSC in topology Date: Fri, 21 May 2021 18:19:44 +0530 Message-Id: <20210521124946.3617862-16-vkoul@kernel.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210521124946.3617862-1-vkoul@kernel.org> References: <20210521124946.3617862-1-vkoul@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Marek , David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Abhinav Kumar , Bjorn Andersson , Vinod Koul , dri-devel@lists.freedesktop.org, Dmitry Baryshkov , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For DSC to work we typically need a 2,2,1 configuration. This should suffice for resolutions upto 4k. For more resolutions like 8k this won't work. Furthermore, we can use 1 DSC encoder in lesser resulutions, but that is not power efficient according to Abhinav, so it is recommended to always use 2 encoders. So for now we blindly create 2,2,1 topology when DSC is enabled Co-developed-by: Abhinav Kumar Signed-off-by: Abhinav Kumar Signed-off-by: Vinod Koul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.26.3 diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 18cb1274a8bb..bffb40085c67 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -609,8 +609,22 @@ static struct msm_display_topology dpu_encoder_get_topology( topology.num_enc = 0; topology.num_intf = intf_count; + drm_enc = &dpu_enc->base; + priv = drm_enc->dev->dev_private; + if (priv && priv->dsc) { + /* In case of Display Stream Compression DSC, we would use + * 2 encoders, 2 line mixers and 1 interface + * this is power optimal and can drive upto (including) 4k + * screens + */ + topology.num_enc = 2; + topology.num_intf = 1; + topology.num_lm = 2; + } + return topology; } + static int dpu_encoder_virt_atomic_check( struct drm_encoder *drm_enc, struct drm_crtc_state *crtc_state,