From: Connor Abbott <cwabbott0@gmail.com>
To: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marijn Suijten <marijn.suijten@somainline.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org,
Connor Abbott <cwabbott0@gmail.com>
Subject: [PATCH v2 0/3] drm/msm: Further expose UBWC tiling parameters
Date: Wed, 03 Jul 2024 11:53:46 +0100 [thread overview]
Message-ID: <20240703-msm-tiling-config-v2-0-b9da29ab6608@gmail.com> (raw)
After testing, there are more parameters that we're programming which
affect how UBWC tiles are laid out in memory and therefore affect
the Mesa implementation of VK_EXT_host_image_copy [1], which includes a
CPU implementation of tiling and detiling images. In particular we have:
1. ubwc_mode, which is used to enable level 1 bank swizzling to go back
to UBWC 1.0 when the implementation supports UBWC 2.0. a610 sets
this.
2. macrotile_mode, which we previously left as default but according to
downstream we shouldn't for a680.
3. level2_swizzling_dis, which according to downstream has to be set
differently for a663.
I want as much as possible to avoid problems from people trying to
upstream Mesa/kernel support not knowing what they're doing and blindly
copying things, so let's make this very explicit that you must set the
correct parameters in the kernel and then make sure that Mesa always
gets the right parameters from the "source of truth" in the kernel by
adding two new UAPI parameters. The Mesa MR has already been updated to
use this if available.
A secondary goal is to make the adreno settings look more like the MDSS
settings, by combining ubwc_mode and level2_swizzling_dis into a single
ubwc_swizzle parameter that matches the MDSS one. This will help with
creating a single source of truth for all drivers later. The UAPI also
matches this, and it makes the Mesa tiling and detiling implementation
simpler/more straightforward.
For more information on what all these parameters mean, see the comments
I've added in the first commit and the giant comment in
src/freedreno/fdl/fd6_tiled_memcpy.c I've added in [1].
Testing of the Mesa MR both with and without this series is appreciated,
there are many different SoCs out there with different UBWC
configurations and I cannot test them all.
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
---
Changes in v2:
- Move ubwc_config field descriptions to kerneldoc comments on the struct
- Link to v1: https://lore.kernel.org/r/20240702-msm-tiling-config-v1-0-adaa6a6e4523@gmail.com
---
Connor Abbott (3):
drm/msm: Update a6xx register XML
drm/msm: Expand UBWC config setting
drm/msm: Expose expanded UBWC config uapi
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 +
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 34 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 +
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 32 +-
drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 1617 ++++++++++++++++++++++++-
include/uapi/drm/msm_drm.h | 2 +
6 files changed, 1664 insertions(+), 31 deletions(-)
---
base-commit: 269b88cb92e62e52718cd44c07b7517265193157
change-id: 20240701-msm-tiling-config-c5f222f5db1c
Best regards,
--
Connor Abbott <cwabbott0@gmail.com>
next reply other threads:[~2024-07-03 10:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 10:53 Connor Abbott [this message]
2024-07-03 10:53 ` [PATCH v2 1/3] drm/msm: Update a6xx register XML Connor Abbott
2024-07-03 10:53 ` [PATCH v2 2/3] drm/msm: Expand UBWC config setting Connor Abbott
2024-07-03 10:53 ` [PATCH v2 3/3] drm/msm: Expose expanded UBWC config uapi Connor Abbott
2024-07-31 16:05 ` [PATCH v2 0/3] drm/msm: Further expose UBWC tiling parameters Rob Clark
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=20240703-msm-tiling-config-v2-0-b9da29ab6608@gmail.com \
--to=cwabbott0@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox