All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alyssa Rosenzweig <alyssa@collabora.com>
To: Brian Starkey <brian.starkey@arm.com>
Cc: nd <nd@arm.com>, Sandy Huang <hjc@rock-chips.com>,
	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 Stone <daniel@fooishbar.org>
Subject: Re: [PATCH] drm/rockchip: Require the YTR modifier for AFBC
Date: Tue, 23 Feb 2021 17:10:16 +0000	[thread overview]
Message-ID: <YDU2+A0MNJnrWxPs@maud> (raw)
In-Reply-To: <20210223165348.edghgglgx4g2lvfw@DESKTOP-E1NTVVP.localdomain>

> If YTR can't be turned off, then according to the AFBC spec - correct.

There is no public AFBC spec, so I'm not sure how to respond to this.

> If the hardware allows it to be configured to use YTR with other
> component orders, I don't know exactly what the impact would be -
> maybe nothing.

It's legal to use YTR with a BGR framebuffer regardless of the content
of the framebuffer, yes? Could I postprocess with the following shader?

	void main() {
		vec4 colour = ....;
		gl_FragColor = colour.bgra;
	}

That's just 3D rendering. But now if I feed that rendered "BGR"
framebuffer in I get the illusion of RGB out.

Doing the colourspace conversion in hardware (with the
GPU's component reordering) is mathematically indistinguishable from
rendering BGR with that shader.

I sympathize with reducing AFBC's combinatoric explosion, and I realize
that the Rockchip VOP is probably wrong. I also realize that the
transform is defined for BGR inputs, not RGB ones, so it might be
slightly less effective for real content. But it seems to me allowing
both BGR+YTR and RGB+YTR upstream is the better route than simply
preventing hardware from using AFBC at all, and there are natural
encodings for both with fourcc modifiers.

Maybe there's a deeper reason to require BGR that I'm missing? Please
let me know if I've misunderstood, I only know AFBC from the GPU side.

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Alyssa Rosenzweig <alyssa@collabora.com>
To: Brian Starkey <brian.starkey@arm.com>
Cc: nd <nd@arm.com>, Sandy Huang <hjc@rock-chips.com>,
	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>
Subject: Re: [PATCH] drm/rockchip: Require the YTR modifier for AFBC
Date: Tue, 23 Feb 2021 17:10:16 +0000	[thread overview]
Message-ID: <YDU2+A0MNJnrWxPs@maud> (raw)
In-Reply-To: <20210223165348.edghgglgx4g2lvfw@DESKTOP-E1NTVVP.localdomain>

> If YTR can't be turned off, then according to the AFBC spec - correct.

There is no public AFBC spec, so I'm not sure how to respond to this.

> If the hardware allows it to be configured to use YTR with other
> component orders, I don't know exactly what the impact would be -
> maybe nothing.

It's legal to use YTR with a BGR framebuffer regardless of the content
of the framebuffer, yes? Could I postprocess with the following shader?

	void main() {
		vec4 colour = ....;
		gl_FragColor = colour.bgra;
	}

That's just 3D rendering. But now if I feed that rendered "BGR"
framebuffer in I get the illusion of RGB out.

Doing the colourspace conversion in hardware (with the
GPU's component reordering) is mathematically indistinguishable from
rendering BGR with that shader.

I sympathize with reducing AFBC's combinatoric explosion, and I realize
that the Rockchip VOP is probably wrong. I also realize that the
transform is defined for BGR inputs, not RGB ones, so it might be
slightly less effective for real content. But it seems to me allowing
both BGR+YTR and RGB+YTR upstream is the better route than simply
preventing hardware from using AFBC at all, and there are natural
encodings for both with fourcc modifiers.

Maybe there's a deeper reason to require BGR that I'm missing? Please
let me know if I've misunderstood, I only know AFBC from the GPU side.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-02-23 17:10 UTC|newest]

Thread overview: 49+ 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-11 20:26 ` 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  6:31   ` Greg KH
2020-08-12  6:31   ` Greg KH
2020-08-12 14:11   ` Daniel Vetter
2020-08-12 14:11     ` Daniel Vetter
2020-08-12 14:11     ` Daniel Vetter
2020-08-12 14:11     ` Daniel Vetter
2021-02-23 14:27 ` Daniel Stone
2021-02-23 14:27   ` Daniel Stone
2021-02-23 14:43   ` Daniel Stone
2021-02-23 14:43     ` Daniel Stone
2021-02-23 14:57   ` Brian Starkey
2021-02-23 14:57     ` Brian Starkey
2021-02-23 15:29     ` Daniel Stone
2021-02-23 15:29       ` Daniel Stone
2021-02-23 16:53       ` Brian Starkey
2021-02-23 16:53         ` Brian Starkey
2021-02-23 17:10         ` Alyssa Rosenzweig [this message]
2021-02-23 17:10           ` Alyssa Rosenzweig
2021-02-23 18:34           ` Brian Starkey
2021-02-23 18:34             ` Brian Starkey
2021-02-23 18:50             ` Daniel Stone
2021-02-23 18:50               ` Daniel Stone
2021-02-24 14:58               ` Daniel Vetter
2021-02-24 14:58                 ` Daniel Vetter
2021-02-24 16:06                 ` Daniel Stone
2021-02-24 16:06                   ` Daniel Stone
2021-02-24 16:26                   ` Brian Starkey
2021-02-24 16:26                     ` Brian Starkey
2021-02-25  2:17   ` Huang Jiachai
2021-02-25  2:17     ` Huang Jiachai
2021-02-25 12:46     ` Daniel Stone
2021-02-25 12:46       ` Daniel Stone
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-26  6:37         ` Huang Jiachai
2021-02-23 21:49 ` Heiko Stuebner
2021-02-23 21:49   ` Heiko Stuebner
2021-02-23 21:49   ` Heiko Stuebner
2021-02-23 21:49   ` Heiko Stuebner
2021-02-24 12:40   ` Daniel Stone
2021-02-24 12:40     ` Daniel Stone
2021-02-24 12:40     ` Daniel Stone
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=YDU2+A0MNJnrWxPs@maud \
    --to=alyssa@collabora.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=andrzej.p@collabora.com \
    --cc=brian.starkey@arm.com \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=nd@arm.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.