Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1089708lqb; Wed, 29 May 2024 22:58:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWl6R+jvYiGOY3Ie4ZnkWc6eJ3Jm7Qd4MnC/a/ynvqo9kvawQ4N4IgxTExg646Vft171Niv0m1KSGbPeIsGInGmy0GNJtAoW2diIDEmBw== X-Google-Smtp-Source: AGHT+IFhvbkSDn/vjezIq5CzYjBsbZ8eccBYTiaWeKbLzEWp4Y5mvCAbn0lzhwvoi6CUOkKGmot/ X-Received: by 2002:a05:6a20:7f8a:b0:1af:cfcd:a72f with SMTP id adf61e73a8af0-1b2646ca735mr1212830637.21.1717048710514; Wed, 29 May 2024 22:58:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717048710; cv=pass; d=google.com; s=arc-20160816; b=0sdDMS8SEGQ/T2+/dpWSu76AHJzXfpJ5HoAHDnj9oPn2Q8jg3lqzGGdHpvL6x2tL9X WlqHaf2HCLTNVQAxZCEFLZScV71tW93ufkIE56f99zNGG9LMveg3QZStG6vxvEfEc5P3 RyMSFBhxC21VXu68jsgeSxIA9lJE9rPqcLTJQMjrlQin8LLVsIsTIk2tPT1FALey5px1 xiOmbtLSmKc9BmvYviC+ZlRe7Q26Vk5sIc3Xr6RItWcIuBfoLfBH22hYSP5obO/aJjtX tNNhMxyVNfZ2K0fevV0zVvni38RF8aGCZ+57l/PbN5qmyBNfDVZTBnCrj9cHCUYx1yec uVBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=zjKQvSlima36VVtlXXnQSyQLE9jYR8Z2VbliVMpmoi8=; fh=KOIdUCjwIF758ZcP+H4ZzP1aHCM9z9JARuY3RYjRzR4=; b=vuuQMSF3zFMu4udsFoDToN3ay/+0N2Bu9qmtfBvprsJFyCn9g0L6VjBkivR75wbefi B3mA5jpK+E+E7qwLDS8DEEntJj3buJsBzkabtu9sU82+e/FIk1lhKF9zN3+C7yfEYDaL gDYCaca6cDJqpdnQflp/F5lErxra02ztEsT1s+N8Nr5jp0mLn5WUV0U9TSVsgZHnEmj6 a5ffX01WtZGmCXIAbuX+xA2W3UXxdHJ95om6NBFHxggsi8pHXWXfepipu87DFqIcU3r1 qMzD1HtPR9G+SKsfnaJqfs43tgKt97o0OcP8N2UkgDjtudbhKN9dD8PcSGZlwQ8+4rkf v1lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uyn4DV3F; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-194970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9a2cc6si111296745ad.396.2024.05.29.22.58.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uyn4DV3F; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-194970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 204C9285C2D for ; Thu, 30 May 2024 05:58:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE092142E8C; Thu, 30 May 2024 05:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uyn4DV3F" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A3A9143736 for ; Thu, 30 May 2024 05:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717048657; cv=none; b=XCJ1dx7m6Ng8LpnrXyfziOtzRbJVs/49dawRJWkmpnc5unZi118Ap+lasN9VO3StDGH7LXhHhW8bOlKQ9jcSvOqOYfgj5EreTJC5Jl6qunrflYmsKt3KdBUL33ZlfvQ6+oO3ptrZhhvlV0t/oNBzHLumPF/WtML8Ha3eQhHQVwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717048657; c=relaxed/simple; bh=9r9051he48dMMGiOxhg4O5ukg1u5/febN95BmY0jngg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=afjPUCsf20iUeN7DonzHPN3kBvE2P2QyCVqSD+v9NgBhM6HIPPs4w2grprI9mGCxl0eevzvBQUxkfEyW/ZqU91RNJ6pdv0JMIuq94uO61UdzPB+eQfVKFsYlexeiNlfOxwVR0TF+/qRyYEhrrp1KkqXdr2pQEttBunORNWP47eo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=uyn4DV3F; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-7022e0cd0aeso565666b3a.0 for ; Wed, 29 May 2024 22:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717048656; x=1717653456; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zjKQvSlima36VVtlXXnQSyQLE9jYR8Z2VbliVMpmoi8=; b=uyn4DV3Fh0CzmkFvbSLMR6Ru4X7dxx8EclsOt7PLSKCnVlsavK83cerv8yukHbMbRM emAhHaw8uqKvDaoGRIq/rEahAk68V+KUb+pHcn4DaIp8pJkfTRhA+7e43BMkH+lcTN3C GvLpZjxFWGRpLRKcQkWxNMM71qSeqI0IE/HFTYrDS3N0yFYfCBhIrXyAJ3t80JEkLFwJ SKIzlwROibkZOIIE+53yqHmZ9RHSPOwzHF/98YoSZfKXtVgeXbwm6qJsn6031u7IxvGh g/g+xjZh2Kabw/63Zd3yKEPlzI09eHWyyYkw9OZDJhBW86eL8q9DrPlPHY90yWXCLuM2 EIIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717048656; x=1717653456; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zjKQvSlima36VVtlXXnQSyQLE9jYR8Z2VbliVMpmoi8=; b=MA+gZTMrP84ZeBZsVQLtPHnso28vEIZtP4qXr/JMjYv483kVQeWlaGgCEoG6/KSGFc TiA7gHoE+QIoZaEaK39JqieQKwgcO95/mjccqRskzYNq4OKDr22H0O3VAODKqClc8JFg R1FCI8JzVcizUD7uC5S9jajXgaip7UWJU9momBYlwKQhNt9o0wuWr1uw5cc/NQftAEeI nrd5Bg3nymqfBGo/sSWgislnWp/IxBZURUvHohwaqMwQyl8ZialIfYAg60X6XbzDn5aq vERGoWh9Ap1UWiD1pUHiLmaa8Oojs5VjVRb8zmCnjfNYG2CR6MT7AWGCQj2XAtYlL5Et nZ4w== X-Forwarded-Encrypted: i=1; AJvYcCU89rN+1WCjpEAuWoUY5x+kuzhTxJns2buecL1KN9b0Eafztzz2N7hO4zy93P3bN4AUQXuqWdZGS+QGs43uDZZQMmFQer9/T0gFKb/1 X-Gm-Message-State: AOJu0Ywr02EXvN8+4ulLWtB14ZBRB20zycFusd4O4oqm11C2e2dVD6fp LappU1JiSt2tCaq1hg8RBUQ0x6obE1AZYdjLcO4CnkMcR7MSNdPGwcwFq5kQEbU= X-Received: by 2002:a05:6a21:19d:b0:1b2:4834:7a24 with SMTP id adf61e73a8af0-1b264721ce0mr1190275637.45.1717048655803; Wed, 29 May 2024 22:57:35 -0700 (PDT) Received: from [127.0.1.1] ([112.64.61.67]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c75ffc6sm110006705ad.9.2024.05.29.22.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:57:35 -0700 (PDT) From: Jun Nie Date: Thu, 30 May 2024 13:56:49 +0800 Subject: [PATCH v6 5/6] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240530-msm-drm-dsc-dsi-video-upstream-4-v6-5-2ab1d334c657@linaro.org> References: <20240530-msm-drm-dsc-dsi-video-upstream-4-v6-0-2ab1d334c657@linaro.org> In-Reply-To: <20240530-msm-drm-dsc-dsi-video-upstream-4-v6-0-2ab1d334c657@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Jessica Zhang , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jun Nie , Jonathan Marek , Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717048617; l=1994; i=jun.nie@linaro.org; s=20240403; h=from:subject:message-id; bh=wYa7Wt+9FNkutbQfF1qd8yI9pCbHRJOEVcRy20d6px0=; b=g1HxXUGamd1S1+baoVF3C1PVSVxSrhmzRlQx4qfHnCqOmNGTSB9axEdRP98TE05H6leIP/t1u ZL+HaI2+8WsBJ28CpN6rClatB8UXm5Ir9vyIlQ7EbVW8a/Wln2VnK3G X-Developer-Key: i=jun.nie@linaro.org; a=ed25519; pk=MNiBt/faLPvo+iJoP1hodyY2x6ozVXL8QMptmsKg3cc= From: Jonathan Marek 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: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jonathan Marek Reviewed-by: Dmitry Baryshkov Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Jessica Zhang --- 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 47f5858334f6..7252d36687e6 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -857,6 +857,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 @@ -864,6 +865,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; @@ -901,6 +903,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); } } -- 2.34.1