The AFBC decoder used in the Rockchip VOP assumes the use of the
YUV-like colourspace transform (YTR). YTR is lossless for RGB(A)
buffers, which covers the RGBA8 and RGB565 formats supported in
vop_convert_afbc_format. Use of YTR is signaled with the
AFBC_FORMAT_MOD_YTR modifier, which prior to this commit was missing. As
such, a producer would have to generate buffers that do not use YTR,
which the VOP would erroneously decode as YTR, leading to severe visual
corruption.
The upstream AFBC support was developed against a captured frame, which
failed to exercise modifier support. Prior to bring-up of AFBC in Mesa
(in the Panfrost driver), no open userspace respected modifier
reporting. As such, this change is not expected to affect broken
userspaces.
Tested on RK3399 with Panfrost and Weston.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig(a)collabora.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 4a2099cb5..857d97cdc 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -17,9 +17,20 @@
#define NUM_YUV2YUV_COEFFICIENTS 12
+/* AFBC supports a number of configurable modes. Relevant to us is block size
+ * (16x16 or 32x8), storage modifiers (SPARSE, SPLIT), and the YUV-like
+ * colourspace transform (YTR). 16x16 SPARSE mode is always used. SPLIT mode
+ * could be enabled via the hreg_block_split register, but is not currently
+ * handled. The colourspace transform is implicitly always assumed by the
+ * decoder, so consumers must use this transform as well.
+ *
+ * Failure to match modifiers will cause errors displaying AFBC buffers
+ * produced by conformant AFBC producers, including Mesa.
+ */
#define ROCKCHIP_AFBC_MOD \
DRM_FORMAT_MOD_ARM_AFBC( \
AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 | AFBC_FORMAT_MOD_SPARSE \
+ | AFBC_FORMAT_MOD_YTR \
)
enum vop_data_format {
--
2.28.0
I found a dead code in the queue/4.9 branch of the stable-rc repository.
2021-02-03:
commit c27f392040e2f6 ("futex: Provide distinct return value when
owner is exiting")
The function handle_exit_race does not exist. Therefore, the
change in handle_exit_race() is ignored in the patch round.
2021-02-22:
commit e55cb811e612 ("futex: Cure exit race")
Define the handle_exit_race() function,
but no branch in the function returns EBUSY.
As a result, dead code occurs in the attach_to_pi_owner():
int ret = handle_exit_race(uaddr, uval, p);
...
if (ret == -EBUSY)
*exiting = p; /* dead code */
To fix the dead code, modify the commit e55cb811e612 ("futex: Cure exit race"),
or install a patch to incorporate the changes in handle_exit_race().
I am unfamiliar with the processing of the stable-rc queue branch,
and I cannot find the patch mail of the current branch in
https://lore.kernel.org/lkml/?q=%22futex%3A+Cure+exit+race%22
Therefore, I re-integrated commit ac31c7ff8624 ("futex: Provide distinct
return value when owner is exiting").
-----
Thomas Gleixner (1):
futex: Provide distinct return value when owner is exiting
kernel/futex.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.27.0
This is the start of the stable review cycle for the 5.11.1 release.
There are 12 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 24 Feb 2021 12:07:46 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.11.1-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.11.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.11.1-rc1
Matwey V. Kornilov <matwey(a)sai.msu.ru>
media: pwc: Use correct device for DMA
Trent Piepho <tpiepho(a)gmail.com>
Bluetooth: btusb: Always fallback to alt 1 for WBS
Linus Torvalds <torvalds(a)linux-foundation.org>
tty: protect tty_write from odd low-level tty disciplines
Jan Beulich <jbeulich(a)suse.com>
xen-blkback: fix error handling in xen_blkbk_map()
Jan Beulich <jbeulich(a)suse.com>
xen-scsiback: don't "handle" error by BUG()
Jan Beulich <jbeulich(a)suse.com>
xen-netback: don't "handle" error by BUG()
Jan Beulich <jbeulich(a)suse.com>
xen-blkback: don't "handle" error by BUG()
Stefano Stabellini <stefano.stabellini(a)xilinx.com>
xen/arm: don't ignore return errors from set_phys_to_machine
Jan Beulich <jbeulich(a)suse.com>
Xen/gntdev: correct error checking in gntdev_map_grant_pages()
Jan Beulich <jbeulich(a)suse.com>
Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()
Jan Beulich <jbeulich(a)suse.com>
Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
Jan Beulich <jbeulich(a)suse.com>
Xen/x86: don't bail early from clear_foreign_p2m_mapping()
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/xen/p2m.c | 6 ++++--
arch/x86/xen/p2m.c | 15 +++++++--------
drivers/block/xen-blkback/blkback.c | 32 ++++++++++++++++++--------------
drivers/bluetooth/btusb.c | 20 ++++++--------------
drivers/media/usb/pwc/pwc-if.c | 22 +++++++++++++---------
drivers/net/xen-netback/netback.c | 4 +---
drivers/tty/tty_io.c | 5 ++++-
drivers/xen/gntdev.c | 37 ++++++++++++++++++++-----------------
drivers/xen/xen-scsiback.c | 4 ++--
include/xen/grant_table.h | 1 +
11 files changed, 78 insertions(+), 72 deletions(-)