From patchwork Thu Oct 7 07:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 515448 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp1022704ime; Thu, 7 Oct 2021 00:10:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNkZck7pYG7LpqwyUkhSB9cMhbpnNeziTV+1L4r7EKNMAcj7EDxlLxyYj2r17lczV8MuEo X-Received: by 2002:a65:62c4:: with SMTP id m4mr2108217pgv.453.1633590612128; Thu, 07 Oct 2021 00:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633590612; cv=none; d=google.com; s=arc-20160816; b=0N+2c5MdKbRQppS6MfDQkJt2yp+XOVF++fvEdEA2WczuOhfWa4I5n99DtCOoJ7241I u6wh0mRf3NGQl9G/UV9VqwxBLEx5SsvIpT5CxClOrx6uJ9gASdVNBAAVq+giw8wr7iLB yibdQ8VBZzP7lUAFt8oTVs3F+J3PD0zTnGxfoaw/qOXErGC4uZ+ls+sObxOJmDlWE7qh ORUDpLDbGscpY5El8BF/aJf1asV4EJV/+sJHs+4riuFjCIbe0aWg+dFQnXFmfiydTtkj hdKe451/0Nlk5hMbBgWgCvENusrZHlHjgxRKjPGbcVitsSWVj2SPioULa+Pk2bmgZUFb l9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature:delivered-to; bh=h2syLM/zBRf1CUKuFEYICvhoP/n6eRB2jXxd62yGyXM=; b=xqi2tvurrlXlKt4T9JRetwFW47u7K5v0Q8ziRhmUXfoKseSIwn9yca1Ok+be14e7JJ bKQjRRy+TsVxk+3IjuafbKYRS8kT6XpfPq9iSlBd0vpj7iyKSEF6+zwtSHqfw491hZyT hGQo6cIPha4fq0GEGL6ISw1iPh1rPtm2EywiMWbOnLSaByAWRtPceZgFWMScFUKNEkfq Szj6hUkwRUIMxOmDYJ+v87CltzM6PFtTLpA+vJo7p28IB2OVeFpsVu0Nh6mpCu1iO6XR QgR9IrUeRaPRSU+sLBg11HhxZEhZZqQPTpMWOLgoETFGL0gT/KftrZK5Bj7DkIWhDKAM IMrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WH1M949J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id g184si28888077pgc.603.2021.10.07.00.10.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 00:10:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WH1M949J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=pass (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 69D1F6F3A2; Thu, 7 Oct 2021 07:10:10 +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 B4B3C6F3A2; Thu, 7 Oct 2021 07:10:08 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2115D61130; Thu, 7 Oct 2021 07:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633590608; bh=3vu4Bee7oRVtNEuAX+7MQpXOIM3UymsAieFKiYA33TY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WH1M949JZayrWDTDrn0QWRC4vV5vJAtuurxDdIjsju7GA4SWll78oHtm17CVb4ClI qXmB99IO5w++fH0Jow7Uq8J5+w3SvrRumejzGwh+R52jPh4AcgbU1nC/WIPbX+XRog 8TeejPVOzD1TG5fiNvf/AKL1IVX3z33HijgMLcvx8Xbot1K6XbPo+HpLnRQTfjip4P OYXAnOpDRnkuudzmFqJy9ZpJcUJfwpsrNFxJEJyPARwzLexZ1bvJ58SoSWSIWWUmym s3NA/6wdX0NnsPl1oHziIWVBNb2RuCdjuPl8YbgyuJ7uEyrTakSO8RTRVaYghmUY7q 4LGHjgTYuI63g== From: Vinod Koul To: Rob Clark Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , David Airlie , Daniel Vetter , Jonathan Marek , Dmitry Baryshkov , Abhinav Kumar , Jeffrey Hugo , Sumit Semwal , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 11/11] drm/msm/dsi: Pass DSC params to drm_panel Date: Thu, 7 Oct 2021 12:39:00 +0530 Message-Id: <20211007070900.456044-12-vkoul@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007070900.456044-1-vkoul@kernel.org> References: <20211007070900.456044-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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When DSC is enabled, we need to pass the DSC parameters to panel driver as well, so add a dsc parameter in panel and set it when DSC is enabled Signed-off-by: Vinod Koul --- drivers/gpu/drm/msm/dsi/dsi_host.c | 16 +++++++++++++++- include/drm/drm_panel.h | 7 +++++++ 2 files changed, 22 insertions(+), 1 deletion(-) -- 2.31.1 diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 86e36a3e97b6..097827a6149c 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -2192,6 +2192,7 @@ int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; struct platform_device *pdev = msm_host->pdev; struct msm_drm_private *priv; + struct drm_panel *panel; int ret; msm_host->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); @@ -2211,8 +2212,21 @@ int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, } msm_host->dev = dev; + panel = msm_dsi_host_get_panel(&msm_host->base); priv = dev->dev_private; - priv->dsc = msm_host->dsc; + + if (panel && panel->dsc) { + struct msm_display_dsc_config *dsc = priv->dsc; + + if (!dsc) { + dsc = kzalloc(sizeof(*dsc), GFP_KERNEL); + if (!dsc) + return -ENOMEM; + dsc->drm = panel->dsc; + priv->dsc = dsc; + msm_host->dsc = dsc; + } + } ret = cfg_hnd->ops->tx_buf_alloc(msm_host, SZ_4K); if (ret) { diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 4602f833eb51..eb8ae9bf32ed 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -171,6 +171,13 @@ struct drm_panel { * Panel entry in registry. */ struct list_head list; + + /** + * @dsc: + * + * Panel DSC pps payload to be sent + */ + struct drm_dsc_config *dsc; }; void drm_panel_init(struct drm_panel *panel, struct device *dev,