Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1089764lqb; Wed, 29 May 2024 22:58:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXve/12KngyNHd/tD4sAyqonpVIXivD5EXZZnxhs6xuxfRtzD8FxfFwkGL0fIa1R87SvLjrKwHhcAIZCFZ9gc7XHCdYnFhxbJk0inYXEA== X-Google-Smtp-Source: AGHT+IEJwysF909iIQRVcQ3sEcWryheDq0J+K5UEZ4E8ITu2olrXIcH6l9A0sFVlslZDxh26XLt4 X-Received: by 2002:a05:620a:2888:b0:790:ed57:1354 with SMTP id af79cd13be357-794e9d94e79mr173188685a.6.1717048724858; Wed, 29 May 2024 22:58:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717048724; cv=pass; d=google.com; s=arc-20160816; b=re9V8u+iwK4KuKgVLeik2HQ3/MaLHA2fCIWETMq17nRt+/1t47CADzj8/aC9CBo2Xe H9zlxPhK+jftBUk6E91X49LcGSBJJW2MY+E0cT6LIjWKhnvyjZRGpmUF+RwYBlzvQexF R88S4hcRFips3gc9fMXFh9ZMADQf90h1PWh1Ml0Wc++FNDhJYRNvwbALPO4tS6Ri4c3E ZeVdb32NcvgTSp3as+pSH6414bhQIQuBHTuwvjWwdHRnKrbw1OktDHiz6RoJBUbfxjl1 IqyNpFRJd+x8beXRoTzj7EQfMcShKxx6pOab7JnbVMOntehlMW+perRvbuH7XAyC7r45 +lXg== 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=Spln5gkQq1YOd2fgu2vLWG7jbq/zrTdhGVBswcY5AYE=; fh=TmPvxRBYB8L/gqKnPGANRGGa41x+HLiZ5pmL/zppRk0=; b=z08YszDzvObnCqMx6s6fWgbc/1m1MTnirZENxmDXlbGgqZ0eIjofwSP/3PE9QltXYn ZLzPl2W2+UKx7H7/nC/M8zJJBJHfRc63nj90gxWtyChDGWrbqstC5rQy9nhVHETpJyQ+ /HCFCiUV1hNXg8Oha50DL4EsW6E7O6nrF2yOOIB4j3M/Izl0Zahzfh6whj+MEamsAEN0 rSkx9sVtxHwJXdccEl6Tiwdwp1GrPdSkRfCY+7JdDsOfoNEcyyqXb64TRdNQ5I5o4sqg vEBBlQOuvw3cjZgZZtpzNKaZEH5cEMAYv1KclR0kPSgCTNCXwpHGPDIMHOZ30BUSIwc6 +72Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m1EScMSU; 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-194971-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194971-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-794abd0aaa9si134960285a.273.2024.05.29.22.58.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194971-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=m1EScMSU; 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-194971-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194971-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 6B3541C221A7 for ; Thu, 30 May 2024 05:58:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1259A14372C; Thu, 30 May 2024 05:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m1EScMSU" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 AD8EC14374B for ; Thu, 30 May 2024 05:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717048668; cv=none; b=hQAnqOspUknCl/N6HVmukevfolq8DrJli5JcAXJlQEfi1DNuRRGySO1g5kQnBMTEJJmzHLYK5NU28r5UfAEEmXkXS6dou5P/TGmQNpDHVQahDhzi514UA7Ilc9OlLCcZ2YEsQscGiimdrGZS4gFxq6stVvoppZGOSeV6IoFHOTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717048668; c=relaxed/simple; bh=0jPSvOpzSu/1ntW+xRb8IeoZJjfEOY0fZfjsMUnNYOo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QIFGDdUHOn8nM/FZTN2tR0SP72hMmy41IlthnQIiwzOTcxM5olroJQYUb8YZ9AaI13tVFt8y5sIV6MGL7QkzQ1g+XG2lFT+qQGIP82BAgxe1LYiKjEzeeyxHCzM7pK+6kIXtCd2/zXijSwROvKH5/R4omm61i15PebWKkM4ZIng= 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=m1EScMSU; arc=none smtp.client-ip=209.85.214.181 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-pl1-f181.google.com with SMTP id d9443c01a7336-1f4a52d2688so4416655ad.3 for ; Wed, 29 May 2024 22:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717048665; x=1717653465; 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=Spln5gkQq1YOd2fgu2vLWG7jbq/zrTdhGVBswcY5AYE=; b=m1EScMSUtrSxYyOI5y132Z4mB1HhGmbxr+wkZ7xSx6Zxp0SQ3srjBC6fd/2IDsC8U9 CnNck767zEpUPOr4OI0kLby0e+cGR0L7ifwGUN784Eg9+QDyChjFQJOglF+RPRo2iJRZ WJXAeCzmsN4fgxSP73sw2dA7IE7onBWTQNL2OKGf7NJhX1+xb0NUMmzvXBRShtZcZBy5 GUyCQ5P++CgECixG1zsRngmJcGMhh5uMJ7Ow6vMQnLbTURI2HiPPZIxJ62NtwNO1y9E0 RUQtuL0VC1EQs4fOEbhYlTUIJ37H7N4b1G1Itlw8ehl83UppKqdEwHa1eluZbGq1Jgz9 zwfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717048665; x=1717653465; 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=Spln5gkQq1YOd2fgu2vLWG7jbq/zrTdhGVBswcY5AYE=; b=ugYoj09kL2bKM97Vs7lsV+UvdXI3TH54ddzOaaRvVb/wbqoCoi+Kekp3eQ8Cnzj12n Hcpdfvwl8llOLLkx+lw8+Cm4DkQAOGzGWB7snPe+oPbCL9PNy3Cr5Ox7wuk8iP6rh56E D7Pti9xa31eYk0a29TqmxsTiQIzor5f24A7uft8r/49QEajVfVu8juaMwS+smuYNt5O1 EnOfzEoW4v8nma9G0BBdqRH0ZKbOhGztq+Ba0dt57rYcsNf4rbk0Yf4v+V7zJ42bPbaS BYxmSEZWt7uPPpcfn3C7/JaMzVd+R25N7A4us7/mrjlgV0c66gAg5lAOXRWdDjV0aSJo QExA== X-Forwarded-Encrypted: i=1; AJvYcCV8NhT3J9rHDjvyhKlvD+qAvpTyyKkOqtUzPB1ALTPHs7viFGavfcqJ3JORrK5IHP2XEgg7lj1Pe6514hQDhipeMylG/0zGCCNNHNLF X-Gm-Message-State: AOJu0Yx0EFsw1A/wPekZ9+HmQm1PbYFQng1mCZEwCJBYJ1WcpT7ku5uY 0PBncMZ88XLIJH40e/vWDpu6AUituv2wukKayT9W1NSnixOCySF6Kan9pZYxXgs= X-Received: by 2002:a17:902:dacb:b0:1f4:f1dd:5b5 with SMTP id d9443c01a7336-1f61961b919mr16621095ad.20.1717048665030; Wed, 29 May 2024 22:57:45 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:57:44 -0700 (PDT) From: Jun Nie Date: Thu, 30 May 2024 13:56:50 +0800 Subject: [PATCH v6 6/6] drm/msm/dsi: add a comment to explain pkt_per_line encoding 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-6-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=1459; i=jun.nie@linaro.org; s=20240403; h=from:subject:message-id; bh=Ol91YDKyTosh4Px1J+abmBIR/KLUuHmXbEEWr2MUT+k=; b=GFoJEfJHKwlXuosM2S4bqgls61tMVX18LSIpIQv6l2QxPPxTGxRqjEQ5KCf4se6vDZ7v9Uygl rpXXCtGSUOFCwJ8drM2z4tafHOOc7L2ce9pH+dbtzRUpMPwf4YHhP4s X-Developer-Key: i=jun.nie@linaro.org; a=ed25519; pk=MNiBt/faLPvo+iJoP1hodyY2x6ozVXL8QMptmsKg3cc= From: Jonathan Marek Make it clear why the pkt_per_line value is being "divided by 2". 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 7252d36687e6..4768cff08381 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -885,7 +885,11 @@ 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) */ + if (pkt_per_line > 4) + drm_warn_once(msm_host->dev, "pkt_per_line too big"); 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); reg |= DSI_VIDEO_COMPRESSION_MODE_CTRL_EN; -- 2.34.1