All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
	 Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	 Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	 Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Bryan O'Donoghue <bod@kernel.org>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	 linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	 freedreno@lists.freedesktop.org, linux-media@vger.kernel.org,
	 Wangao Wang <wangao.wang@oss.qualcomm.com>
Subject: Re: [PATCH v4 2/9] soc: qcom: ubwc: add helpers to get programmable values
Date: Mon, 30 Mar 2026 12:50:51 -0500	[thread overview]
Message-ID: <acq3GSPpZWiGucJb@baldur> (raw)
In-Reply-To: <20260125-iris-ubwc-v4-2-1ff30644ac81@oss.qualcomm.com>

On Sun, Jan 25, 2026 at 01:30:04PM +0200, Dmitry Baryshkov wrote:
> Currently the database stores macrotile_mode in the data. However it
> can be derived from the rest of the data: it should be used for UBWC
> encoding >= 3.0 except for several corner cases (SM8150 and SC8180X).
> 
> The ubwc_bank_spread field seems to be based on the impreside data we
> had for the MDSS and DPU programming. In some cases UBWC engine inside
> the display controller doesn't need to program it, although bank spread
> is to be enabled.
> 
> Bank swizzle is also currently stored as is, but it is almost standard
> (banks 1-3 for UBWC 1.0 and 2-3 for other versions), the only exception
> being Lemans (it uses only bank 3).
> 
> Add helpers returning values from the config for now. They will be
> rewritten later, in a separate series, but having the helper now
> simplifies refacroring the code later.
> 
> Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

Please find patch 1 and 2 in an immutable branch at:

  https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git 20260125-iris-ubwc-v4-1-1ff30644ac81@oss.qualcomm.com

Regards,
Bjorn

> ---
>  include/linux/soc/qcom/ubwc.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index 5bdeca18d54d..f5d0e2341261 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -84,4 +84,19 @@ static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data
>  		 cfg->ubwc_dec_version == UBWC_3_0);
>  }
>  
> +static inline bool qcom_ubwc_macrotile_mode(const struct qcom_ubwc_cfg_data *cfg)
> +{
> +	return cfg->macrotile_mode;
> +}
> +
> +static inline bool qcom_ubwc_bank_spread(const struct qcom_ubwc_cfg_data *cfg)
> +{
> +	return cfg->ubwc_bank_spread;
> +}
> +
> +static inline u32 qcom_ubwc_swizzle(const struct qcom_ubwc_cfg_data *cfg)
> +{
> +	return cfg->ubwc_swizzle;
> +}
> +
>  #endif /* __QCOM_UBWC_H__ */
> 
> -- 
> 2.47.3
> 

  parent reply	other threads:[~2026-03-30 17:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25 11:30 [PATCH v4 0/9] media: iris: migrate to using global UBWC config Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 1/9] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 2/9] soc: qcom: ubwc: add helpers to get programmable values Dmitry Baryshkov
2026-01-25 17:16   ` Connor Abbott
2026-01-26 10:02     ` Konrad Dybcio
2026-02-17 10:55   ` Konrad Dybcio
2026-02-18  0:44     ` Dmitry Baryshkov
2026-03-30 17:50   ` Bjorn Andersson [this message]
2026-01-25 11:30 ` [PATCH v4 3/9] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
2026-03-26  5:06   ` Dikshita Agarwal
2026-03-27 19:42     ` Dmitry Baryshkov
2026-03-27 20:43       ` Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 4/9] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 5/9] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 6/9] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 7/9] media: iris: don't specify bank_spreading " Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 8/9] media: iris: don't specify max_channels " Dmitry Baryshkov
2026-01-25 11:30 ` [PATCH v4 9/9] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
2026-03-31 21:04 ` (subset) [PATCH v4 0/9] media: iris: migrate to using global UBWC config Bjorn Andersson
2026-04-01 11:38   ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acq3GSPpZWiGucJb@baldur \
    --to=andersson@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=bod@kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mchehab@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=vikash.garodia@oss.qualcomm.com \
    --cc=wangao.wang@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.