From edf9ed96a4011014c425bbe6000cc7a592c13293 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 21 May 2025 17:19:42 +0200 Subject: [PATCH] bcm27xx: refresh patches for v6.12.29 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 0912d3f59547 ("kernel: bump 6.12 to 6.12.29") was merged right after bcm27xx 6.12 support commits, causing conflicts. Refresh patches and removed upstreamed patch in v6.12.29: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.12.y&id=a5f162727b91e480656da1876247a91f651f76de Fixes: 0912d3f59547 ("kernel: bump 6.12 to 6.12.29") Signed-off-by: Álvaro Fernández Rojas --- ...m2835-camera-Add-support-for-DMABUFs.patch | 2 +- ...-Add-a-timing-for-the-Raspberry-Pi-7.patch | 16 ++-- ...a-introduce-a-customisable-threshold.patch | 2 +- ...wc3-Set-DMA-and-coherent-masks-early.patch | 2 +- ...-add-FS-LS-bus-instance-parkmode-dis.patch | 2 +- ...d-support-for-setting-NAK-enhancemen.patch | 2 +- ...35-camera-Initialise-dev-in-v4l2_dev.patch | 10 +-- ...to-pending-list-if-the-reset-was-ski.patch | 79 ------------------- 8 files changed, 18 insertions(+), 97 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.12/950-1002-drm-v3d-Add-job-to-pending-list-if-the-reset-was-ski.patch diff --git a/target/linux/bcm27xx/patches-6.12/950-0222-staging-bcm2835-camera-Add-support-for-DMABUFs.patch b/target/linux/bcm27xx/patches-6.12/950-0222-staging-bcm2835-camera-Add-support-for-DMABUFs.patch index 79c27d07efa..8aac4a4ecca 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0222-staging-bcm2835-camera-Add-support-for-DMABUFs.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0222-staging-bcm2835-camera-Add-support-for-DMABUFs.patch @@ -26,7 +26,7 @@ Signed-off-by: Dave Stevenson .vidioc_enum_framesizes = vidioc_enum_framesizes, .vidioc_enum_frameintervals = vidioc_enum_frameintervals, .vidioc_g_parm = vidioc_g_parm, -@@ -1930,7 +1931,7 @@ static int bcm2835_mmal_probe(struct vch +@@ -1931,7 +1932,7 @@ static int bcm2835_mmal_probe(struct vch q = &dev->capture.vb_vidq; memset(q, 0, sizeof(*q)); q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; diff --git a/target/linux/bcm27xx/patches-6.12/950-0231-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch b/target/linux/bcm27xx/patches-6.12/950-0231-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch index d1b5bdfd8ad..442344653aa 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0231-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0231-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch @@ -315,7 +315,7 @@ Signed-off-by: Dave Stevenson ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); if (ddc) { panel->ddc = of_find_i2c_adapter_by_node(ddc); -@@ -2261,6 +2242,32 @@ static const struct panel_desc friendlya +@@ -2262,6 +2243,32 @@ static const struct panel_desc friendlya }, }; @@ -348,7 +348,7 @@ Signed-off-by: Dave Stevenson static const struct drm_display_mode giantplus_gpg482739qs5_mode = { .clock = 9000, .hdisplay = 480, -@@ -2441,6 +2448,38 @@ static const struct panel_desc innolux_a +@@ -2442,6 +2449,38 @@ static const struct panel_desc innolux_a .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, }; @@ -387,7 +387,7 @@ Signed-off-by: Dave Stevenson static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, -@@ -3854,6 +3893,31 @@ static const struct panel_desc rocktech_ +@@ -3855,6 +3894,31 @@ static const struct panel_desc rocktech_ .connector_type = DRM_MODE_CONNECTOR_DPI, }; @@ -419,7 +419,7 @@ Signed-off-by: Dave Stevenson static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, -@@ -4798,6 +4862,9 @@ static const struct of_device_id platfor +@@ -4799,6 +4863,9 @@ static const struct of_device_id platfor .compatible = "friendlyarm,hd702e", .data = &friendlyarm_hd702e, }, { @@ -429,7 +429,7 @@ Signed-off-by: Dave Stevenson .compatible = "giantplus,gpg482739qs5", .data = &giantplus_gpg482739qs5 }, { -@@ -4819,6 +4886,9 @@ static const struct of_device_id platfor +@@ -4820,6 +4887,9 @@ static const struct of_device_id platfor .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, }, { @@ -439,7 +439,7 @@ Signed-off-by: Dave Stevenson .compatible = "innolux,at070tn92", .data = &innolux_at070tn92, }, { -@@ -4978,6 +5048,9 @@ static const struct of_device_id platfor +@@ -4979,6 +5049,9 @@ static const struct of_device_id platfor .compatible = "rocktech,rk043fn48h", .data = &rocktech_rk043fn48h, }, { @@ -449,7 +449,7 @@ Signed-off-by: Dave Stevenson .compatible = "rocktech,rk070er9427", .data = &rocktech_rk070er9427, }, { -@@ -5334,6 +5407,9 @@ static const struct panel_desc_dsi osd10 +@@ -5335,6 +5408,9 @@ static const struct panel_desc_dsi osd10 .lanes = 4, }; @@ -459,7 +459,7 @@ Signed-off-by: Dave Stevenson static const struct of_device_id dsi_of_match[] = { { .compatible = "auo,b080uan01", -@@ -5357,20 +5433,137 @@ static const struct of_device_id dsi_of_ +@@ -5358,20 +5434,137 @@ static const struct of_device_id dsi_of_ .compatible = "osddisplays,osd101t2045-53ts", .data = &osd101t2045_53ts }, { diff --git a/target/linux/bcm27xx/patches-6.12/950-0277-mm-page_alloc-cma-introduce-a-customisable-threshold.patch b/target/linux/bcm27xx/patches-6.12/950-0277-mm-page_alloc-cma-introduce-a-customisable-threshold.patch index e568e2babd7..f9ef8c30671 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0277-mm-page_alloc-cma-introduce-a-customisable-threshold.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0277-mm-page_alloc-cma-introduce-a-customisable-threshold.patch @@ -48,7 +48,7 @@ Signed-off-by: David Plowman #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE unsigned int pageblock_order __read_mostly; #endif -@@ -2270,12 +2291,13 @@ __rmqueue(struct zone *zone, unsigned in +@@ -2269,12 +2290,13 @@ __rmqueue(struct zone *zone, unsigned in if (IS_ENABLED(CONFIG_CMA)) { /* * Balance movable allocations between regular and CMA areas by diff --git a/target/linux/bcm27xx/patches-6.12/950-0348-usb-dwc3-Set-DMA-and-coherent-masks-early.patch b/target/linux/bcm27xx/patches-6.12/950-0348-usb-dwc3-Set-DMA-and-coherent-masks-early.patch index 1a91ec97b22..e60f4e92326 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0348-usb-dwc3-Set-DMA-and-coherent-masks-early.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0348-usb-dwc3-Set-DMA-and-coherent-masks-early.patch @@ -341,7 +341,7 @@ Signed-off-by: Jonathan Bell * @hsphy_interface: "utmi" or "ulpi" * @connected: true when we're connected to a host, false otherwise * @softconnect: true when gadget connect is called, false when disconnect runs -@@ -1334,6 +1338,7 @@ struct dwc3 { +@@ -1337,6 +1341,7 @@ struct dwc3 { u8 tx_max_burst_prd; u8 tx_fifo_resize_max_num; u8 clear_stall_protocol; diff --git a/target/linux/bcm27xx/patches-6.12/950-0413-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch b/target/linux/bcm27xx/patches-6.12/950-0413-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch index a28f3aee5e4..80046cc1954 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0413-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0413-drivers-usb-dwc3-add-FS-LS-bus-instance-parkmode-dis.patch @@ -62,7 +62,7 @@ Signed-off-by: Jonathan Bell * @gfladj_refclk_lpm_sel: set if we need to enable SOF/ITP counter * running based on ref_clk * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk -@@ -1382,6 +1385,7 @@ struct dwc3 { +@@ -1385,6 +1388,7 @@ struct dwc3 { unsigned ulpi_ext_vbus_drv:1; unsigned parkmode_disable_ss_quirk:1; unsigned parkmode_disable_hs_quirk:1; diff --git a/target/linux/bcm27xx/patches-6.12/950-0524-usb-dwc3-core-add-support-for-setting-NAK-enhancemen.patch b/target/linux/bcm27xx/patches-6.12/950-0524-usb-dwc3-core-add-support-for-setting-NAK-enhancemen.patch index 279cf87a83f..666c391c4f6 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0524-usb-dwc3-core-add-support-for-setting-NAK-enhancemen.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0524-usb-dwc3-core-add-support-for-setting-NAK-enhancemen.patch @@ -66,7 +66,7 @@ Signed-off-by: Jonathan Bell * @parkmode_disable_ss_quirk: If set, disable park mode feature for all * Superspeed instances. * @parkmode_disable_hs_quirk: If set, disable park mode feature for all -@@ -1383,6 +1387,8 @@ struct dwc3 { +@@ -1386,6 +1390,8 @@ struct dwc3 { unsigned dis_tx_ipgap_linecheck_quirk:1; unsigned resume_hs_terminations:1; unsigned ulpi_ext_vbus_drv:1; diff --git a/target/linux/bcm27xx/patches-6.12/950-0933-staging-bcm2835-camera-Initialise-dev-in-v4l2_dev.patch b/target/linux/bcm27xx/patches-6.12/950-0933-staging-bcm2835-camera-Initialise-dev-in-v4l2_dev.patch index 2dbf357c0cf..5970cc9242b 100644 --- a/target/linux/bcm27xx/patches-6.12/950-0933-staging-bcm2835-camera-Initialise-dev-in-v4l2_dev.patch +++ b/target/linux/bcm27xx/patches-6.12/950-0933-staging-bcm2835-camera-Initialise-dev-in-v4l2_dev.patch @@ -19,11 +19,11 @@ Signed-off-by: Dave Stevenson --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c -@@ -1909,6 +1909,7 @@ static int bcm2835_mmal_probe(struct vch - __func__, ret); - goto free_dev; +@@ -1883,6 +1883,7 @@ static int bcm2835_mmal_probe(struct vch + ret = -ENOMEM; + goto cleanup_gdev; } + dev->v4l2_dev.dev = &device->dev; - /* setup v4l controls */ - ret = bcm2835_mmal_init_controls(dev, &dev->ctrl_handler); + /* v4l2 core mutex used to protect all fops and v4l2 ioctls. */ + mutex_init(&dev->mutex); diff --git a/target/linux/bcm27xx/patches-6.12/950-1002-drm-v3d-Add-job-to-pending-list-if-the-reset-was-ski.patch b/target/linux/bcm27xx/patches-6.12/950-1002-drm-v3d-Add-job-to-pending-list-if-the-reset-was-ski.patch deleted file mode 100644 index 4484b1e6a44..00000000000 --- a/target/linux/bcm27xx/patches-6.12/950-1002-drm-v3d-Add-job-to-pending-list-if-the-reset-was-ski.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 59a7f3aa7c3045b92bfde6fd342017053d2d304c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ma=C3=ADra=20Canal?= -Date: Sun, 27 Apr 2025 17:28:21 -0300 -Subject: [PATCH] drm/v3d: Add job to pending list if the reset was skipped -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When a CL/CSD job times out, we check if the GPU has made any progress -since the last timeout. If so, instead of resetting the hardware, we skip -the reset and let the timer get rearmed. This gives long-running jobs a -chance to complete. - -However, when `timedout_job()` is called, the job in question is removed -from the pending list, which means it won't be automatically freed through -`free_job()`. Consequently, when we skip the reset and keep the job -running, the job won't be freed when it finally completes. - -This situation leads to a memory leak, as exposed in [1]. - -Similarly to commit 704d3d60fec4 ("drm/etnaviv: don't block scheduler when -GPU is still active"), this patch ensures the job is put back on the -pending list when extending the timeout. - -Cc: stable@vger.kernel.org # 6.0 -Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12227 [1] -Reported-by: Daivik Bhatia -Signed-off-by: Maíra Canal ---- - drivers/gpu/drm/v3d/v3d_sched.c | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - ---- a/drivers/gpu/drm/v3d/v3d_sched.c -+++ b/drivers/gpu/drm/v3d/v3d_sched.c -@@ -744,11 +744,6 @@ v3d_gpu_reset_for_timeout(struct v3d_dev - return DRM_GPU_SCHED_STAT_NOMINAL; - } - --/* If the current address or return address have changed, then the GPU -- * has probably made progress and we should delay the reset. This -- * could fail if the GPU got in an infinite loop in the CL, but that -- * is pretty unlikely outside of an i-g-t testcase. -- */ - static enum drm_gpu_sched_stat - v3d_cl_job_timedout(struct drm_sched_job *sched_job, enum v3d_queue q, - u32 *timedout_ctca, u32 *timedout_ctra) -@@ -758,9 +753,16 @@ v3d_cl_job_timedout(struct drm_sched_job - u32 ctca = V3D_CORE_READ(0, V3D_CLE_CTNCA(q)); - u32 ctra = V3D_CORE_READ(0, V3D_CLE_CTNRA(q)); - -+ /* If the current address or return address have changed, then the GPU -+ * has probably made progress and we should delay the reset. This -+ * could fail if the GPU got in an infinite loop in the CL, but that -+ * is pretty unlikely outside of an i-g-t testcase. -+ */ - if (*timedout_ctca != ctca || *timedout_ctra != ctra) { - *timedout_ctca = ctca; - *timedout_ctra = ctra; -+ -+ list_add(&sched_job->list, &sched_job->sched->pending_list); - return DRM_GPU_SCHED_STAT_NOMINAL; - } - -@@ -800,11 +802,13 @@ v3d_csd_job_timedout(struct drm_sched_jo - struct v3d_dev *v3d = job->base.v3d; - u32 batches = V3D_CORE_READ(0, V3D_CSD_CURRENT_CFG4(v3d->ver)); - -- /* If we've made progress, skip reset and let the timer get -- * rearmed. -+ /* If we've made progress, skip reset, add the job to the pending -+ * list, and let the timer get rearmed. - */ - if (job->timedout_batches != batches) { - job->timedout_batches = batches; -+ -+ list_add(&sched_job->list, &sched_job->sched->pending_list); - return DRM_GPU_SCHED_STAT_NOMINAL; - } - -- 2.47.2