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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC2F0C433EF for ; Tue, 19 Oct 2021 16:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B22361052 for ; Tue, 19 Oct 2021 16:26:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbhJSQ2R (ORCPT ); Tue, 19 Oct 2021 12:28:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:51172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhJSQ2R (ORCPT ); Tue, 19 Oct 2021 12:28:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C08C61052; Tue, 19 Oct 2021 16:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634660764; bh=JTD0yxhNiwoaimOyKxDh67eqXCwBhnj/uYevNf6Vv3Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rfqMZQs6S02wfD8Lpp8XLsn1KTOo22eHxr2zRCkJ5Rx0usL24hdRRybMsoG+uo35G ACfcoy2t3M3NjUr35CHgJ2dhLnDVvI8KJW3Ew2w0ykiySlRrcjRcGwAdxAsO1HEN7Y 7/ufr5N2LivOQxB3UnL0WBKVuSLT+++WBLT62149x183uP05AXTO71mZ3mmina9P0N 23Vh8IX9t3poHfgli5j8e41bzbF5AHqHrd8W7hP8MCPyjbHWyBQAyLjT2i4yL4aCJD s22FNKlQ7QKgoM/YvdzwS8Zpw7uS8luNYqVf3YrScnBKWg8/d8ccVx72fdnoSP7kTG EZ6vGSIJjBzdA== Date: Tue, 19 Oct 2021 21:55:59 +0530 From: Vinod Koul To: Dmitry Baryshkov Cc: Rob Clark , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Bjorn Andersson , David Airlie , Daniel Vetter , Jonathan Marek , Abhinav Kumar , Jeffrey Hugo , Sumit Semwal , open list , "open list:DRM DRIVER FOR MSM ADRENO GPU" , freedreno Subject: Re: [PATCH v2 04/11] drm/msm/disp/dpu1: Add DSC support in RM Message-ID: References: <20211007070900.456044-1-vkoul@kernel.org> <20211007070900.456044-5-vkoul@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 19-10-21, 18:52, Dmitry Baryshkov wrote: > On Tue, 19 Oct 2021 at 18:30, Vinod Koul wrote: > > > > On 14-10-21, 17:11, Dmitry Baryshkov wrote: > > > On 07/10/2021 10:08, Vinod Koul wrote: > > > > > > +static int _dpu_rm_reserve_dsc(struct dpu_rm *rm, > > > > + struct dpu_global_state *global_state, > > > > + struct drm_encoder *enc) > > > > +{ > > > > + struct msm_drm_private *priv; > > > > + > > > > + priv = enc->dev->dev_private; > > > > + > > > > + if (!priv) > > > > + return -EIO; > > > > + > > > > + /* check if DSC is supported */ > > > > + if (!priv->dsc) > > > > + return 0; > > > > + > > > > + /* check if DSC 0 & 1 and allocated or not */ > > > > + if (global_state->dsc_to_enc_id[0] || global_state->dsc_to_enc_id[1]) { > > > > + DPU_ERROR("DSC 0|1 is already allocated\n"); > > > > + return -EIO; > > > > + } > > > > + > > > > + global_state->dsc_to_enc_id[0] = enc->base.id; > > > > + global_state->dsc_to_enc_id[1] = enc->base.id; > > > > > > Still hardcoding DSC_0 and DSC_1. > > > > Yes! > > > > > Could you please add num_dsc to the topology and allocate the requested > > > amount of DSC blocks? Otherwise this would break for the DSI + DP case. > > > > It wont as we check for dsc and dont proceed, so it cant make an impact > > in non dsc case. > > > > Nevertheless I agree with you, so I am making it based on dsc defined in > > topology. Do we need additional field for num_dsc in topology, num_enc > > should be it, right? > > I'd vote for the separate num_dsc. Okay will update... will move up topology patch up in the order for that as well -- ~Vinod