diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch b/target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch new file mode 100644 index 0000000000..8fe4a3d96f --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0864-Revert-rpivid-Switch-to-new-clock-api.patch @@ -0,0 +1,65 @@ +From 775b90e37e5e418b19827eb696e5d034e7089f57 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard <maxime@cerno.tech> +Date: Wed, 16 Mar 2022 09:58:31 +0100 +Subject: [PATCH] Revert "rpivid: Switch to new clock api" + +This reverts commit ec7556e20c2c29c3df9493248a1a4d60ed20ae38. +--- + drivers/staging/media/rpivid/rpivid.h | 1 - + drivers/staging/media/rpivid/rpivid_video.c | 18 +++++------------- + 2 files changed, 5 insertions(+), 14 deletions(-) + +--- a/drivers/staging/media/rpivid/rpivid.h ++++ b/drivers/staging/media/rpivid/rpivid.h +@@ -90,7 +90,6 @@ struct rpivid_ctx { + struct v4l2_pix_format_mplane dst_fmt; + int dst_fmt_set; + +- struct clk_request *clk_req; + int src_stream_on; + int dst_stream_on; + +--- a/drivers/staging/media/rpivid/rpivid_video.c ++++ b/drivers/staging/media/rpivid/rpivid_video.c +@@ -545,13 +545,10 @@ static int rpivid_buf_prepare(struct vb2 + static void stop_clock(struct rpivid_dev *dev, struct rpivid_ctx *ctx) + { + if (ctx->src_stream_on || +- ctx->dst_stream_on || +- !ctx->clk_req) ++ ctx->dst_stream_on) + return; + +- clk_request_done(ctx->clk_req); +- ctx->clk_req = NULL; +- ++ clk_set_min_rate(dev->clock, 0); + clk_disable_unprepare(dev->clock); + } + +@@ -561,22 +558,17 @@ static int start_clock(struct rpivid_dev + long max_hevc_clock; + int rv; + +- if (ctx->clk_req) +- return 0; +- + max_hevc_clock = clk_round_rate(dev->clock, ULONG_MAX); + +- ctx->clk_req = clk_request_start(dev->clock, max_hevc_clock); +- if (!ctx->clk_req) { ++ rv = clk_set_min_rate(dev->clock, max_hevc_clock); ++ if (rv) { + dev_err(dev->dev, "Failed to set clock rate\n"); +- return -EIO; ++ return rv; + } + + rv = clk_prepare_enable(dev->clock); + if (rv) { + dev_err(dev->dev, "Failed to enable clock\n"); +- clk_request_done(ctx->clk_req); +- ctx->clk_req = NULL; + return rv; + } + |