Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3871727rwb; Sun, 9 Oct 2022 12:42:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rV5Krj+vmiJIqhnjkV5qbJZX1aRzK18ODV5FcW4+bovyNly0GUWRI0oxJZ/lGJ7+l3d9T X-Received: by 2002:a17:903:244d:b0:178:a0eb:d4bc with SMTP id l13-20020a170903244d00b00178a0ebd4bcmr15498390pls.33.1665344537102; Sun, 09 Oct 2022 12:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665344537; cv=none; d=google.com; s=arc-20160816; b=bsL201v+H12atjKc5Ctgcf1vH2ZPu+MGjpNceS30PSMrkhHzyUzb6usvG1/Gr4GgEt Cn05NTztVL5KjytHFjKoyImKa2C/djwZNl9Y/VhGvCbEjmfbZiUUE9Auv4GfRqCA1AaZ oNUMFThouXRRLt1J0NNOob7YR4QhugaYOQJ47ivoFHxuv0GtcML2/RZyV6whl0M/F17E zjE8RY30HPMv6n4MK7y9sHnKSXUH6qMhBQh461lUP/ablVzrgzQLGQbCsxBXVAWyQhwc e89EvIqAF3GOpNgxyyW01j6YQdj97g6U7JD3xatgD+fKbwMAJAME/2OF+15SIhSSrjkK WCaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=d8Zf3BsxO45m3r/45zObKvChnR3gfGHDc8wwHfVB+mM=; b=rDfsTp/SXR4PweM6dIBBE8xp3FJGs8B7ftBP86G32oMcsk7WejfTxN2Hg1dwik7W/p MgjYzh+yt1+b6GVO8U1joJFJXOMT3oT2Jjrs6urcX912NPU85BXiuLK2mItGZ9jBP/NM a8TOgJI/SehVZUlyuCCDKASPI6zu4v7HcNeY5I6iYLkqov+E8yzdDaAOZl0aJr3EgfXH RL87QT3HQqq7pwhdZtfyxFLebjDMIQdYI3lyXUg6DCWv2nO14FZQgFsLlnCYi/3/Ijwx KlE4NeAQt7pq+PgthWzq9QWqWnY5zkRql1yuv7TJfz71//RH3U4cO6YAvslF56dfvzai HUGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jo9FydsS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a65624b000000b0044f2a51ef42si9237506pgv.475.2022.10.09.12.42.02; Sun, 09 Oct 2022 12:42:17 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Jo9FydsS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbiJITYo (ORCPT + 99 others); Sun, 9 Oct 2022 15:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbiJITYm (ORCPT ); Sun, 9 Oct 2022 15:24:42 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2572E60F8 for ; Sun, 9 Oct 2022 12:24:39 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id p5so11125989ljc.13 for ; Sun, 09 Oct 2022 12:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=d8Zf3BsxO45m3r/45zObKvChnR3gfGHDc8wwHfVB+mM=; b=Jo9FydsSo3KFqrMCPz1dJsMMf24LFsWe5cCzzTzQDbtFmRMvq1lX56myj+xDLnPLlF MUZEZXHctCl7yP//dIcPizkSs76q1iHU4aukA2TogMY3zvIRIq+1xArPgUZJmPnoZakX LONOD0jWD0X5Reod3urH0E05Jc9rfxhqydw6tF0uK5uBZfJwq+JbzDj1ko9Tj2KYuC/F eDzeaeOvFbzXGHrpkZbSAk4tcmLAJA8NkWeCWXng7V0+uF27JUMKsA3OqAgISqFLQZ2Z NoJf2V0YtA6NHTE1ecsbqEfwzX6xO7J+kQs0rkCMMxT5G0u1Xb+n+upE+Y8JpHswZ1mP BvlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d8Zf3BsxO45m3r/45zObKvChnR3gfGHDc8wwHfVB+mM=; b=zRKq6GxQS9TQfKuHVutXg15uBTtB6oyvMn8i7FpXuSs/TMbSqlkBPZIEs5onF57vrX +tWM9Irpnm6aARgj/a6ySnUiia3EQgVuVHVEy1uepwTPLznssosyCkA/KaxSwp414W7V ++YCBza/BxucOmVYOXFmjhkeQjfYdMZod4hDHDVNqCye03/dZ7IxubFhDM5iVzUASV4x unfE4emYtuBs+/Nwx99VX9jqWQ1ksNncqH6JLB/8wQ99XyZbuNyFTEDnzHyvQWEfvtbM lf5tehM20qtiN3S0UlPTmUwHJp2PYqKDIeOnpjJW4Z3Mx+mZSMOHmCiiJN2TTDEWA313 ld6w== X-Gm-Message-State: ACrzQf0bkTZSlaMs8iPFpdt4j6QPYpf+SPMISuMZHbZflPrSApEsbQNH ResHmJN0mPbKrxKGKfprcLzrWw== X-Received: by 2002:a05:651c:1590:b0:26c:4311:9b84 with SMTP id h16-20020a05651c159000b0026c43119b84mr5816939ljq.152.1665343477534; Sun, 09 Oct 2022 12:24:37 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id n17-20020a0565120ad100b0049936272173sm1111974lfu.204.2022.10.09.12.24.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Oct 2022 12:24:37 -0700 (PDT) Message-ID: <13755211-82fe-937b-f96e-966a55e68917@linaro.org> Date: Sun, 9 Oct 2022 22:24:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v3 08/10] drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits Content-Language: en-GB To: Marijn Suijten , phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Rob Clark , Abhinav Kumar , 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 References: <20221009184824.457416-1-marijn.suijten@somainline.org> <20221009185316.462522-1-marijn.suijten@somainline.org> From: Dmitry Baryshkov In-Reply-To: <20221009185316.462522-1-marijn.suijten@somainline.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 09/10/2022 21:53, Marijn Suijten wrote: > drm_dsc_config's bits_per_pixel field holds a fractional value with 4 > bits, which all panel drivers should adhere to for > drm_dsc_pps_payload_pack() to generate a valid payload. All code in the > DSI driver here seems to assume that this field doesn't contain any > fractional bits, hence resulting in the wrong values being computed. > Since none of the calculations leave any room for fractional bits or > seem to indicate any possible area of support, disallow such values > altogether. calculate_rc_params() in intel_vdsc.c performs an identical > bitshift to get at this integer value. > > Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") > Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > -- With best wishes Dmitry