Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Christian Gmeiner
> > > > int etnaviv_sched_init(struct etnaviv_gpu *gpu) > > > { > > > - int ret; > > > + const struct drm_sched_init_args args = { > > > > Why not declare it as static const struct drm_sched_init_args args = { ? > > Because some bits in there are not static, in this particular case, >

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Boris Brezillon
On Tue, 28 Jan 2025 22:49:47 +0100 Christian Gmeiner wrote: > > int etnaviv_sched_init(struct etnaviv_gpu *gpu) > > { > > - int ret; > > + const struct drm_sched_init_args args = { > > Why not declare it as static const struct drm_sched_init_args args = { ? Because some bits in

Re: [PATCH v4 08/18] dt-bindings: reset: Add T-HEAD TH1520 SoC Reset Controller

2025-01-28 Thread Krzysztof Kozlowski
On Tue, Jan 28, 2025 at 08:48:06PM +0100, Michal Wilczynski wrote: > Add a YAML schema for the T-HEAD TH1520 SoC reset controller. This > controller manages resets for subsystems such as the GPU within the > TH1520 SoC. > > Signed-off-by: Michal Wilczynski > --- > .../bindings/reset/thead,th1520

Re: [PATCH v4 05/18] dt-bindings: power: Add TH1520 SoC power domains

2025-01-28 Thread Krzysztof Kozlowski
On Tue, Jan 28, 2025 at 08:48:03PM +0100, Michal Wilczynski wrote: > Add power domain ID's for the TH1520 SoC power domains. > > Signed-off-by: Michal Wilczynski > --- > MAINTAINERS | 1 + > .../dt-bindings/power/thead,th1520-power.h| 19 +++

Re: [PATCH v4 03/18] dt-bindings: firmware: thead,th1520: Add support for firmware node

2025-01-28 Thread Krzysztof Kozlowski
On Tue, Jan 28, 2025 at 08:48:01PM +0100, Michal Wilczynski wrote: > The kernel communicates with the E902 core through the mailbox > transport using AON firmware protocol. Add dt-bindings to document it > the dt node. > > Signed-off-by: Michal Wilczynski > --- > .../bindings/firmware/thead,th15

Re: [PATCH v4 01/18] dt-bindings: clock: thead: Add TH1520 VO clock controller

2025-01-28 Thread Krzysztof Kozlowski
On Tue, Jan 28, 2025 at 08:47:59PM +0100, Michal Wilczynski wrote: > Add device tree bindings for the TH1520 Video Output (VO) subsystem > clock controller. The VO sub-system manages clock gates for multimedia > components including HDMI, MIPI, and GPU. > > Document the VIDEO_PLL requirements for

Re: [RFC v3 04/18] firmware: thead: Add AON firmware protocol driver

2025-01-28 Thread Krzysztof Kozlowski
On 28/01/2025 16:54, Michal Wilczynski wrote: > > > On 1/21/25 10:56, Krzysztof Kozlowski wrote: > >>> diff --git a/include/linux/firmware/thead/thead,th1520-aon.h >>> b/include/linux/firmware/thead/thead,th1520-aon.h >>> new file mode 100644 >>> index ..3daa17c01d17 >>> --- /dev/nu

Re: [PATCH v10 2/4] drm/doc: Document device wedged event

2025-01-28 Thread Raag Jadav
On Tue, Jan 28, 2025 at 01:38:09PM +0200, Pekka Paalanen wrote: > On Tue, 28 Jan 2025 11:37:53 +0200 > Raag Jadav wrote: > > > On Mon, Jan 27, 2025 at 12:23:28PM +0200, Pekka Paalanen wrote: > > > On Wed, 22 Jan 2025 07:22:25 +0200 > > > Raag Jadav wrote: > > > > > > > On Tue, Jan 21, 2025 at

Re: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Carlos Maiolino
On Tue, Jan 28, 2025 at 06:21:54PM +, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is conve

Re: [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode

2025-01-28 Thread Ekansh Gupta
On 1/29/2025 5:00 AM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:39AM +0530, Ekansh Gupta wrote: >> DSP needs last 4 bits of context id to be 0 for polling mode to be >> supported as setting of last 8 is intended for async mode(not yet >> supported on upstream driver) and setting t

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-01-28 Thread Ekansh Gupta
On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh Gupta wrote: >> For any remote call to DSP, after sending an invocation message, >> fastRPC driver waits for glink response and during this time the >> CPU can go into low power modes. Adding a poll

Re: [PATCH 01/16] coccinelle: misc: secs_to_jiffies: Patch expressions too

2025-01-28 Thread Easwar Hariharan
On 1/28/2025 1:02 PM, Markus Elfring wrote: >> Teach the script to suggest conversions for timeout patterns where the >> arguments to msecs_to_jiffies() are expressions as well. > > I propose to take another look at implementation details for such a script > variant > according to the semantic pa

Re: [PATCH v2 2/5] misc: fastrpc: Introduce context params structure

2025-01-28 Thread Ekansh Gupta
On 1/27/2025 9:13 PM, Dmitry Baryshkov wrote: > On Mon, Jan 27, 2025 at 10:12:36AM +0530, Ekansh Gupta wrote: >> Add structure to invoke context parameterms. This structure is meant > Nit: for invoke context parameters. Ack. > >> to carry invoke context specific data. This structure is passed

[PATCH v5 04/14] drm/msm/dpu: Add CWB to msm_display_topology

2025-01-28 Thread Jessica Zhang
Currently, the topology is calculated based on the assumption that the user cannot request real-time and writeback simultaneously. For example, the number of LMs and CTLs are currently based off the number of phys encoders under the assumption there will be at least 1 LM/CTL per phys encoder. This

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Matthew Brost
On Tue, Jan 28, 2025 at 03:29:27PM +0100, Philipp Stanner wrote: > drm_sched_init() has a great many parameters and upcoming new > functionality for the scheduler might add even more. Generally, the > great number of parameters reduces readability and has already caused > one missnaming in: > > co

[PATCH v5 02/14] drm/msm/dpu: move resource allocation to CRTC

2025-01-28 Thread Jessica Zhang
From: Dmitry Baryshkov All resource allocation is centered around the LMs. Then other blocks (except DSCs) are allocated basing on the LMs that was selected, and LM powers up the CRTC rather than the encoder. Moreover if at some point the driver supports encoder cloning, allocating resources fro

[PATCH v5 12/14] drm/msm/dpu: Skip trigger flush and start for CWB

2025-01-28 Thread Jessica Zhang
For concurrent writeback, the real time encoder is responsible for trigger flush and trigger start. Return early for trigger start and trigger flush for the concurrent writeback encoders. Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/

[PATCH v5 07/14] drm/msm/dpu: Reserve resources for CWB

2025-01-28 Thread Jessica Zhang
Add support for RM to reserve dedicated CWB PINGPONGs and CWB muxes For concurrent writeback, even-indexed CWB muxes must be assigned to even-indexed LMs and odd-indexed CWB muxes for odd-indexed LMs. The same even/odd rule applies for dedicated CWB PINGPONGs. Track the CWB muxes in the global st

[PATCH v5 11/14] drm/msm/dpu: Start frame done timer after encoder kickoff

2025-01-28 Thread Jessica Zhang
Starting the frame done timer before the encoder is finished kicking off can lead to unnecessary frame done timeouts when the device is experiencing heavy load (ex. when debug logs are enabled). Thus, create a separate API for starting the encoder frame done timer and call it after the encoder kic

[PATCH v5 09/14] drm/msm/dpu: Support CWB in dpu_hw_ctl

2025-01-28 Thread Jessica Zhang
The CWB mux has a pending flush bit and *_active register. Add support for configuring them within the dpu_hw_ctl layer. Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 13 ++ .../gpu/drm/ms

[PATCH v5 00/14] drm/msm/dpu: Add Concurrent Writeback Support for DPU 10.x+

2025-01-28 Thread Jessica Zhang
DPU supports a single writeback session running concurrently with primary display when the CWB mux is configured properly. This series enables clone mode for DPU driver and adds support for programming the CWB mux in cases where the hardware has dedicated CWB pingpong blocks. Currently, the CWB har

[PATCH v5 03/14] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-01-28 Thread Jessica Zhang
From: Dmitry Baryshkov Up to now the driver has been using encoder to allocate hardware resources. Switch it to use CRTC id in preparation for the next step. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- Changes in v

[PATCH v5 05/14] drm/msm/dpu: Require modeset if clone mode status changes

2025-01-28 Thread Jessica Zhang
If the clone mode enabled status is changing, a modeset needs to happen so that the resources can be reassigned Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 17 - drivers/gpu/drm/msm/disp/dp

[PATCH v5 14/14] drm/msm/dpu: Set possible clones for all encoders

2025-01-28 Thread Jessica Zhang
Set writeback encoders as possible clones for DSI encoders and vice versa. Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 32 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 2

[PATCH v5 10/14] drm/msm/dpu: Adjust writeback phys encoder setup for CWB

2025-01-28 Thread Jessica Zhang
Adjust QoS remapper, OT limit, and CDP parameters to account for concurrent writeback Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-)

[PATCH v5 06/14] drm/msm/dpu: Fail atomic_check if multiple outputs request CDM block

2025-01-28 Thread Jessica Zhang
Currently, our hardware only supports a single output using CDM block at most. Because of this, we cannot support cases where both writeback and DP output request CDM simultaneously To avoid this happening when CWB is enabled, change msm_display_topoloy.needs_cdm into a cdm_requested counter to tr

[PATCH v5 01/14] drm/msm/dpu: fill CRTC resources in dpu_crtc.c

2025-01-28 Thread Jessica Zhang
From: Dmitry Baryshkov Stop poking into CRTC state from dpu_encoder.c, fill CRTC HW resources from dpu_crtc_assign_resources(). Signed-off-by: Dmitry Baryshkov [quic_abhin...@quicinc.com: cleaned up formatting] Signed-off-by: Abhinav Kumar Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Barysh

[PATCH v5 13/14] drm/msm/dpu: Reorder encoder kickoff for CWB

2025-01-28 Thread Jessica Zhang
Add a helper that will handle the correct order of the encoder kickoffs for concurrent writeback. For concurrent writeback, the realtime encoder must always kickoff last as it will call the trigger flush and start. This avoids the following scenario where the writeback encoder increments the pend

[PATCH v5 08/14] drm/msm/dpu: Configure CWB in writeback encoder

2025-01-28 Thread Jessica Zhang
Cache the CWB block mask in the DPU virtual encoder and configure CWB according to the CWB block mask within the writeback phys encoder Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 75

Re: [PATCH v4 12/18] dt-bindings: gpu: Add support for T-HEAD TH1520 GPU

2025-01-28 Thread Rob Herring (Arm)
On Tue, 28 Jan 2025 20:48:10 +0100, Michal Wilczynski wrote: > Add bindings for the PowerVR BXM-4-64 GPU integrated in the T-HEAD > TH1520 SoC. This GPU requires two clocks. > > Document the integration details including clock, reset, power domain > and interrupt assignments. Add a dt-bindings

Re: [PATCH 08/16] libata: zpodd: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Damien Le Moal
On 1/29/25 3:21 AM, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is converted using scripts/coc

Re: [PATCH 00/16] Converge on using secs_to_jiffies() part two

2025-01-28 Thread Andrew Morton
On Tue, 28 Jan 2025 18:21:45 + Easwar Hariharan wrote: > This is the second series (part 1*) that converts users of msecs_to_jiffies() > that > either use the multiply pattern of either of: > - msecs_to_jiffies(N*1000) or > - msecs_to_jiffies(N*MSEC_PER_SEC) > > where N is a constant or an

Re: [PATCH 01/14] drm/aspeed: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Andrew Jeffery
On Tue, 2025-01-28 at 17:29 -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ > -struct

Re: [PATCH v3 09/10] drm/bridge: allow limiting I2S formats

2025-01-28 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 05:11:16PM +0100, Maxime Ripard wrote: > On Sun, Jan 26, 2025 at 03:29:14PM +0200, Dmitry Baryshkov wrote: > > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h > > index > > b55e80a57758e8b652eac0cd01cb245a04e221f5..d16af5fe90cb48f6671e798d9dee61a359c9233f >

Re: [PATCH v3 08/10] drm/display: bridge-connector: handle CEC adapters

2025-01-28 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 05:14:06PM +0100, Maxime Ripard wrote: > On Sun, Jan 26, 2025 at 03:29:13PM +0200, Dmitry Baryshkov wrote: > > /* > > - > > * Bridge Connector Initialisation > > */ > > @@ -633,6 +711,21 @@ str

Re: [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode

2025-01-28 Thread Dmitry Baryshkov
On Mon, Jan 27, 2025 at 10:12:39AM +0530, Ekansh Gupta wrote: > DSP needs last 4 bits of context id to be 0 for polling mode to be > supported as setting of last 8 is intended for async mode(not yet > supported on upstream driver) and setting these bits restrics > writing to poll memory from DSP. M

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-01-28 Thread Dmitry Baryshkov
On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh Gupta wrote: > For any remote call to DSP, after sending an invocation message, > fastRPC driver waits for glink response and during this time the > CPU can go into low power modes. Adding a polling mode support > with which fastRPC driver will poll

Re: [PATCH] drm/msm/dp: account for widebus and yuv420 during mode validation

2025-01-28 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 03:10:27PM -0800, Abhinav Kumar wrote: > Widebus allows the DP controller to operate in 2 pixel per clock mode. > The mode validation logic validates the mode->clock against the max > DP pixel clock. However the max DP pixel clock limit assumes widebus > is already enabled.

[PATCH] drm/msm/dp: account for widebus and yuv420 during mode validation

2025-01-28 Thread Abhinav Kumar
Widebus allows the DP controller to operate in 2 pixel per clock mode. The mode validation logic validates the mode->clock against the max DP pixel clock. However the max DP pixel clock limit assumes widebus is already enabled. Adjust the mode validation logic to only compare the adjusted pixel clo

[PATCH 14/14] Documentation: Update the todo

2025-01-28 Thread Anusha Srivatsa
Remove the TODO now that this series addresses the changes needed. Cc: Thomas Zimmermann Signed-off-by: Anusha Srivatsa --- Documentation/gpu/todo.rst | 15 --- 1 file changed, 15 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 256d0d1cb2164

[PATCH 13/14] drm/vc4: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource_byname + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: //rule s/(devm_)platform_get_resource_byname + //(devm_)ioremap/devm_platform_ioremap_resource. @rule_3@ identifier res; expression ioremap; identi

[PATCH 11/14] drm/tegra: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 10/14] drm/stm: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 12/14] drm/tiny: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 09/14] drm/sti: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource/_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byna

[PATCH 08/14] drm/sprd: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_2@ identifier res; expression ioremap; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); <... -if (!res) { -... -} ...>

[PATCH 07/14] drm/rockchip: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 06/14] drm/mxsfb: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 05/14] drm/meson: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_3@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byna

[PATCH 04/14] drm/mediatek: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 03/14] drm/hisilicon: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 02/14] drm/fsl-dcu: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 01/14] drm/aspeed: move to devm_platform_ioremap_resource() usage

