Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3887576rwb; Sun, 9 Oct 2022 13:04:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5smZh8i76ZpdEvFNtz7+bxxITn762PFoWo6tnxaolDIluIAhRLb83vfZPMImSElqEpk9dp X-Received: by 2002:a17:902:c7ca:b0:181:927a:9449 with SMTP id r10-20020a170902c7ca00b00181927a9449mr6081929pla.11.1665345882545; Sun, 09 Oct 2022 13:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665345882; cv=none; d=google.com; s=arc-20160816; b=RgqcvCWW1oknWAj0NVDYBUUgnfOXtGCux7M+nKgaarDUQFqlzMtevljmwT75Nse/3k gRKwPVAICVqyDVdypH3eOAi242RZMh9FeS9gaZBlfi/E2iobXlwChAzvMK9bbFwegw2u uBWvlTmKN6DNK1brD3UC/mQU0RHgf+Y8qVh0cHuqqVFePjqVbOl4klRGk1PYh5EkYcbo 9itT6pmhwAj3UuH0qnOHcsJAZzSs0Cqc2Y0LNZhilrAjSVN8UNq0J0AO8YFa6SrWIQHz ZAkEIikmwZ+Gm1X6ZPXjor7CsfNOArjuVQPX8V8E1kBuvRru8kDFGBHZlWvQ6s/PIZyg uXdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=uFVKultu0cmOmtodJ4MFkn7gMtyl88uzZCnnfGwul4E=; b=K2vbhzqBduSOr3P5Yxso9IuXOS9W+R6Y78KwHAkBlLr3V6hVRcP/CPwA1fJNjzqn14 bbz9yLVqRoY57kumAv0OEKhFkrWkGqJyyXIXnuOxi4ym7/KJIuNCggb8U4wCv0S22FSt c6z/Du/+MjjqvwqHaRQeA6qr9XpZAQ7f4MF5cOcIWdtYXkn0DpNxiWJsRIrC8OAPu96D 2qAzsKi5TgCUlbaTx9ELJdU+OyCL1Z5wxTOexHx2sM82CljvkBa/KUwmDSJNRBP9mltX 8C4pGjtcrojhsMBChN7BUFJ2/VUSsbk5XStZEFc3MxHcFTFWv5B20K/mLyvM+hDxeq+1 QG4Q== 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 oc1-20020a17090b1c0100b001fdd6d07d39si20040623pjb.8.2022.10.09.13.04.20; Sun, 09 Oct 2022 13:04:42 -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 S230423AbiJIStD (ORCPT + 99 others); Sun, 9 Oct 2022 14:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbiJISsz (ORCPT ); Sun, 9 Oct 2022 14:48:55 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB0529829 for ; Sun, 9 Oct 2022 11:48:46 -0700 (PDT) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 1D3A31F9A6; Sun, 9 Oct 2022 20:48:44 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Vinod Koul Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Sean Paul , David Airlie , Daniel Vetter , 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: [PATCH v3 05/10] drm/msm/dsi: Appropriately set dsc->mux_word_size based on bpc Date: Sun, 9 Oct 2022 20:48:19 +0200 Message-Id: <20221009184824.457416-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221009184824.457416-1-marijn.suijten@somainline.org> References: <20221009184824.457416-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This field is currently unread but will come into effect when duplicated code below is migrated to call drm_dsc_compute_rc_parameters(), which uses the bpc-dependent value of the local variable mux_words_size in much the same way. The hardcoded constant seems to be a remnant from the `/* bpc 8 */` comment right above, indicating that this group of field assignments is applicable to bpc = 8 exclusively and should probably bail out on different bpc values, until constants for other bpc values are added (or the current ones are confirmed to be correct across multiple bpc's). Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Signed-off-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index f42794cdd4c1..83cde4d62b68 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1808,6 +1808,7 @@ static int dsi_populate_dsc_params(struct drm_dsc_config *dsc) if (dsc->bits_per_component == 12) mux_words_size = 64; + dsc->mux_word_size = mux_words_size; dsc->initial_xmit_delay = 512; dsc->initial_scale_value = 32; dsc->first_line_bpg_offset = 12; @@ -1818,7 +1819,6 @@ static int dsi_populate_dsc_params(struct drm_dsc_config *dsc) 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; /* FIXME: need to call drm_dsc_compute_rc_parameters() so that rest of * params are calculated -- 2.38.0