From patchwork Tue Nov 16 06:22:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 519188 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6711027imj; Mon, 15 Nov 2021 22:24:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJztWuRWb2b2Zt+WZnJzMNLctXy3ERC5OrQnm5NGmzcgjv5HSIkwS3Buy4aAXqaWWmr9IbwW X-Received: by 2002:a63:9141:: with SMTP id l62mr3352815pge.30.1637043861954; Mon, 15 Nov 2021 22:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637043861; cv=none; d=google.com; s=arc-20160816; b=dorkkCBebHoP4pPeSCbi1SdJWOjpwHpYk18/3atrKCCG6xe2b9Nk5hJ7FihEpK1odh nIAmFBMhjHbo6Y+Nf0fcG0P2FktlskkTfuHIH6AirQpUvR0WIdFdO7+ghJ9oviB2b3cL wuPO1rP9vr8uFjb5qD2/Pqwd7Ke75satQWuF0LebmMiN6XZr5LmW6D5/e2m44fXVJJ3g 5zZBEM//3cQd64iyydGRW6MxaQKJ+dV7849S+9jC+pyhocmWQW4r2jpK9Qo2jelEp3gW nOXjOvQRddZueaB0GBohwT5EDIbtlE+YYg44sJj/Dyp1ps11heNxekvdlc9pJgOTh8Op nnyg== 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=OQ80sETIl7W/jHqKMd/Gq7Fv3DsMXELnRrErjvJXZGc=; b=OhEX+kmR9aQLNiCZ1XhAOGmS0t1dPuHJAnYBrEDTZLpn4sUtUuQInNYRJa6zIqOTtR tMrFM3y8saokqdHwYKigDmApOy1Q7X30ZfCF0LAZFHfCowxBA4jXtTZubNj/bBkkDxCY LkDWoZJ7hrC4gGiicKceMmb/agy8OdODbTyMWY75/4nXaLbxwT+V02WF7JQ9bHF+r4Se ZKAg6H54siWdUeNWnBDQGpquiowgtD/y56o/yIhr1zxU1QD6mH8VUHhT9dq4mkwR8RjK Qe543zQbWXleQuHp0Z0oduL5+cUi2qJmPtFYp/7QGxORDd/6Qfqk2ZnJtdmUabsBZRHR PEXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=lIE+cuBE; 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=fail (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 j10si25788128plc.149.2021.11.15.22.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 22:24:21 -0800 (PST) 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=fail header.i=@kernel.org header.s=k20201202 header.b=lIE+cuBE; 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=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 65EE46EDBF; Tue, 16 Nov 2021 06:24:20 +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 61CA06EDBF; Tue, 16 Nov 2021 06:24:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C1A0A614C8; Tue, 16 Nov 2021 06:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637043859; bh=9JLy3WeI3hgc2qnNfS8pLzvLY1KoU8y2UppMi4uDgCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lIE+cuBE1w+gB4DcCAS23QNvS0s7yNtJ+xSSx7MePAr7MPgSR4PZQ+oUTpOhUr7Rn yI4FazZa9ZPze5BbfCFWX5swFod8ITxDnAozbdsEoMouFAt+po9AdK7TMP9CyjXlkf ixGlBgoHJ/IM3b/YZ7I9yg2LwDU8y4wdZi/GeDQ3a+qtS15kzl3kOR07W8DP5KIxJF kYlQ4rrHBjq9gS5AvdPO/6SASJtEGiIROg8Yvj6NIfrCS0MB0PfIqeOPPu8XAEp6HA 4PMz9oMHo4SZwQaPjkPUzhiL/zMK5JEeLf1BJey4veRdqPBUWssvZ/xKL/S56DjFAr xufKpabs2Eoww== From: Vinod Koul To: Rob Clark Subject: [PATCH v3 13/13] drm/msm/dsi: Pass DSC params to drm_panel Date: Tue, 16 Nov 2021 11:52:56 +0530 Message-Id: <20211116062256.2417186-14-vkoul@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211116062256.2417186-1-vkoul@kernel.org> References: <20211116062256.2417186-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 , Jeffrey Hugo , 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" 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(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 2c14c36f0b3d..3d5773fcf496 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -2159,11 +2159,25 @@ int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, struct msm_dsi_host *msm_host = to_msm_dsi_host(host); const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; struct msm_drm_private *priv; + struct drm_panel *panel; int ret; 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,