Skip to content
Open
18 changes: 0 additions & 18 deletions .github/workflows/checkpatch.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/dtoverlaycheck.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/kernel-build-all-in-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Compile Each PR Commit

on:
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request number to compile'
required: true
type: number
branch:
description: 'Branch to checkout for PR (defaults to PR head)'
required: false
type: string

permissions:
contents: read
pull-requests: read

env:
NUM_JOBS: 6

jobs:
# Job 1: Extract commit SHAs and convert to a JSON matrix
generate-commit-matrix:
runs-on: ubuntu-24.04-arm
outputs:
commits: ${{ steps.set-commits.outputs.commits }}
steps:
- uses: actions/checkout@v7
- id: set-commits
run: |
set -eo pipefail

# Fetch commit SHAs from the PR using GitHub CLI
COMMITS=$(gh pr view ${{ github.event.pull_request.number }} --json commits -q '.commits[].oid')

# Convert newline-separated SHAs to a JSON array
COMMITS_JSON=$(echo "$COMMITS" | jq -R -s 'split("\n") | map(select(length > 0))')

echo "commits=$COMMITS_JSON" >> $GITHUB_OUTPUT

# Job 2: Compile each commit in parallel
compile-commits:
needs: generate-commit-matrix
runs-on: ubuntu-24.04-arm
# Skip if no commits (e.g., squash merge or empty PR)
if: needs.generate-commit-matrix.outputs.commits != '[]'
strategy:
matrix:
commit: ${{ fromJSON(needs.generate-commit-matrix.outputs.commits) }}
# Optional: Fail fast if any commit fails
fail-fast: true
steps:
- name: Checkout specific commit
uses: actions/checkout@v4
with:
ref: ${{ matrix.commit }}
fetch-depth: 1

- name: Compile
run: |
mkdir ${{github.workspace}}/build
export ARCH=arm64
make O=${{github.workspace}}/build bcm2711_defconfig
scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y
make O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs


- name: Verify Build Output
run: |
set -eo pipefail
KERNEL_IMAGE="arch/arm64/boot/Image"
if [ -f "$KERNEL_IMAGE" ]; then
echo "✅ Kernel Image built successfully: $KERNEL_IMAGE"
ls -lh "$KERNEL_IMAGE"
file "$KERNEL_IMAGE"
else
echo "❌ Kernel build failed or Image not found"
exit 1
fi
110 changes: 0 additions & 110 deletions .github/workflows/kernel-build.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/kunit.yml

This file was deleted.

8 changes: 4 additions & 4 deletions drivers/media/platform/raspberrypi/hevc_dec/hevc_d.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* Copyright (C) 2018 Bootlin
*/

#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/of.h>

#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
Expand Down Expand Up @@ -217,15 +217,15 @@ static int hevc_d_probe(struct platform_device *pdev)

ret = hevc_d_hw_probe(dev);
if (ret) {
dev_err(&pdev->dev, "Failed to probe hardware - %d\n", ret);
dev_err_probe(&pdev->dev, ret, "Failed to probe hardware\n");
return ret;
}

mutex_init(&dev->dev_mutex);

ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
if (ret) {
dev_err(&pdev->dev, "Failed to register V4L2 device\n");
dev_err_probe(&pdev->dev, ret, "Failed to register V4L2 device\n");
return ret;
}

Expand Down Expand Up @@ -327,7 +327,7 @@ static struct platform_driver hevc_d_driver = {
.remove = hevc_d_remove,
.driver = {
.name = HEVC_D_NAME,
.of_match_table = of_match_ptr(hevc_d_dt_match),
.of_match_table = hevc_d_dt_match,
},
};
module_platform_driver(hevc_d_driver);
Expand Down
11 changes: 8 additions & 3 deletions drivers/media/platform/raspberrypi/hevc_dec/hevc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,17 @@ struct hevc_d_ctx {
struct hevc_d_hwbuf pu_bufs[HEVC_D_P2BUF_COUNT];
struct hevc_d_hwbuf coeff_bufs[HEVC_D_P2BUF_COUNT];

/* Spinlock protecting aux_free */
spinlock_t aux_lock;
/* Aux structures only used in setup so no locking needed */
struct hevc_d_q_aux *aux_free;

struct hevc_d_q_aux *aux_ents[HEVC_D_AUX_ENT_COUNT];

struct hevc_d_slot {
u32 refybase;
u32 refcbase;
u32 colbase;
u32 poc;
} slots[HEVC_D_AUX_ENT_COUNT];

unsigned int colmv_stride;
unsigned int colmv_picsize;
};
Expand Down
Loading