mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +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>
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 2dd2f36d10961e3819ff0525ae2567e601973826 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Winkowski <dereference23@outlook.com>
|
|
Date: Mon, 3 Jul 2023 18:29:37 +0000
|
|
Subject: [PATCH] vc04_services/vc-sm-cma: Switch one-bit bitfields to bool
|
|
|
|
Clang 16 warns:
|
|
|
|
../drivers/staging/vc04_services/vc-sm-cma/vc_sm.c:816:19: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
|
|
buffer->imported = 1;
|
|
^ ~
|
|
../drivers/staging/vc04_services/vc-sm-cma/vc_sm.c:822:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
|
|
buffer->in_use = 1;
|
|
^ ~
|
|
2 warnings generated.
|
|
|
|
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
|
|
---
|
|
drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 6 +++---
|
|
drivers/staging/vc04_services/vc-sm-cma/vc_sm.h | 4 ++--
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
|
|
+++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
|
|
@@ -533,7 +533,7 @@ static void vc_sm_dma_buf_release(struct
|
|
|
|
pr_debug("%s dmabuf %p, buffer %p\n", __func__, dmabuf, buffer);
|
|
|
|
- buffer->in_use = 0;
|
|
+ buffer->in_use = false;
|
|
|
|
/* Unmap on the VPU */
|
|
vc_sm_vpu_free(buffer);
|
|
@@ -813,13 +813,13 @@ vc_sm_cma_import_dmabuf_internal(struct
|
|
buffer->size = import.size;
|
|
buffer->vpu_state = VPU_MAPPED;
|
|
|
|
- buffer->imported = 1;
|
|
+ buffer->imported = true;
|
|
buffer->import.dma_buf = dma_buf;
|
|
|
|
buffer->import.attach = attach;
|
|
buffer->import.sgt = sgt;
|
|
buffer->dma_addr = dma_addr;
|
|
- buffer->in_use = 1;
|
|
+ buffer->in_use = true;
|
|
buffer->kernel_id = import.kernel_id;
|
|
|
|
/*
|
|
--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.h
|
|
+++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.h
|
|
@@ -57,8 +57,8 @@ struct vc_sm_buffer {
|
|
|
|
char name[VC_SM_MAX_NAME_LEN];
|
|
|
|
- int in_use:1; /* Kernel is still using this resource */
|
|
- int imported:1; /* Imported dmabuf */
|
|
+ bool in_use:1; /* Kernel is still using this resource */
|
|
+ bool imported:1; /* Imported dmabuf */
|
|
|
|
enum vc_sm_vpu_mapping_state vpu_state;
|
|
u32 vc_handle; /* VideoCore handle for this buffer */
|