Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp169174rwb; Tue, 13 Dec 2022 15:45:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf5j7TZhKEaIETubbWm7JZkWQJ6mf4R6wkmEJiq3KxxfD8x9tYULKNU8HiMeHO7ozrV6pKMt X-Received: by 2002:a17:907:7d88:b0:78d:f456:1eb1 with SMTP id oz8-20020a1709077d8800b0078df4561eb1mr22957351ejc.2.1670975106731; Tue, 13 Dec 2022 15:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670975106; cv=none; d=google.com; s=arc-20160816; b=Hv98o0Ic5SnteR1ulpiKuMZTzlMGfrqB11EXS5hLexNptJA37gIV+pvHgG9gKniov7 fzimjK1CMIA4U+UrW69x47rRsIIyd5uWYC85vnVn1nZ443Mx412HoU2YNS/uhbGkoYba J4qs8tPehoKpDClRPF6WJ1PS8KfYS0cBbU32F4vZtOo2FRybEuY9iDtJVBidkkv37L7T ZF4F2beOWqH7mmVeEYA440EF4NkDA/u8V/LuNf3oQk33OG4HmE3bgJesq8Rrn3ZmzRpU WiBlMWPklQ8fCENrCu3e+RfASndvfFYOpQ1pfkjyQoqlPko/Ot3pZZQLIxb0bCt/b0zl eFkA== 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=JPgusq8jcDa+nYO1uw5CttNp5JAquyAU0PNk66skwtw=; b=xktbLfcfVnPSGMWXZ3K1wQWg9o2flgjo0vA2nI7xa7QDPuxt63HOQDGGSVUtT1VUPw +cJ2n3VJkb+gyI9g2h5Z997cHcXI0tKg/OB34y2fW2NJ2FlBC1rsBOWtOQEMS0suWZJj 7kFbt9N7c9UpOwe+CN+/L4EMZY2M+RvIovWm0QbX7IgwNIPH8deyVln0cYIVf7YC2JmQ VyRwXuaiiyWCvSx71kWPGE8XeHcdaFRMHikOmdtoYmDjFAB9r6j1Qzi4GwKwretBD5sv 4+KlJ+VdP5SLrM03ebl7aBLqoLR/KxQRpFTL7qbcES7RZsHZi5YUujy8uhmIyZr09NkN 98Cg== 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 dr14-20020a170907720e00b0078d484e0e7esi9842817ejc.488.2022.12.13.15.44.50; Tue, 13 Dec 2022 15:45:06 -0800 (PST) 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 S237038AbiLMXXM (ORCPT + 72 others); Tue, 13 Dec 2022 18:23:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237028AbiLMXWt (ORCPT ); Tue, 13 Dec 2022 18:22:49 -0500 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B552AC6 for ; Tue, 13 Dec 2022 15:22:39 -0800 (PST) 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 396AF202EB; Wed, 14 Dec 2022 00:22:37 +0100 (CET) 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 , Stephen Boyd , Bjorn Andersson , Jessica Zhang , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Kuogee Hsieh , Jani Nikula , sunliming , Sam Ravnborg , Haowen Bai , Konrad Dybcio , Loic Poulain , Vinod Polimera , 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: [RFC PATCH 5/6] drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf Date: Wed, 14 Dec 2022 00:22:06 +0100 Message-Id: <20221213232207.113607-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213232207.113607-1-marijn.suijten@somainline.org> References: <20221213232207.113607-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=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 According to downstream /and the comment copied from it/ this comparison should be the other way around. In other words, when the panel driver requests to use more slices per packet than what could be sent over this interface, it is bumped down to only use a single slice per packet (and strangely not the number of slices that could fit on the interface). Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") --- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 0686c35a6fd4..9bdfa0864cdf 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -855,11 +855,11 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod */ slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); - /* If slice_per_pkt is greater than slice_per_intf + /* If slice_count is greater than slice_per_intf * then default to 1. This can happen during partial * update. */ - if (slice_per_intf > dsc->slice_count) + if (dsc->slice_count > slice_per_intf) dsc->slice_count = 1; total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf; -- 2.38.1