From patchwork Tue Nov 14 17:42:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 165029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2090918rwb; Tue, 14 Nov 2023 09:44:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHf340Qzj1DAuBKOC4rJjJyizWoWBJFwrAJeTGq5KAKx7y7PyzAtKlK+76invxEvwLIbgE X-Received: by 2002:a05:6a20:1450:b0:157:e4c6:766a with SMTP id a16-20020a056a20145000b00157e4c6766amr8256233pzi.41.1699983881185; Tue, 14 Nov 2023 09:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699983881; cv=none; d=google.com; s=arc-20160816; b=vWC7XD1zIHvcN12cRZm4w1txhxoDEYWJS8Oh8EEOls7jis2rukCSXMv17d/gLvCm6A fR6z3T2HiU35MuLcDPhKPhSxq7MeNxVsxUJYJ7ED0B8+Yy7S5XqHMbjdFvgd/k6MfpR/ rUHErBLKe+Q7ZzElRANSk5Hm9bX0ZUyIGAyk5l20jZVQdXhIGehAygnrNYoTYAydcRii ic8MFaW/dygtes+uhwjItj/aZu67un/03c+uWjVGn/N5Snz41f+YSTB7pdXHEyFFkR2d xHceimWnPzj0ZiAJpl2GVDHVBdTyxDD0hh7VV+nABvBPq+SosDPEMhGhZ97RJmvrayXO OlHg== 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 :dkim-signature; bh=X/Se8NuL5JKZV2azJTKlvFmjep69ofpc3jvqTI1b0ug=; fh=LaCKDShnR+ozrrSQ0mRdij6kZAEWj/Wyvmszaw04AvU=; b=nkCUmRtrM37glyh2TrSzwoqzmRsLm9J6U2SUFSCRr9dJrEZqBWFZus6m3PpVf/AT/b bhA9S87DrEVqWUYdtauFb+A5uHdzsupL8+o4PdGRjI+K+bwuNiqp/ANJQMfeJaKdC6xX O4sa1qq2yXa8DuK3kWf9NxTfK6AgiNL0n/54ieUNr6GYU908j3NOgAUD5OmhPLGoX8k/ 1vAtWS4Axp5IMbuE41g94XjV63Fu2/EVnxGq3AbQi2qcI7vzj84bzKptOom+5pUrXoLH LIQOudWzj3taUJRbKTt4CnxkuiZyNQ2Cn3H4YoJAt/ntIEZFA9vxPlzD3YSgdenka0OF gpLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek.ca header.s=google header.b=OC5xPt1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id r6-20020a632b06000000b005be0956253bsi8071695pgr.532.2023.11.14.09.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:44:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@marek.ca header.s=google header.b=OC5xPt1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 932F8802F7CE; Tue, 14 Nov 2023 09:44:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233865AbjKNRoL (ORCPT + 29 others); Tue, 14 Nov 2023 12:44:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233725AbjKNRoI (ORCPT ); Tue, 14 Nov 2023 12:44:08 -0500 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 223E9103 for ; Tue, 14 Nov 2023 09:44:05 -0800 (PST) Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-777745f1541so379724485a.0 for ; Tue, 14 Nov 2023 09:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1699983844; x=1700588644; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X/Se8NuL5JKZV2azJTKlvFmjep69ofpc3jvqTI1b0ug=; b=OC5xPt1k3Xh2bhIYSKP0jgJJ2babStSoVDqbwb0oFKt9iN+m7MIjh4YwaXzI3BbOyb 7rEhIXIBV7flKRnqq1K5m4NK57JiKZzbbvwZwQAZJ8/QWbekN+Rmn018z+j63UeDiVjT Own204oYyHBD4tpEg9lvKLhUlBr6uKHx3XtzwdUlMcwSZ/32BRhuyjgqPV2sNh+7WrSl Y82T7pT0vOgoehPmKyetF2Sfx//2I99CaCtoSilF/fFYkGqMdhQqNbiCP3rIg/Fn4FOH oWfWysShI1nUUhCqsaRLFoEVb8Hvvmd6D810VKgPqx4yx4ev4ntm/Uub5oooLmM0mSJX cJnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699983844; x=1700588644; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X/Se8NuL5JKZV2azJTKlvFmjep69ofpc3jvqTI1b0ug=; b=ZQiybxpeqO086NkKrXZ6poLLYJgHp6pj7WT/0d9jBnqD/56Su5gQNJFML11UkaRMi7 Vz4l7vp0Qd1JtmSF9LKwyy4nDtVwKu77WqZm9vEj+VDCUhE7Dyj1EftgpEZQ5xnkvSt/ YGfbgS6lcUJC5sC4as5UsIL7kdALK2h9yFgx5rUfabQKwYUjq7pX+FsW/LkSS7eCU9Hu 1kforcWGIELwELmuWEytVMOi9yAchM7f2qIm1fNtPdFxihOn6aXWLMDCELApvybyRPxF bEJBW0dRAtM2Un/CzyLlYqjtM62Tz5MCLZxvlb0E90suwTu37PSB9VkBb/2eRqvupC8K WluA== X-Gm-Message-State: AOJu0YyrFtQtTvRxQwDXEzf9RTW9HiPbV0Hb9fbSp0XlQEVtcgz1EVnA jlCadQMvBY5uOAPw7cujXXMJbA== X-Received: by 2002:a05:620a:4627:b0:779:efb4:73bb with SMTP id br39-20020a05620a462700b00779efb473bbmr3357188qkb.41.1699983844031; Tue, 14 Nov 2023 09:44:04 -0800 (PST) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id bi8-20020a05620a318800b007671cfe8a18sm2833350qkb.13.2023.11.14.09.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:44:03 -0800 (PST) From: Jonathan Marek To: freedreno@lists.freedesktop.org Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Jessica Zhang , Konrad Dybcio , Jiasheng Jiang , linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/4] drm/msm/dsi: add a comment to explain pkt_per_line encoding Date: Tue, 14 Nov 2023 12:42:14 -0500 Message-Id: <20231114174218.19765-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20231114174218.19765-1-jonathan@marek.ca> References: <20231114174218.19765-1-jonathan@marek.ca> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 14 Nov 2023 09:44:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782562297819599650 X-GMAIL-MSGID: 1782562297819599650 Make it clear why the pkt_per_line value is being "divided by 2". Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index bddc57726fb9..2ea2fc105fbf 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -875,6 +875,8 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod /* DSI_VIDEO_COMPRESSION_MODE & DSI_COMMAND_COMPRESSION_MODE * registers have similar offsets, so for below common code use * DSI_VIDEO_COMPRESSION_MODE_XXXX for setting bits + * + * pkt_per_line is log2 encoded, >>1 works for supported values (1,2,4) */ reg |= DSI_VIDEO_COMPRESSION_MODE_CTRL_PKT_PER_LINE(pkt_per_line >> 1); reg |= DSI_VIDEO_COMPRESSION_MODE_CTRL_EOL_BYTE_NUM(eol_byte_num);