Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2100633lqb; Mon, 27 May 2024 07:55:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGfiAufkWnVGPxncYIHRVl3xM2GxllPUuzWicKMKA9FD6p1tFHBeEIf1I6X4w/je3eicJSX2uSezAz8wbpt1PrAnOHaOWwycUBKt1L/A== X-Google-Smtp-Source: AGHT+IG1gA+Be4HKSho+HX1QPH+b59oMfteVi8oSmpR0ROvdF9SG9rebJ7nCiP/R5WWD+vsnsXnL X-Received: by 2002:a05:620a:1181:b0:794:b350:a4a7 with SMTP id af79cd13be357-794b350af37mr901502685a.31.1716821736447; Mon, 27 May 2024 07:55:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716821736; cv=pass; d=google.com; s=arc-20160816; b=yUE8KgDhlOpHnpmLCEMbFktv5UFu1XZeLWeZ5XAiPSOL7JSR+JIiVaMVs8qwxyJ6Xu ZkXmsA1vJJV+aIr4jiZDcWz56nmWKbdu1gZvLoT3QoGy2cKq7zxPjZlfobk52rPI75/W bVznY2eW6iObxW/loCskX3Zm6tvXBcN5VZFdrOG+5AA4MUTgOQX5LUA1UHuPZvCcQMlM l/9egp4vFe8+apBF/GI5RsYpCdH12GiXeMALjR1tQ4FvHcUnK+RiEL8zZKP8hrjDozsr O4MNS4eP6vCyt/7RQCGH3jEIX51GXlOLVtQb1dN0MmWcdvNAHUAWLVUNX3hl/zyd9kar +6aw== 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=1q/zNwiMaDEmdeMjqIrsYp4iIRvhgkioJMBpY2/fUh4=; fh=oyDh2clZ/y+MTeNoEYQGf6TZRj5XTsHpbCG5v2qHRL8=; b=dMwkDSe07N2LyjeASRjMwDfEq0wMOSxlKj411W2oV0GFfoYWiEx0wOeuQ3Wd5uX+oT PweXc8cFyM3A106odr5S6AoOstJ9tvf8yw38c+3hb6z4BGIj7zeosiFnbXoUXq1m8LNB rkYd2jnyuzXDfukrht/ONSMw9+hc+sNcrYF9GIOBPPV3FLhjhhQGdniFA/rxvvNbC/fE +o2hQwBurrSbM70UmzaxdqYgAwh7zY+q4IQCibpZWLwWghLEkQUo+s2ukWvDt0CbWvBf D+7EC5QdPOmY6ky4lk1Kdx//lLTSPfcruf2xp4Y5yrG6qmGEf919LZlcVv2dS0HcTU3m Z1Sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nOAskF9p; 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-190955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190955-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd0aab4si794074685a.371.2024.05.27.07.55.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nOAskF9p; 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-190955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190955-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 309A91C20F66 for ; Mon, 27 May 2024 14:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A4D616F85F; Mon, 27 May 2024 14:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nOAskF9p" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 0EC0B161339 for ; Mon, 27 May 2024 14:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819841; cv=none; b=obqFyT+/5cIWujM07sIOruB6YxwyXA9MZ5KwjNUpZ8H0rh4bUCyAk+j6grk8pmtY4cclibLNcoMBiJf/GA1l+T9r2a+9p74lUcpH6GHfnKm8VNEtGdUH7SjZI8sc65PGiS5KZgUvqWDV5eYvK1FgyOzsZx2/jhBJTOE5CvQ71CQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819841; c=relaxed/simple; bh=edX0EVhDlR3P74S/rdsu2HwqaRU9x7uNrFINA9VNrxk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FZZb/B/MEnrqytY0ckOrHO2XB0UoOJBooKI3udw9z7Gqgxm2AZSjGnUpsakge+FNeJKrDSwCHmvspkn1/DgLSrPMCn9gXKxRhR2JBxXd6ZFgBSTXM6TioTXB9ms3myFnAeCZdQJJkurVhELS1RltTX4a3x7kh5K5g3qsQYF6p0I= 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=nOAskF9p; arc=none smtp.client-ip=209.85.210.173 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-f173.google.com with SMTP id d2e1a72fcca58-6f4603237e0so3706171b3a.0 for ; Mon, 27 May 2024 07:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716819839; x=1717424639; 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=1q/zNwiMaDEmdeMjqIrsYp4iIRvhgkioJMBpY2/fUh4=; b=nOAskF9p4zBfw6Uwh6EaRIG+hX4R/xd95HCNFNHQWGkIqxMY2dPovOSGuzI5flMpUS l1NkAhX3Y+WL7wQOz6iOUww6Hm4Wi91c4hE19TEVfgFfNfUsfkb016YS4VGdKqvwRdeL fuQc0c5ZCe3SPJg5dke93+3fwVTFiihNaiFo47CIYhL/DlOz6C4FoMkTC2jPTwn/vnC1 6iu39Jm+6rpI9XUnqRffq0b0NDoz/qvpccsE3thWMtCHFuLX/6Hs9PM46YpLJXikavGn IP6MaKl8AZ55jip2YAD/zoa/lkgOMUcxx7caZvP42Xejdv/bd4SXXvkhUVbOaBPKKqg+ LWjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716819839; x=1717424639; 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=1q/zNwiMaDEmdeMjqIrsYp4iIRvhgkioJMBpY2/fUh4=; b=lBHNKEa/tbfJGlkywMq3Wr9Gc2uXl1/cLklpgCC7rldFwBJw1/bafvd0y7w8aNq20n afezrjUVzOElOaXGgrQiAgpv7mTtoeVbsoZwNOihn5vxpNmpE7e3XW9jP1K4WDMRhN67 WXZFraePN65Havx1VkB0DsFjAaBm1zmr7CWl2mynvzM2uBaTBaQz8LqF2ovWmytwK7ok VTp8niH/q0gsVl7kMRKgX9YuV4gIQs/ELSqarg75SFTC6StK8PKCtwEbM3/WYm/ep9tk yUJpYL076TC2tMeX2bgqcgc05fWFR2iaE+83a6GyAf3eX9BhqXxgLL9ZBYN4SRjfh6OV 0gPw== X-Forwarded-Encrypted: i=1; AJvYcCXUbWENSkfVcsZPKA3bIhkn8FGXhlVejeLtLmvWr0eYEQsOzQheX0Dg79b88GybfQP4RpOq7X10+GPXKaCCMv/DLOlSaygo3myK7v17 X-Gm-Message-State: AOJu0Yy4kK4CW78MDllLopw2vLH7/HuUtzI4FD1NrClPARfUABRAQe93 faVPdce7sXYgHx55oCnH280bHGxL/4/3jT92nYWRPXtpHF8K9hkJT+4SUcZGXYs= X-Received: by 2002:a05:6a00:2c94:b0:6f8:c94f:578a with SMTP id d2e1a72fcca58-6f8e9fc10d2mr14002563b3a.12.1716819839415; Mon, 27 May 2024 07:23:59 -0700 (PDT) Received: from [127.0.1.1] ([112.64.61.67]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fbd3eb67sm5109895b3a.19.2024.05.27.07.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:23:58 -0700 (PDT) From: Jun Nie Date: Mon, 27 May 2024 22:21:51 +0800 Subject: [PATCH v5 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: <20240527-msm-drm-dsc-dsi-video-upstream-4-v5-5-f797ffba4682@linaro.org> References: <20240527-msm-drm-dsc-dsi-video-upstream-4-v5-0-f797ffba4682@linaro.org> In-Reply-To: <20240527-msm-drm-dsc-dsi-video-upstream-4-v5-0-f797ffba4682@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 X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716819804; l=1725; i=jun.nie@linaro.org; s=20240403; h=from:subject:message-id; bh=kdfjO+qJ+tyWY/8kntVCewHf4UP39s93vNEdOjHmAf8=; b=WZK+fi9R1wzG9SG7mvTJ8kFWQ2CEBx+pPrg/R5DlNh/d01o6/7FKCZ/kIxSBneAYyg24Svub0 MwG+ROnBoCtCqjgeMdjLNXvNtdxbpy3X3umPH1oZ8zS7n1OuVD9mief 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 --- 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