From 1f7ec5438b28da85e20d5ed6978288bdf816b03d Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 18 Jan 2021 21:22:42 +0100 Subject: [PATCH] linux (RPi): update to 5.10.7-c077470 drop LBM and scaler pos patches which are now in RPi kernel tree Signed-off-by: Matthias Reichl --- packages/linux/package.mk | 4 +- .../linux-011-fix-lbm-pr4075.patch | 70 ------------------- .../raspberrypi/linux-012-fix-pos1-scl.patch | 27 ------- 3 files changed, 2 insertions(+), 99 deletions(-) delete mode 100644 packages/linux/patches/raspberrypi/linux-011-fix-lbm-pr4075.patch delete mode 100644 packages/linux/patches/raspberrypi/linux-012-fix-pos1-scl.patch diff --git a/packages/linux/package.mk b/packages/linux/package.mk index fd607610e0..47e9d99491 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -22,8 +22,8 @@ case "${LINUX}" in PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz" ;; raspberrypi) - PKG_VERSION="e9505f4612646533f53813aabef5ca040b0ea49d" # 5.10.7 - PKG_SHA256="2d6e3637dbe328161161cbdede2902e0aaaa979bd0179a40e14d2960a61de593" + PKG_VERSION="c07747092a602a1e36dfae545c604c31e602362a" # 5.10.7 + PKG_SHA256="2d68653fc14fb06fa1dce69954c006cef93fd91b092319075361bcc3ff894d1d" PKG_URL="https://github.com/raspberrypi/linux/archive/${PKG_VERSION}.tar.gz" PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz" ;; diff --git a/packages/linux/patches/raspberrypi/linux-011-fix-lbm-pr4075.patch b/packages/linux/patches/raspberrypi/linux-011-fix-lbm-pr4075.patch deleted file mode 100644 index d87af277bb..0000000000 --- a/packages/linux/patches/raspberrypi/linux-011-fix-lbm-pr4075.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 20076ee25ac4a9ddc26dfbb508570c85c88ba6ef Mon Sep 17 00:00:00 2001 -From: Dom Cobley -Date: Thu, 14 Jan 2021 16:01:50 +0000 -Subject: [PATCH] vc4: Correct lbm size and calculation - -LBM base address is measured in units of pixels per cycle. -That is 4 for 2711 (hvs5) and 2 for 2708. - -We are wasting 75% of lbm by indexing without the scaling. -But we were also using too high a size for the lbm resulting -in partial corruption (right hand side) of vertically -scaled images, usually at 4K or lower resolutions with more layers. - -The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit -(pixels are stored 12-bits per component regardless of format). - -The LBM adress indexes work in units of pixels per clock, -so for 4 pixels per clock that means we have 32 * 1920 = 60K - -Signed-off-by: Dom Cobley ---- - drivers/gpu/drm/vc4/vc4_hvs.c | 8 ++++---- - drivers/gpu/drm/vc4/vc4_plane.c | 7 ++++++- - 2 files changed, 10 insertions(+), 5 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c -index f2a99579a8d0f..3ceda2ff072bb 100644 ---- a/drivers/gpu/drm/vc4/vc4_hvs.c -+++ b/drivers/gpu/drm/vc4/vc4_hvs.c -@@ -661,11 +661,11 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) - * for now we just allocate globally. - */ - if (!hvs->hvs5) -- /* 96kB */ -- drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024); -+ /* 48k words of 2x12-bit pixels */ -+ drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024); - else -- /* 70k words */ -- drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024); -+ /* 60k words of 4x12-bit pixels */ -+ drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024); - - /* Upload filter kernels. We only have the one for now, so we - * keep it around for the lifetime of the driver. -diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 100b3541bc6ef..6bdfc1ba7b46d 100644 ---- a/drivers/gpu/drm/vc4/vc4_plane.c -+++ b/drivers/gpu/drm/vc4/vc4_plane.c -@@ -444,6 +444,7 @@ static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst) - static u32 vc4_lbm_size(struct drm_plane_state *state) - { - struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); -+ struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev); - u32 pix_per_line; - u32 lbm; - -@@ -479,7 +480,11 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) - lbm = pix_per_line * 16; - } - -- lbm = roundup(lbm, 32); -+ /* Align it to 64 or 128 (hvs5) bytes */ -+ lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64); -+ -+ /* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */ -+ lbm /= vc4->hvs->hvs5 ? 4 : 2; - - return lbm; - } diff --git a/packages/linux/patches/raspberrypi/linux-012-fix-pos1-scl.patch b/packages/linux/patches/raspberrypi/linux-012-fix-pos1-scl.patch deleted file mode 100644 index 239ba21039..0000000000 --- a/packages/linux/patches/raspberrypi/linux-012-fix-pos1-scl.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 21ed5c49de516d496f9820dc1ddaa4027daa8823 Mon Sep 17 00:00:00 2001 -From: Dom Cobley -Date: Sun, 17 Jan 2021 17:07:02 +0000 -Subject: [PATCH] vc4: Correct POS1_SCL for hvs5 - -Fixes: c54619b0bfb35c4153b3fb34916a6fa50dcf2dc1 -Signed-off-by: Dom Cobley ---- - drivers/gpu/drm/vc4/vc4_plane.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 6bdfc1ba7b46d..b5586c92bfe54 100644 ---- a/drivers/gpu/drm/vc4/vc4_plane.c -+++ b/drivers/gpu/drm/vc4/vc4_plane.c -@@ -984,9 +984,9 @@ static int vc4_plane_mode_set(struct drm_plane *plane, - if (!vc4_state->is_unity) { - vc4_dlist_write(vc4_state, - VC4_SET_FIELD(vc4_state->crtc_w, -- SCALER_POS1_SCL_WIDTH) | -+ SCALER5_POS1_SCL_WIDTH) | - VC4_SET_FIELD(vc4_state->crtc_h, -- SCALER_POS1_SCL_HEIGHT)); -+ SCALER5_POS1_SCL_HEIGHT)); - } - - /* Position Word 2: Source Image Size */