From: Daniel Stone <daniel@fooishbar.org>
To: Huang Jiachai <hjc@rock-chips.com>
Cc: "Heiko Stuebner" <heiko@sntech.de>,
dri-devel <dri-devel@lists.freedesktop.org>,
"Andrzej Pietrasiewicz" <andrzej.p@collabora.com>,
linux-rockchip <linux-rockchip@lists.infradead.org>,
"Alyssa Rosenzweig" <alyssa.rosenzweig@collabora.com>,
"Daniel Vetter" <daniel@ffwll.ch>, 闫孝军 <andy.yan@rock-chips.com>
Subject: Re: [PATCH] drm/rockchip: Require the YTR modifier for AFBC
Date: Thu, 25 Feb 2021 12:46:19 +0000 [thread overview]
Message-ID: <CAPj87rMBt9bJhPcyX--xa_wMse9JCttHCfz1PkFXFwHcRheuJg@mail.gmail.com> (raw)
In-Reply-To: <d17ea299-b21e-b298-9098-f47b780be106@rock-chips.com>
Hi Sandy,
On Thu, 25 Feb 2021 at 02:17, Huang Jiachai <hjc@rock-chips.com> wrote:
> RK3399 and px30 can support YTR afbc format[RGB only], there is an
> hidden control bit to control this.
Great, thanks for providing this information!
> Hi Alyssa,
>
> Can you add the following patch to test on your platform? thanks.
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 99bdb5a2a185..0780ad46230a 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -105,7 +105,7 @@
> #define AFBC_FMT_U8U8U8U8 0x5
> #define AFBC_FMT_U8U8U8 0x4
>
> -#define AFBC_TILE_16x16 BIT(4)
> +#define AFBC_FMT_YTR BIT(4)
>
> /*
> * The coefficients of the following matrix are all fixed points.
> @@ -952,7 +952,9 @@ static void vop_plane_atomic_update(struct drm_plane
> *plane,
> if (rockchip_afbc(fb->modifier)) {
> int afbc_format =
> vop_convert_afbc_format(fb->format->format);
>
> - VOP_AFBC_SET(vop, format, afbc_format | AFBC_TILE_16x16);
> + if (fb->modifier & AFBC_FORMAT_MOD_YTR)
> + afbc_format |= AFBC_FMT_YTR;
> + VOP_AFBC_SET(vop, format, afbc_format);
> VOP_AFBC_SET(vop, hreg_block_split, 0);
> VOP_AFBC_SET(vop, win_sel, VOP_WIN_TO_INDEX(vop_win));
> VOP_AFBC_SET(vop, hdr_ptr, dma_addr);
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> index 4a2099cb582e..48e131b88c23 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> @@ -20,6 +20,7 @@
> #define ROCKCHIP_AFBC_MOD \
> DRM_FORMAT_MOD_ARM_AFBC( \
> AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 | AFBC_FORMAT_MOD_SPARSE \
> + | AFBC_FORMAT_MOD_YTR \
> )
Looks good - this will help us confirm. I think the complete patch
though would advertise both YTR and non-YTR modifiers: per Arm's
recommendation, it sounds like [AX]RGB8888 formats should only
advertise the non-YTR variant, and [AX]BGR8888 should advertise both
variants. Does that make sense?
Cheers,
Daniel
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2021-02-25 12:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 20:26 [PATCH] drm/rockchip: Require the YTR modifier for AFBC Alyssa Rosenzweig
2020-08-11 20:26 ` Alyssa Rosenzweig
2020-08-12 6:31 ` Greg KH
2020-08-12 6:31 ` Greg KH
2020-08-12 14:11 ` Daniel Vetter
2021-02-23 14:27 ` Daniel Stone
2021-02-23 14:43 ` Daniel Stone
2021-02-23 14:57 ` Brian Starkey
2021-02-23 15:29 ` Daniel Stone
2021-02-23 16:53 ` Brian Starkey
2021-02-23 17:10 ` Alyssa Rosenzweig
2021-02-23 18:34 ` Brian Starkey
2021-02-23 18:50 ` Daniel Stone
2021-02-24 14:58 ` Daniel Vetter
2021-02-24 16:06 ` Daniel Stone
2021-02-24 16:26 ` Brian Starkey
2021-02-25 2:17 ` Huang Jiachai
2021-02-25 12:46 ` Daniel Stone [this message]
2021-02-26 6:31 ` [PATCH] drm/rockchip: Require the YTR modifier for AFBC【请注意,邮件由linux-rockchip-bounces+sandy.huang=rock-chips.com@lists.infradead.org代发】 Huang Jiachai
2021-02-26 6:37 ` [PATCH] drm/rockchip: Require the YTR modifier for AFBC Huang Jiachai
2021-02-23 21:49 ` Heiko Stuebner
2021-02-24 12:40 ` Daniel Stone
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=CAPj87rMBt9bJhPcyX--xa_wMse9JCttHCfz1PkFXFwHcRheuJg@mail.gmail.com \
--to=daniel@fooishbar.org \
--cc=alyssa.rosenzweig@collabora.com \
--cc=andrzej.p@collabora.com \
--cc=andy.yan@rock-chips.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-rockchip@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).