From: Huang Jiachai <hjc@rock-chips.com>
To: linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] drm/rockchip: Require the YTR modifier for AFBC【请注意,邮件由linux-rockchip-bounces+sandy.huang=rock-chips.com@lists.infradead.org代发】
Date: Fri, 26 Feb 2021 14:31:34 +0800 [thread overview]
Message-ID: <64cff231-e76a-cbc7-ff58-7d249b94e09a@rock-chips.com> (raw)
In-Reply-To: <CAPj87rMBt9bJhPcyX--xa_wMse9JCttHCfz1PkFXFwHcRheuJg@mail.gmail.com>
Hi Daniel,
在 2021/2/25 20:46, Daniel Stone 写道:
> 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?
yes, RGB format have YTR and non-YTR variant, YUV format only have
non-YTR variant.
>
> Cheers,
> Daniel
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>
_______________________________________________
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-26 6:40 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
2021-02-26 6:31 ` Huang Jiachai [this message]
2021-02-26 6:37 ` 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=64cff231-e76a-cbc7-ff58-7d249b94e09a@rock-chips.com \
--to=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