lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c108019b-866f-4e20-a069-5774d6ff032e@ideasonboard.com>
Date: Tue, 23 Apr 2024 15:18:40 +0300
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Sean Anderson <sean.anderson@...ux.dev>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 dri-devel@...ts.freedesktop.org
Cc: David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
 linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 Michal Simek <michal.simek@....com>
Subject: Re: [PATCH v3 06/13] drm: zynqmp_dp: Don't delay work

On 22/04/2024 21:45, Sean Anderson wrote:
> We always call scheduled_delayed_work with no delay, so just use a
> non-delayed work_struct instead.
> 
> Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>
> ---

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>

  Tomi

> 
> Changes in v3:
> - New
> 
>   drivers/gpu/drm/xlnx/zynqmp_dp.c | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index f1834c8e3c02..59fed00a8f89 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -297,7 +297,7 @@ struct zynqmp_dp_config {
>   struct zynqmp_dp {
>   	struct drm_dp_aux aux;
>   	struct drm_bridge bridge;
> -	struct delayed_work hpd_work;
> +	struct work_struct hpd_work;
>   
>   	struct drm_bridge *next_bridge;
>   	struct device *dev;
> @@ -1467,7 +1467,7 @@ static void zynqmp_dp_bridge_atomic_disable(struct drm_bridge *bridge,
>   	struct zynqmp_dp *dp = bridge_to_dp(bridge);
>   
>   	dp->enabled = false;
> -	cancel_delayed_work(&dp->hpd_work);
> +	cancel_work(&dp->hpd_work);
>   	zynqmp_dp_write(dp, ZYNQMP_DP_MAIN_STREAM_ENABLE, 0);
>   	drm_dp_dpcd_writeb(&dp->aux, DP_SET_POWER, DP_SET_POWER_D3);
>   	zynqmp_dp_write(dp, ZYNQMP_DP_TX_PHY_POWER_DOWN,
> @@ -1603,8 +1603,7 @@ void zynqmp_dp_disable_vblank(struct zynqmp_dp *dp)
>   
>   static void zynqmp_dp_hpd_work_func(struct work_struct *work)
>   {
> -	struct zynqmp_dp *dp = container_of(work, struct zynqmp_dp,
> -					    hpd_work.work);
> +	struct zynqmp_dp *dp = container_of(work, struct zynqmp_dp, hpd_work);
>   	enum drm_connector_status status;
>   
>   	status = zynqmp_dp_bridge_detect(&dp->bridge);
> @@ -1633,7 +1632,7 @@ static irqreturn_t zynqmp_dp_irq_handler(int irq, void *data)
>   		zynqmp_dpsub_drm_handle_vblank(dp->dpsub);
>   
>   	if (status & ZYNQMP_DP_INT_HPD_EVENT)
> -		schedule_delayed_work(&dp->hpd_work, 0);
> +		schedule_work(&dp->hpd_work);
>   
>   	if (status & ZYNQMP_DP_INT_HPD_IRQ) {
>   		int ret;
> @@ -1675,7 +1674,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
>   	dp->dpsub = dpsub;
>   	dp->status = connector_status_disconnected;
>   
> -	INIT_DELAYED_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
> +	INIT_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
>   
>   	/* Acquire all resources (IOMEM, IRQ and PHYs). */
>   	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dp");
> @@ -1775,7 +1774,7 @@ void zynqmp_dp_remove(struct zynqmp_dpsub *dpsub)
>   	zynqmp_dp_write(dp, ZYNQMP_DP_INT_DS, ZYNQMP_DP_INT_ALL);
>   	disable_irq(dp->irq);
>   
> -	cancel_delayed_work_sync(&dp->hpd_work);
> +	cancel_work_sync(&dp->hpd_work);
>   
>   	zynqmp_dp_write(dp, ZYNQMP_DP_TRANSMITTER_ENABLE, 0);
>   	zynqmp_dp_write(dp, ZYNQMP_DP_INT_DS, 0xffffffff);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