mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
From bb1ee75de382c7a5218750476aa2a5792309cc70 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 30 Mar 2023 17:18:36 +0100
|
|
Subject: [PATCH] drm/vc4: Fix FKMS for when the YUV chroma planes are
|
|
different buffers
|
|
|
|
The code was assuming that it was a single buffer with offsets,
|
|
when kmstest uses separate buffers and 0 offsets for each plane.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
@@ -528,7 +528,7 @@ static int vc4_plane_to_mb(struct drm_pl
|
|
struct drm_plane_state *state)
|
|
{
|
|
struct drm_framebuffer *fb = state->fb;
|
|
- struct drm_gem_dma_object *bo = drm_fb_dma_get_gem_obj(fb, 0);
|
|
+ struct drm_gem_dma_object *bo;
|
|
const struct drm_format_info *drm_fmt = fb->format;
|
|
const struct vc_image_format *vc_fmt =
|
|
vc4_get_vc_image_fmt(drm_fmt->format);
|
|
@@ -552,6 +552,7 @@ static int vc4_plane_to_mb(struct drm_pl
|
|
state->normalized_zpos : -127;
|
|
mb->plane.num_planes = num_planes;
|
|
mb->plane.is_vu = vc_fmt->is_vu;
|
|
+ bo = drm_fb_dma_get_gem_obj(fb, 0);
|
|
mb->plane.planes[0] = bo->dma_addr + fb->offsets[0];
|
|
|
|
rotation = drm_rotation_simplify(state->rotation,
|
|
@@ -572,11 +573,14 @@ static int vc4_plane_to_mb(struct drm_pl
|
|
/* Makes assumptions on the stride for the chroma planes as we
|
|
* can't easily plumb in non-standard pitches.
|
|
*/
|
|
+ bo = drm_fb_dma_get_gem_obj(fb, 1);
|
|
mb->plane.planes[1] = bo->dma_addr + fb->offsets[1];
|
|
- if (num_planes > 2)
|
|
+ if (num_planes > 2) {
|
|
+ bo = drm_fb_dma_get_gem_obj(fb, 2);
|
|
mb->plane.planes[2] = bo->dma_addr + fb->offsets[2];
|
|
- else
|
|
+ } else {
|
|
mb->plane.planes[2] = 0;
|
|
+ }
|
|
|
|
/* Special case the YUV420 with U and V as line interleaved
|
|
* planes as we have special handling for that case.
|