2025-01-28 Thread Anusha Srivatsa
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = dev

[PATCH 00/14] drm: Move to using devm_platform_ioremap_resource

2025-01-28 Thread Anusha Srivatsa
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 9 ++--- 30 files changed, 30 insertions(+), 164 deletions(-) --- base-commit: c4b9570cfb63501638db720f3bee9f6dfd044b82 change-id: 20250128-cocci-memory-api-266e13a057e7 Best regards, -- Anusha Srivatsa

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Christian Gmeiner
> > drm_sched_init() has a great many parameters and upcoming new > functionality for the scheduler might add even more. Generally, the > great number of parameters reduces readability and has already caused > one missnaming in: > > commit 6f1cacf4eba7 ("drm/nouveau: Improve variable name in > nou

Re: [PATCH v3 05/10] drm/display: bridge-connector: hook in CEC notifier support

2025-01-28 Thread Dmitry Baryshkov
On Tue, 28 Jan 2025 at 18:15, Maxime Ripard wrote: > > On Sun, Jan 26, 2025 at 03:29:10PM +0200, Dmitry Baryshkov wrote: > > Allow HDMI DRM bridges to create CEC notifier. Physical address is > > handled automatically by drm_atomic_helper_connector_hdmi_hotplug() > > being called from .detect() pa

Re: [PATCH 01/16] coccinelle: misc: secs_to_jiffies: Patch expressions too

2025-01-28 Thread Markus Elfring
> Teach the script to suggest conversions for timeout patterns where the > arguments to msecs_to_jiffies() are expressions as well. I propose to take another look at implementation details for such a script variant according to the semantic patch language. … > +++ b/scripts/coccinelle/misc/secs

Re: [PATCH v6 5/6] drm/xe/xe_hw_engine: Update hw_engine_snapshot_capture for debugfs

2025-01-28 Thread kernel test robot
Hi Alan, kernel test robot noticed the following build warnings: [auto build test WARNING on 8b47c9cdb6a78364fe68f8af0abfd6f265577001] url: https://github.com/intel-lab-lkp/linux/commits/Alan-Previn/drm-xe-guc-Rename-__guc_capture_parsed_output/20250129-023915 base: 8b47c9cdb6a78364fe68f8a

Re: [PATCH v4 0/1] Maintenence of devcoredump <-> GuC-Err-Capture plumbing

2025-01-28 Thread Teres Alexis, Alan Previn
Update: new URL with next rev that includes the split -> https://patchwork.freedesktop.org/series/144050/ basically the same squash but i decided to drop some trivial things like comments and name of function/variables. ...alan On Thu, 2025-01-23 at 18:01 +, Teres Alexis, Alan Previn wrote

Re: [Question] Are "device exclusive non-swap entries" / "SVM atomics in Nouveau" still getting used in practice?

2025-01-28 Thread David Hildenbrand
On 28.01.25 21:14, Simona Vetter wrote: On Tue, Jan 28, 2025 at 11:09:24AM +1100, Alistair Popple wrote: On Fri, Jan 24, 2025 at 06:54:02PM +0100, David Hildenbrand wrote: On integrated the gpu is tied into the coherency fabric, so there it's not needed. I think the more fundamental question w

Re: [Question] Are "device exclusive non-swap entries" / "SVM atomics in Nouveau" still getting used in practice?

2025-01-28 Thread Simona Vetter
On Tue, Jan 28, 2025 at 11:09:24AM +1100, Alistair Popple wrote: > On Fri, Jan 24, 2025 at 06:54:02PM +0100, David Hildenbrand wrote: > > > > > On integrated the gpu is tied into the coherency > > > > > fabric, so there it's not needed. > > > > > > > > > > I think the more fundamental question wit

[PATCH v4 17/18] riscv: dts: thead: Introduce reset controller node

2025-01-28 Thread Michal Wilczynski
T-HEAD TH1520 SoC requires to put the GPU out of the reset state as part of the power-up sequence. Signed-off-by: Michal Wilczynski --- arch/riscv/boot/dts/thead/th1520.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/th

[PATCH v4 18/18] riscv: dts: thead: Add GPU node to TH1520 device tree

2025-01-28 Thread Michal Wilczynski
Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD TH1520 SoC used by the Lichee Pi 4A board. This node enables support for the GPU using the drm/imagination driver. By adding this node, the kernel can recognize and initialize the GPU, providing graphics acceleration capabilitie

[PATCH v4 09/18] reset: thead: Add TH1520 reset controller driver

2025-01-28 Thread Michal Wilczynski
Add reset controller driver for the T-HEAD TH1520 SoC that manages hardware reset lines for various subsystems. The driver currently implements support for GPU reset control, with infrastructure in place to extend support for NPU and Watchdog Timer resets in future updates. Signed-off-by: Michal W

[PATCH v4 13/18] drm/imagination: Add support for IMG BXM-4-64 GPU

2025-01-28 Thread Michal Wilczynski
The IMG BXM-4-64 GPU is integrated into the T-Head TH1520 SoC. This commit adds the compatible string "img,img-bxm" to the device tree match table in the drm/imagination driver, enabling support for this GPU. By including this GPU in the compatible devices list, the driver can initialize and manag

[PATCH v4 16/18] riscv: dts: thead: Introduce power domain nodes with aon firmware

2025-01-28 Thread Michal Wilczynski
The DRM Imagination GPU requires a power-domain driver. In the T-HEAD TH1520 SoC implements power management capabilities through the E902 core, which can be communicated with through the mailbox, using firmware protocol. Add AON node, which servers as a power-domain controller. Signed-off-by: Mi

[PATCH v4 15/18] riscv: dts: thead: Add device tree VO clock controller

2025-01-28 Thread Michal Wilczynski
VO clocks reside in a different address space from the AP clocks on the T-HEAD SoC. Add the device tree node of a clock-controller to handle VO address space as well. Signed-off-by: Michal Wilczynski --- arch/riscv/boot/dts/thead/th1520.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --g

[PATCH v4 06/18] pmdomain: thead: Add power-domain driver for TH1520

2025-01-28 Thread Michal Wilczynski
The T-Head TH1520 SoC contains multiple power islands that can be programmatically turned on and off using the AON (Always-On) protocol and a hardware mailbox [1]. The relevant mailbox driver has already been merged into the mainline kernel in commit 5d4d263e1c6b ("mailbox: Introduce support for T-

[PATCH v4 05/18] dt-bindings: power: Add TH1520 SoC power domains

2025-01-28 Thread Michal Wilczynski
Add power domain ID's for the TH1520 SoC power domains. Signed-off-by: Michal Wilczynski --- MAINTAINERS | 1 + .../dt-bindings/power/thead,th1520-power.h| 19 +++ 2 files changed, 20 insertions(+) create mode 100644 include/dt-bindings/pow

[PATCH v4 14/18] drm/imagination: Enable PowerVR driver for RISC-V

2025-01-28 Thread Michal Wilczynski
Several RISC-V boards feature Imagination GPUs that are compatible with the PowerVR driver. An example is the IMG BXM-4-64 GPU on the Lichee Pi 4A board. This commit adjusts the driver's Kconfig dependencies to allow the PowerVR driver to be compiled on the RISC-V architecture. By enabling compila

[PATCH v4 10/18] drm/imagination: Add reset controller support for GPU initialization

2025-01-28 Thread Michal Wilczynski
Certain platforms, such as the T-Head TH1520 and Banana Pi BPI-F3, require a controlled GPU reset sequence during the power-up procedure to ensure proper initialization. Without this reset, the GPU may remain in an undefined state, potentially leading to stability or performance issues. This commi

[PATCH v4 11/18] dt-bindings: gpu: Add 'resets' property for GPU initialization

2025-01-28 Thread Michal Wilczynski
Many RISC-V boards featuring Imagination Technologies GPUs require a reset line to be de-asserted as part of the GPU power-up sequence. To support this, add a 'resets' property to the GPU device tree bindings. This ensures the GPU can be properly initialized on these platforms. Reviewed-by: Krzysz

[PATCH v4 12/18] dt-bindings: gpu: Add support for T-HEAD TH1520 GPU

2025-01-28 Thread Michal Wilczynski
Add bindings for the PowerVR BXM-4-64 GPU integrated in the T-HEAD TH1520 SoC. This GPU requires two clocks. Document the integration details including clock, reset, power domain and interrupt assignments. Add a dt-bindings example showing the proper usage of the compatible string "thead,th1520-g

[PATCH v4 04/18] firmware: thead: Add AON firmware protocol driver

2025-01-28 Thread Michal Wilczynski
The T-Head TH1520 SoC uses an E902 co-processor running Always-On (AON) firmware to manage power, clock, and other system resources [1]. This patch introduces a driver implementing the AON firmware protocol, allowing the Linux kernel to communicate with the firmware via mailbox channels. Through a

[PATCH v4 00/18] Enable drm/imagination BXM-4-64 Support for LicheePi 4A

2025-01-28 Thread Michal Wilczynski
The LicheePi 4A board, featuring the T-HEAD TH1520 SoC, includes an Imagination Technologies BXM-4-64 GPU. Initial support for this GPU was provided through a downstream driver [1]. Recently, efforts have been made to upstream support for the Rogue family GPUs, which the BXM-4-64 is part of [2]. W

[PATCH v4 07/18] riscv: Enable PM_GENERIC_DOMAINS for T-Head SoCs

2025-01-28 Thread Michal Wilczynski
T-Head SoCs feature separate power domains (power islands) for major components like the GPU, Audio, and NPU. To manage the power states of these components effectively, the kernel requires generic power domain support. This commit enables `CONFIG_PM_GENERIC_DOMAINS` for T-Head SoCs, allowing the

[PATCH v4 08/18] dt-bindings: reset: Add T-HEAD TH1520 SoC Reset Controller

2025-01-28 Thread Michal Wilczynski
Add a YAML schema for the T-HEAD TH1520 SoC reset controller. This controller manages resets for subsystems such as the GPU within the TH1520 SoC. Signed-off-by: Michal Wilczynski --- .../bindings/reset/thead,th1520-reset.yaml| 44 +++ MAINTAINERS

[PATCH v4 01/18] dt-bindings: clock: thead: Add TH1520 VO clock controller

2025-01-28 Thread Michal Wilczynski
Add device tree bindings for the TH1520 Video Output (VO) subsystem clock controller. The VO sub-system manages clock gates for multimedia components including HDMI, MIPI, and GPU. Document the VIDEO_PLL requirements for the VO clock controller, which receives its input from the AP clock controlle

[PATCH v4 03/18] dt-bindings: firmware: thead,th1520: Add support for firmware node

2025-01-28 Thread Michal Wilczynski
The kernel communicates with the E902 core through the mailbox transport using AON firmware protocol. Add dt-bindings to document it the dt node. Signed-off-by: Michal Wilczynski --- .../bindings/firmware/thead,th1520-aon.yaml | 53 +++ MAINTAINERS

[PATCH v4 02/18] clk: thead: Add clock support for VO subsystem in T-Head TH1520 SoC

2025-01-28 Thread Michal Wilczynski
The T-Head TH1520 SoC integrates a variety of clocks for its subsystems, including the Application Processor (AP) and the Video Output (VO) [1]. Up until now, the T-Head clock driver only supported AP clocks. This commit extends the driver to provide clock functionality for the VO subsystem. At th

Re: [PATCH v3 03/30] mm/migrate: Trylock device page in do_swap_page

2025-01-28 Thread Matthew Brost
On Tue, Jan 28, 2025 at 06:26:29PM +0100, Thomas Hellström wrote: > On Tue, 2024-12-17 at 15:33 -0800, Matthew Brost wrote: > > Avoid multiple CPU page faults to the same device page racing by > > trying > > to lock the page in do_swap_page before taking an extra reference to > > the > > page. This

Re: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Darrick J. Wong
On Tue, Jan 28, 2025 at 06:21:54PM +, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is conve

Re: [PATCH 05/16] btrfs: convert timeouts to secs_to_jiffies()

2025-01-28 Thread David Sterba
On Tue, Jan 28, 2025 at 06:21:50PM +, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is conve

[PATCH v6 2/6] drm/xe/guc: Don't store capture nodes in xe_devcoredump_snapshot

2025-01-28 Thread Alan Previn
GuC-Err-Capture should not be storing register snapshot nodes directly inside of the top level xe_devcoredump_snapshot structure that it doesn't control. Furthermore, that is is not right from a driver subsystem layering perspective. Instead, when a matching GuC-Err-Capture register snapshot is av

[PATCH 05/16] btrfs: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH v6 4/6] drm/xe/guc: Move xe_hw_engine_snapshot creation back to xe_hw_engine.c

2025-01-28 Thread Alan Previn
xe_devcoredump calls xe_engine_snapshot_capture_for_queue() to allocate and populate the xe_hw_engine_snapshot structure. Move that function back into xe_hw_engine.c since it doesn't make sense for GuC-Err-Capture to allocate a structure it doesn't own. Signed-off-by: Alan Previn --- drivers/gpu

[PATCH v6 1/6] drm/xe/guc: Rename __guc_capture_parsed_output

2025-01-28 Thread Alan Previn
Since '__guc_capture_parsed_output *' is a handle that is retrieved, stored and relinquished by an entity external to GuC (i.e. xe_devcoredump), lets rename it to something formal without the'__' prefix and export it via give a header file. Signed-off-by: Alan Previn --- drivers/gpu/drm/xe/xe_de

[PATCH v6 6/6] drm/xe/guc: Update comments on GuC-Err-Capture flows

2025-01-28 Thread Alan Previn
Update the comments on GuC-Err-Capture flows with the updated function names. Signed-off-by: Alan Previn --- drivers/gpu/drm/xe/xe_guc_capture.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_g

[PATCH v6 0/6] Maintenence of devcoredump <-> GuC-Err-Capture plumbing

2025-01-28 Thread Alan Previn
The GuC-Error-Capture is currently reaching into xe_devcoredump structure to store its own place-holder snaphot-ptr to workaround the race between G2H-Error-Capture-Notification vs Drm-Scheduler triggering GuC-Submission-exec-queue-timeout/kill. >From a subsystem layering perspective, this isn't s

[PATCH v6 5/6] drm/xe/xe_hw_engine: Update hw_engine_snapshot_capture for debugfs

2025-01-28 Thread Alan Previn
xe_hw_engine_print is called by debugfs to do an immediate raw dump of the engine registers. It depends on hw_engine_snapshot_capture that assumes a prior capture with a matching job is ready for printing. However, for the debugfs case, there is no prior job so ensure hw_engine_snapshot_capture can

[PATCH v6 3/6] drm/xe/guc: Split engine state print between xe_hw_engine vs xe_guc_capture

2025-01-28 Thread Alan Previn
Relocate the xe_engine_snapshot_print function from xe_guc_capture.c into xe_hw_engine.c but split out the GuC-Err-Capture register printing portion out into a separate helper inside xe_guc_capture.c so that we can have a clear separation between printing the general engine info vs GuC-Err-Capture

[PATCH 11/16] nvme: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 10/16] power: supply: da9030: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

Re: [PATCH 11/16] nvme: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Keith Busch
On Tue, Jan 28, 2025 at 06:21:56PM +, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is conve

[PATCH 06/16] rbd: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 03/16] accel/habanalabs: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 16/16] RDMA/bnxt_re: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 02/16] scsi: lpfc: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 15/16] platform/x86: thinkpad_acpi: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

[PATCH 12/16] spi: spi-fsl-lpspi: convert timeouts to secs_to_jiffies()

2025-01-28 Thread Easwar Hariharan
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following

  1   2   3   >