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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 98E49C4338F for ; Tue, 3 Aug 2021 01:22:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D49F60FC2 for ; Tue, 3 Aug 2021 01:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D49F60FC2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D37B389FA5; Tue, 3 Aug 2021 01:22:38 +0000 (UTC) Received: from so254-9.mailgun.net (so254-9.mailgun.net [198.61.254.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9BB1789FC0 for ; Tue, 3 Aug 2021 01:22:34 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1627953757; 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=MAF4iY2eEm5OJ9ICKEdt8pXLaomn/9VDxcVu69acGZt5judvlHca7dG6qpDU0hki+i46jPne fpoYmHKrbXFMzB4Zth7iQUVVnX+YT3fBaRKsaPE2DEBN0AJnreQBeLPXTDVMFIQec6wME/ss UB1SIYH5MIcPZet2OoGSjFs4/AU= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyJkOTU5ZSIsICJkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 61089a3c1dd16c87882ba162 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 03 Aug 2021 01:22:04 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AA103C4323A; 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 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" 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,