From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53C26C4338F for ; Tue, 3 Aug 2021 01:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 365FB60FC2 for ; Tue, 3 Aug 2021 01:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbhHCBWT (ORCPT ); Mon, 2 Aug 2021 21:22:19 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:28448 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbhHCBWS (ORCPT ); Mon, 2 Aug 2021 21:22:18 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1627953728; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=69oMaUQoA4ReczOKXAVfPDBIj5MKdJ/GxjJmCjK/vaw=; b=R47yA/vrsk1fh3Uh4pF7zI7pgrT+HJcuYN2BJUUJBIiKc+e07W8nntBfqaQ47jZVTFJtwELJ NzO8uv4UURWhhYJ9d5G5Cz5ym/riYvcXFfE4+o3eyJwu4rVzdU1r+Xtqt7Cl4rvA347/dRrq dkIp+yZK6G9z3J+QSGOnENRa1d8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 61089a3b96a66e66b293abac (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 03 Aug 2021 01:22:03 GMT Sender: abhinavk=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A7376C433F1; Tue, 3 Aug 2021 01:22:03 +0000 (UTC) Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: abhinavk) by smtp.codeaurora.org (Postfix) with ESMTPSA id D6302C433D3; Tue, 3 Aug 2021 01:22:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 02 Aug 2021 18:22:02 -0700 From: abhinavk@codeaurora.org To: Vinod Koul Cc: Rob Clark , Jonathan Marek , Jeffrey Hugo , David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , dri-devel@lists.freedesktop.org, Daniel Vetter , Dmitry Baryshkov , freedreno@lists.freedesktop.org, Sumit Semwal Subject: Re: [Freedreno] [PATCH 11/11] drm/msm/dsi: Pass DSC params to drm_panel In-Reply-To: <20210715065203.709914-12-vkoul@kernel.org> References: <20210715065203.709914-1-vkoul@kernel.org> <20210715065203.709914-12-vkoul@kernel.org> Message-ID: X-Sender: abhinavk@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 2021-07-14 23:52, Vinod Koul wrote: > 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 based on the comments on prev patches in the series, this will need to be reworked too as there wont be any priv->dsc anymore. Also, can you also post the panel changes? Would like to see how you will use the dsc param there. > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 16 +++++++++++++++- > include/drm/drm_panel.h | 7 +++++++ > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c > b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 4e8ab1b1df8b..ee21cda243a7 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -2193,6 +2193,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); > @@ -2212,8 +2213,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 33605c3f0eba..27a7808a29f2 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,