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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C59BBC433FE for ; Wed, 5 Oct 2022 21:08:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8668C10E787; Wed, 5 Oct 2022 21:08:55 +0000 (UTC) Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [IPv6:2001:4b7a:2000:18::170]) by gabe.freedesktop.org (Postfix) with ESMTPS id F0A3F10E783 for ; Wed, 5 Oct 2022 21:08:48 +0000 (UTC) Received: from SoMainline.org (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 7DCAB20178; Wed, 5 Oct 2022 23:08:46 +0200 (CEST) Date: Wed, 5 Oct 2022 23:08:45 +0200 From: Marijn Suijten To: Dmitry Baryshkov , phone-devel@vger.kernel.org, Rob Clark , Vinod Koul , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Daniel Vetter , Abhinav Kumar , Sean Paul , Thomas Zimmermann , Javier Martinez Canillas , Alex Deucher , Douglas Anderson , Vladimir Lypak , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, David Airlie Subject: Re: [PATCH v2 5/7] drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits Message-ID: <20221005210845.yednmbqec4bzukxm@SoMainline.org> Mail-Followup-To: Marijn Suijten , Dmitry Baryshkov , phone-devel@vger.kernel.org, Rob Clark , Vinod Koul , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Daniel Vetter , Abhinav Kumar , Sean Paul , Thomas Zimmermann , Javier Martinez Canillas , Alex Deucher , Douglas Anderson , Vladimir Lypak , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, David Airlie References: <20221005181657.784375-1-marijn.suijten@somainline.org> <20221005181657.784375-6-marijn.suijten@somainline.org> <20221005205845.rwkzyit4daizi3z4@SoMainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221005205845.rwkzyit4daizi3z4@SoMainline.org> 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 2022-10-05 22:58:48, Marijn Suijten wrote: > On 2022-10-05 22:31:43, Dmitry Baryshkov wrote: > > [..] > > In fact, could you please take a look if we can switch to using this > > function and drop our code? > > [..] > > Do you want me to do this in a v3, before applying this fractional-bits > fix? [..] One thing to note: /* bpc 8 */ dsc->flatness_min_qp = 3; dsc->flatness_max_qp = 12; dsc->rc_quant_incr_limit0 = 11; dsc->rc_quant_incr_limit1 = 11; dsc->mux_word_size = DSC_MUX_WORD_SIZE_8_10_BPC; Here a bunch of properties are hardcoded, seemingly for bpc = 8. mux_word_size is only ever read in drm_dsc_compute_rc_parameters() so only becomes relevant _after_ the migration, and is currently dealt with correctly by: mux_words_size = 48; /* bpc == 8/10 */ if (dsc->bits_per_component == 12) mux_words_size = 64; Aside fixing that to assign these values (through the proper constants) to dsc->mux_word_size, is it worth looking for the right parameters for other bpc or return -EINVAL if bpc isn't 8, to uphold this comment until support for other bpc is validated? - Marijn