Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp599901rwi; Thu, 13 Oct 2022 02:36:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48MivXoAnUSSJT5WVIVlsKPis1D5hzFY+G+KWR5Q6h/BfB/N/Dh/YK9du6Q+tM7E/akdUt X-Received: by 2002:a05:6a00:8cb:b0:52c:6962:2782 with SMTP id s11-20020a056a0008cb00b0052c69622782mr35118004pfu.81.1665653762078; Thu, 13 Oct 2022 02:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665653762; cv=none; d=google.com; s=arc-20160816; b=K9DBUd6n9LB8SKwfckjmwiEPNKMMdOX6vuhUNtfcrB1Y2YPrB5rXZ8CLVCOZtOeD67 moW6PJXYIc/UzGZyC0YtTRC2uePB1zZ9QOreL93m9XRuTMWzQWI4oLx4ns2p14uzeEiH zXgxux1c217XzkOOGLaCc/DmDfaBdmnbdRF5LC8P+9dBERNA7QyLHO1G+dp55V2n3ced Fr5eP4b+8lErMRF+e0o0jWJsHajLlBeKJhyA5KoNuLPVmOmzHQtetGwnJd/NToJ4scir 5J76oDm9epEjTbE6kpJunymutJbFHGPtuq5Q5SPAjWaqwkKA2ZDymwWYgdOGrHOWDjAY L21g== 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:message-id:subject:cc:to:from:date; bh=Mlz7yDaDC5uMUR+bNvyu/HfhCVsr84XBJwdltNuOdYs=; b=JI8wh9LsZ+tE6XaZjt6XmBH0H1HBb+qJ0zXkjCB+OhumqA+5xrs9LHMt5JxAQppoNE A+EPHBZVraWaQ1GSyYZFCoyU01kIKDGWiTJh34D+/QcE/ACHbMv2LLjeASr5joiiwFAN JiwRr/Yoj3x5GrdlOUb8T5TzaCddCT65MzVuvFzXSAZPY1egLCLAJjFxl8J/8km7Ox0w tR/tZBvUW/1Sru30rNy1HBf6KW8qczyp1njgUEqJkl7XVSZ7cSfOy91cbWSRkwxDjbjV HiKO40Y2OEq3oa4Cd6u9E62wv0C4akdHiI+T8arB8nak2uMQjytXyGdq8MVHQY4GZkVf pz7Q== 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 w5-20020a170902ca0500b00178b7f8c5c5si17835806pld.598.2022.10.13.02.35.50; Thu, 13 Oct 2022 02:36:02 -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 S229513AbiJMJ1c (ORCPT + 99 others); Thu, 13 Oct 2022 05:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiJMJ11 (ORCPT ); Thu, 13 Oct 2022 05:27:27 -0400 Received: from relay05.th.seeweb.it (relay05.th.seeweb.it [5.144.164.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B54BE9AC10; Thu, 13 Oct 2022 02:27:25 -0700 (PDT) Received: from SoMainline.org (D57D4C6E.static.ziggozakelijk.nl [213.125.76.110]) (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-r2.th.seeweb.it (Postfix) with ESMTPSA id 983CB3EEEF; Thu, 13 Oct 2022 11:27:22 +0200 (CEST) Date: Thu, 13 Oct 2022 11:27:19 +0200 From: Marijn Suijten To: Abhinav Kumar Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Rob Clark , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Vinod Koul , Douglas Anderson , Vladimir Lypak , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 07/10] drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC values Message-ID: <20221013092719.323h6ts6o5n4blag@SoMainline.org> References: <20221009184824.457416-1-marijn.suijten@somainline.org> <20221009185150.461323-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-12 16:08:07, Abhinav Kumar wrote: > > > On 10/9/2022 11:51 AM, Marijn Suijten wrote: > > According to the `/* bpc 8 */` comment below only values for a > > bits_per_component of 8 are currently hardcoded in place. This is > > further confirmed by downstream sources [1] containing different > > constants for other BPC values (and different initial_offset too, > > with an extra dependency on bits_per_pixel). Prevent future mishaps by > > explicitly disallowing any other bits_per_component value until the > > right parameters are put in place and tested. > > > > [1]: https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers/-/blob/DISPLAY.LA.2.0.r1-08000-WAIPIO.0/msm/sde_dsc_helper.c#L110-139 > > > > Seems like a valid kbot error. > > https://patchwork.freedesktop.org/patch/506359/#comment_912830 It is correct, and I suggested in [1] to either reorder this patch 7/10 after 8/10, or pull back the msm_host pointer argument into this patch. [1]: https://lore.kernel.org/linux-arm-msm/20221011075119.tvn5j5jm6aqnhqv2@SoMainline.org/ - Marijn > > Signed-off-by: Marijn Suijten > > --- > > drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > > index 68c39debc22f..7e6b7e506ae8 100644 > > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > > @@ -1774,6 +1774,11 @@ static int dsi_populate_dsc_params(struct drm_dsc_config *dsc) > > { > > int i; > > > > + if (dsc->bits_per_component != 8) { > > + DRM_DEV_ERROR(&msm_host->pdev->dev, "DSI does not support bits_per_component != 8 yet\n"); > > + return -EOPNOTSUPP; > > + } > > + > > dsc->rc_model_size = 8192; > > dsc->first_line_bpg_offset = 12; > > dsc->rc_edge_factor = 6;