From: "Andy Yan" <andyshrk@163.com>
To: "Konstantin Shabanov" <mail@etehtsea.me>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Daniel Stone" <daniel@fooishbar.org>,
"Dan Callaghan" <djc@djc.id.au>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re:[PATCH v2] (drm/rockchip) Reject AFBC for resolutions >2560x1600
Date: Mon, 14 Apr 2025 18:16:28 +0800 (CST) [thread overview]
Message-ID: <60813eed.a78b.19633cce4fb.Coremail.andyshrk@163.com> (raw)
In-Reply-To: <20250414095332.9674-1-mail@etehtsea.me>
Hi Konstantin,
the Subject should be: drm/rockchip: xxxxxxxxxxxx
At 2025-04-14 17:53:31, "Konstantin Shabanov" <mail@etehtsea.me> wrote:
>As it isn't supported by hardware. At least, RK3399 doesn't support
>it. From the datasheet[1]
>("1.2.10 Video IN/OUT", "Display Interface", p. 17):
>
> Support AFBC function co-operation with GPU
> * support 2560x1600 UI
>
>Manually tested on RockPro64 (rk3399):
>- ARM_AFBC modifier is used for 1920x1080
>- DRM_FORMAT_MOD_LINEAR modifier us used for 3840x2160
>- No noise on the screen when sway is running in 4k
>- Dynamic resolution switching works correctly in sway
>
>Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>
>Cc: Daniel Stone <daniel@fooishbar.org>
>Reported-by: Dan Callaghan <djc@djc.id.au>
>Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7968
>
>[1]: https://opensource.rock-chips.com/images/d/d7/Rockchip_RK3399_Datasheet_V2.1-20200323.pdf
>---
> drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
>diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
>index dcc1f07632c3..1379bc3cd937 100644
>--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
>+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
>@@ -18,6 +18,8 @@
> #include "rockchip_drm_fb.h"
> #include "rockchip_drm_gem.h"
>
>+#define ROCKCHIP_AFBC_MAX_WIDTH 2560
>+
> static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = {
> .destroy = drm_gem_fb_destroy,
> .create_handle = drm_gem_fb_create_handle,
>@@ -52,6 +54,13 @@ rockchip_fb_create(struct drm_device *dev, struct drm_file *file,
> }
>
> if (drm_is_afbc(mode_cmd->modifier[0])) {
>+ if (mode_cmd->width > ROCKCHIP_AFBC_MAX_WIDTH) {
>+ DRM_DEBUG_KMS("AFBC is not supported for the width %d (max %d)\n",
>+ mode_cmd->width,
>+ ROCKCHIP_AFBC_MAX_WIDTH);
>+ return ERR_PTR(-EINVAL);
>+ };
As the commit message saying: This restriction only applies to rk3399.
There is no such limitation for rk356x/rk3588.
But this patch will Reject AFBC for resolutions >2560x1600 on all rockchip platforms,
so this is not right.
>+
> int ret, i;
>
> ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb);
>
>base-commit: e7bb7d44c3b97aea1f0e354c6499900154ac67f2
>--
>2.48.1
next prev parent reply other threads:[~2025-04-14 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250402125320.21836-1-mail@etehtsea.me>
2025-04-14 9:53 ` [PATCH " Konstantin Shabanov
2025-04-14 10:16 ` Andy Yan [this message]
2025-04-17 4:20 ` [PATCH v3] drm/rockchip: Disable AFBC for res >2560 on rk3399 Konstantin Shabanov
2025-04-17 6:57 ` [PATCH v4] " Konstantin Shabanov
2025-04-18 0:16 ` Andy Yan
2025-04-18 9:43 ` [PATCH " Daniel Stone
2025-04-18 9:50 ` Andy Yan
2025-04-24 11:31 ` Konstantin Shabanov
2025-05-21 16:05 ` [PATCH v5] drm/rockchip: Reject " Konstantin Shabanov
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=60813eed.a78b.19633cce4fb.Coremail.andyshrk@163.com \
--to=andyshrk@163.com \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=daniel@fooishbar.org \
--cc=djc@djc.id.au \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mail@etehtsea.me \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®