From patchwork Tue Nov 14 17:42:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 165030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2090937rwb; Tue, 14 Nov 2023 09:44:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2ki1T47nV+YjS2a7nTxN54jkSTIlcJpdjE1kDLHDI+m8CW2N+cMAxzncHjky9BkBNznVN X-Received: by 2002:a17:90b:1b51:b0:280:1dfc:1302 with SMTP id nv17-20020a17090b1b5100b002801dfc1302mr10922266pjb.17.1699983883600; Tue, 14 Nov 2023 09:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699983883; cv=none; d=google.com; s=arc-20160816; b=AoK4g/wPRQuTMpZpK6+XZ6kS20WWSLLYp5r+wTVq04VNNGNFFmO3pfhNRv9hF0N9q0 mj3/WqDawatqj5xrirp/rhQRlq70gHktmj8bnRzy8WkZGpTiPZZHefsl09R8orWW362U ecooKVcKi1Hgn45hQMU5inBfAM7GNteqg2T4q55aOrBt1lD2was7Yy1v4yGqssuzAhjS lsye+RVrmg6z30S9rI7FPTvPelAZuYld3Y1S0Wg7+rXjLu7S35x+WvwQGIkAIRaU6TiE gsapPkuX0PZpkW3ocDkP7X/bvj3YIWHsLJbazLkM1usXaWGbjvylsKbEpmP5TNgfKn83 faYw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=thGoIvnqITUJB7IQaQsWGdMjOXMrq/akRqtI22GpJyQ=; fh=TYfdUrC4lqPSkACFST9l1m125NDrPCO8TsLlqEg/j/Q=; b=uuRmRfy2TF2WC9j2jG2UE5drHqrBVgR7G0J5ytw4LjpRjwcdhAeXqbJFtGkxIed4N4 dAg6kNddHPMPBYC79A1nCdazIPVJFgBN2pDfr6Sp5GSQDFA2Q2Ep0Nd0nwy6kzbvnZGi X9JQwCT71DWYlbsU+cLrphSh8SDh1FJEG3xhzzBcuPC6koAjBBz2JwJOhUet5wywIF+L SA5I2KZudsOMqtkDCZjVgLggzkBzc7PDUC31LNA1uEuU3Tg8AOR2P17yruW8ZesaLBLT Jrl2p2FmxxyVAr2Rysdp8p427B3ZLy/7FLN9HqhgYWVz1rZcVzoSgtXazhXf7OHx+YHM bjlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek.ca header.s=google header.b=FXQ7dxcx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id mq5-20020a17090b380500b0027d2db562d2si9144183pjb.161.2023.11.14.09.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:44:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@marek.ca header.s=google header.b=FXQ7dxcx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 41B288049D29; Tue, 14 Nov 2023 09:44:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232267AbjKNRoH (ORCPT + 29 others); Tue, 14 Nov 2023 12:44:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjKNRoF (ORCPT ); Tue, 14 Nov 2023 12:44:05 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A509103 for ; Tue, 14 Nov 2023 09:44:02 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-778ac9c898dso304720285a.0 for ; Tue, 14 Nov 2023 09:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1699983841; x=1700588641; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=thGoIvnqITUJB7IQaQsWGdMjOXMrq/akRqtI22GpJyQ=; b=FXQ7dxcxpBSE5zZsFlJRwBYnmmsznxRjIhYT40fqR7x6Yoo/1VV595U4yzi4D9idAt NTZMv5sQPmmA9CWcuAVmjsg6J60Nbjm5mWpmVlsqM8tkOZi60OQypnH4bi6bL7VcvmaL /jGRMbxx8RvMlI/Jo42qIhE0uNlPupx5UxjSlbn5yqr4cfLB5ojoy37+operULioqgWZ ImZIwpjncnWPbjq/QAVrCutJOuk7dSNLzgBL3Kx73PfyaVkod1IO8StGr5YxFrNnL/bl kQ6ZzqHYCBehXckAg+MlHbUmBjnaq1KKqjlsoubk5FCKlz9gjxK6K4OOnG9Orctrc3k7 8MJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699983841; x=1700588641; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=thGoIvnqITUJB7IQaQsWGdMjOXMrq/akRqtI22GpJyQ=; b=PPuINjMrem/729+U1sDCX7MpvQghrB5rG7S4miV0uPCaVORTd3ilbEtlHNNA3eSZKn pix5zWYLOP2+BX6XhxoaPe4KItC4KkRcJHIuu0PtP9Hc/wPXIyF/NlqNizx9VTv4dwRr nnme8LdGPeMMu+4GO3aAfJS2GaH8gBJLTlky5FpqsCFqXKajSZWYl4zzpeStZu13c6/J BMrZEA+ZCHuACDmIODemN0GAn60wl9sQBK/9jfHrvX28TdxZ+mULDhOEl3GCSliHLzCj 7N10Cw6BGiD1guwjxQCn8rc2BFT985cpTG4qjhTg8mNmKx3yBd+6RliKu1zgVNdWEp0w I9bg== X-Gm-Message-State: AOJu0YzgnV2+HGxpRhNtA/sgnXBxLz3DVxbiIeRXJIO+oI/0C/gMJ2MB 4FPZ9V+igF/NpIuP2RwtJeUd4w== X-Received: by 2002:a05:620a:8c0c:b0:775:7e16:2cdf with SMTP id qz12-20020a05620a8c0c00b007757e162cdfmr2232672qkn.39.1699983841236; Tue, 14 Nov 2023 09:44:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:44:00 -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 , Vinod Koul , 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 1/4] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC (fix video mode DSC) Date: Tue, 14 Nov 2023 12:42:13 -0500 Message-Id: <20231114174218.19765-1-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 14 Nov 2023 09:44:33 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782562300913295536 X-GMAIL-MSGID: 1782562300913295536 Video mode DSC won't work if this field is not set correctly. Set it to fix video mode DSC (for slice_per_pkt==1 cases at least). Fixes: 08802f515c3 ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9d355cdc3ec1..bddc57726fb9 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -847,6 +847,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod u32 slice_per_intf, total_bytes_per_intf; u32 pkt_per_line; u32 eol_byte_num; + u32 bytes_per_pkt; /* first calculate dsc parameters and then program * compress mode registers @@ -854,6 +855,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod slice_per_intf = msm_dsc_get_slices_per_intf(dsc, hdisplay); total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf; + bytes_per_pkt = dsc->slice_chunk_size; /* * slice_per_pkt; */ eol_byte_num = total_bytes_per_intf % 3; @@ -891,6 +893,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod dsi_write(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL, reg_ctrl); dsi_write(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL2, reg_ctrl2); } else { + reg |= DSI_VIDEO_COMPRESSION_MODE_CTRL_WC(bytes_per_pkt); dsi_write(msm_host, REG_DSI_VIDEO_COMPRESSION_MODE_CTRL, reg); } }