Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp34227rwb; Wed, 5 Oct 2022 14:16:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6uh4c2V0G3aJq54kKjft25dsP1WB41nKx9kfoPdRGkrRwyIkNa1C8eFHzAT2js3UALbWEs X-Received: by 2002:a17:907:2cf3:b0:77d:89da:499c with SMTP id hz19-20020a1709072cf300b0077d89da499cmr1223344ejc.694.1665004574382; Wed, 05 Oct 2022 14:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665004574; cv=none; d=google.com; s=arc-20160816; b=X1f2bwKgf0oVE0u5lklyLbtj+4N5Bntf9v4p1Qg52QkmqSk9EMeeOPXc39idCwOhM3 8hTnkzWEnQkA78TH73KfaMOix+dnxa0l/yVrBRw5tX8UYI3rd4OLBdoabWMW8mX2fs3F a23A6BSRjufe43w9QMJR37K3GOYqLVlD5ECxNYo+cj0vruQoS7H4tS0NMNsThFKBgCM6 IOgHV+/MLtlk/7F5yRGCnLg5biZ9fSxq7xR2LENryjwp7WJ8NCK3nxPrePW3NhfT5t5F A9NQIkx6csUJnIk1cUWdCrIIzela5VMT3cMM6idLzgfvfXDinK7G8C8eNLhZi8n2dKPK wxOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:to:from:date; bh=Y8+LFmXiD1WdmjY5OANVwi8m0Pckav0Cxgr9iwXZwpk=; b=WtTepf58IjDoZ2oji4PEXOnBN4mJbNK5NwXHNopT2RPg22vfu+dJg2wZRZWRWGzL7W 4wcUFo1x+mCYbPJm02tVhQ0PwnDd+He76y/ARX3jZCoZ6hjhVOtNRyqkBJRojDftR5Fe xq5q9sqa87lO8NteFKb6acXCAo6o6aKEbUqxTZeSTbMVIGAXYKDkz9dieDA9+lzub5T0 UG5xfwPg+yw84Wka9JIapTcBGZbcvXqcZpkc996td0rczQjV+6NHOcYrqpfrLBtx3HUT 5ERVsPER0SAeqVyqLt49V5v3HrsYDJo4vZizMyI+x8yH9jHNVSdsYStRHLmi903EbV42 nCxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp31-20020a1709071b1f00b0073d64fca704si13911757ejc.36.2022.10.05.14.15.48; Wed, 05 Oct 2022 14:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231163AbiJEVI6 (ORCPT + 99 others); Wed, 5 Oct 2022 17:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231157AbiJEVIy (ORCPT ); Wed, 5 Oct 2022 17:08:54 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 490B4816B4; Wed, 5 Oct 2022 14:08:48 -0700 (PDT) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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