From patchwork Tue Nov 14 22:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 165124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2255165rwb; Tue, 14 Nov 2023 15:01:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4tCSXbFQ7KZZMvljWZvFs7bQ1pzfEact29ilkIeU3vux2N0/Gqy7C1OMPO9wPV2yigPNn X-Received: by 2002:a9d:5e93:0:b0:6d2:e1fc:f39b with SMTP id f19-20020a9d5e93000000b006d2e1fcf39bmr3751512otl.0.1700002900575; Tue, 14 Nov 2023 15:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700002900; cv=none; d=google.com; s=arc-20160816; b=EH5+LyMSRDODawM2eBLfS29FRP7z3j1tL3uKnasTzhQuTL0Q1DOrBcDV14xMaWiUBJ 7kHaosyLuD1QfXvwc0jpR628DRBj+m09XJEHqW7LoejxnvFMvimoozDhExiyrwFdh03w NInTTWpr9d6lv8zNi8yTbCZVKCkUSU7OoFguo9V1m4T29pyAMApDoB6hYaHQGm5oYL+D +S7lbwg0Ew/QJToDEGe6QKl8dfDIQeTFe5pphCkU6L7IX+RhA4/Qppp9POfbl2wkQv0L CVBbkQRrpJZT8HwQ5Dd2tnYt/DptWNev1hToiMlXOP/+ebXybv4CK1lS5bkZ2U/yXP5j fHAg== 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=3bXNM4Q60WzU91mEPZf4VyqZpLI234VBPPnXZJAmol4=; fh=TYfdUrC4lqPSkACFST9l1m125NDrPCO8TsLlqEg/j/Q=; b=sUZbpAkfPJzbw3ilpXUmxBz7EbNY3DSeXu/z8VGpIFt+ojFlSyuivS7x8KUVdds+m1 rbvElx8m9JLRb5O0KKmbB+f+OqbzEFGASiN2TXczkEWk5chwjQeq5QYNJch+M9OWHvTY IChVuDlFX+Qmtoca4tPlsafPlcATRsco+jMJrLKCKgKvNQrF957s7FIlE3prCFEROBNl gOsDbxLxypYmHnwzvyFviFkO67Kyfyh7h1RWzq30oCSV9E5ZvdEG6HfcpYB50Ev/OurN yUMI0imOx/cBc1C7SXBNMy2vy2F2ffu6es+lTNr7XnIo1C7iAMTKKG5RJxYawhy0imcj RPag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek.ca header.s=google header.b=R8MWxDcM; 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 f4-20020a056830264400b006c7ce16dda2si719719otu.31.2023.11.14.15.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 15:01:40 -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=R8MWxDcM; 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 37117807384A; Tue, 14 Nov 2023 15:01:38 -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 S234211AbjKNXAp (ORCPT + 29 others); Tue, 14 Nov 2023 18:00:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234216AbjKNXAl (ORCPT ); Tue, 14 Nov 2023 18:00:41 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23B7FE7 for ; Tue, 14 Nov 2023 15:00:35 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-66d0169cf43so37059056d6.3 for ; Tue, 14 Nov 2023 15:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1700002835; x=1700607635; 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=3bXNM4Q60WzU91mEPZf4VyqZpLI234VBPPnXZJAmol4=; b=R8MWxDcMWe1VEmAnOehN4DLkrTan11W0aUc3k7OwL8Cpdc46fN6MwRWzdT0eCHU2aZ ocpQtVtA02xwq1HVOmg/hYd0jg9lB7YCLzyyRkiLk9x74CJft+Drs7MnacJDDYD/QnX9 oKC4S0ZWbgjIMj6bgS2O4ElFPDj8MpNuya+3OyaPJS+RR2CkCGnrgmjbgrdg+/1ZcyBl k95gy28+a0tBXq0tQKXzmrmy5vw+/a4EHLvqXhLF6bh2ArFvVvuM9CSXX0IS0SgEamBT jmFoQ2irlhQ+r+Y6RqlAg2kV570gNR/z3+3/gkOd49Uy9dvxXof5uJdzCYOUOIBPsLUt 308g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700002835; x=1700607635; 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=3bXNM4Q60WzU91mEPZf4VyqZpLI234VBPPnXZJAmol4=; b=bxP8y3pVSLZe2l7XApU+V+usJLvSXZJ6t9fb0XstQJ/OJGttaOjHKyJ8VqZ/2c7/ob c+C5hbZMvP13NgBHkL5vj/TtD2p88/QmygQoq8xvjb2U8zAjqa6ovNvGGBjSJ08Dqx0g KpFv2SC7RlFa2kQVZjSTSrguISPET6Ir7OB7ZFcOLFlyA0mW+JtGv29EmuNRIpZ1ku4P NXf7hDm7UC6wJZtku0DDXHiM8HBamEJTYIyTkvqNu+Xk8Q2b8fy63KOu4j7vMqsRU0DD uP1PBdklgsIPu2wFdtBRDZ3B3BKSmzqYzYYYFKbYUtp6ubXInBcXPUKfpWG4UDO/rMgu w2ww== X-Gm-Message-State: AOJu0YzcSxEaZzQQs70rhGz18HV0o25Fmiue2dxOXHGAJDLoqe/sW3Mr P+8kc9cB/Xt27yWCu87aD44i8A== X-Received: by 2002:ad4:544b:0:b0:677:af51:da43 with SMTP id h11-20020ad4544b000000b00677af51da43mr3858770qvt.0.1700002834910; Tue, 14 Nov 2023 15:00:34 -0800 (PST) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id u2-20020a05621411a200b00674a45499dcsm25274qvv.88.2023.11.14.15.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 15:00:34 -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 v2 3/6] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC (fix video mode DSC) Date: Tue, 14 Nov 2023 17:58:31 -0500 Message-Id: <20231114225857.19702-4-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20231114225857.19702-1-jonathan@marek.ca> References: <20231114225857.19702-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 15:01:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782582241097393615 X-GMAIL-MSGID: 1782582241097393615 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 Reviewed-by: Dmitry Baryshkov --- 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 f2c1cbd08d4d..66f198e21a7e 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -849,6 +849,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 @@ -856,6 +857,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; @@ -893,6 +895,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); } }