Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp38875lqh; Fri, 3 May 2024 12:36:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX677r/aSmu0oY0CjrZW3MfV+o57ZnMFw/5bS5rPxm1vw3sZgjlVWCusslOxkn9RxX1etQZ0KZBNYKAW9W/oEDybDslN42r+WhUsgXTeQ== X-Google-Smtp-Source: AGHT+IHYfsjZrXM0SFMYWTM5w8Z+9a0jcAZ6cmN4VHPC2n0E7aiXk74BfGNwXh6DtbykkZdTCGLY X-Received: by 2002:a05:6a20:4328:b0:1af:6a37:3b8a with SMTP id h40-20020a056a20432800b001af6a373b8amr4627662pzk.16.1714764986341; Fri, 03 May 2024 12:36:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714764986; cv=pass; d=google.com; s=arc-20160816; b=V3o6P9f3rrwO7E31SIJKUSoy0bLNtmM4b/mUK0vPwC/ZxySd9hQkhTrnSyPeROMPKr CH9h+cNSFBS8ELH0L2GHB5G+tv0ZlpQ3+Id8GuWCSrf2hJVN9wMUBnS2UvBXWVxtI4cl FFRBUUybDz4HxI/HpthwZccApg1FIPfjEXWt2XDCrf9y7Q3JD8Nm18kggPhjxMyUzM6b n2/4YhDskfX8uQ4oDjoyhnSismuwSoD3U1upJ8pKOn9EC2hN5D1+swPhNZztrlrgAwLK lUz/HziSkAqUyLBExvsQBCbbeqROBV3LX1H9wYi7+vi9yT8M6CIuVoF13fmgmr8QX20F OppA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lY0dS1dQWmU5ByfM7oUy9R/EqObXbNIdMhGhis7Pbh4=; fh=UFCKTC8uN4d0DvFpkldKNWLnw7DD8sRfx4y8gXtNsgA=; b=nXi1VmlPPFBqnI3y7TH9vINrFqwx0ThPPuVKNBdYqpKuqsYjUHA3HgbzFFts1fdXJq F/FhFgvIMos/HzeLlGyrmx0PcOe7VPzyD+ekslCtR0TNoC0gXYrxEs0SiVy+qKZ2wbkH U6goANlgJ7goSJ4H0bDYfY7HFQOTYCOVX4U/GPr6Xkc+Q4jOpNTv0YhFBl/sW/51flWq Yx3ZMb817n6wUsKdKj9MsGdCcCwF5eTa4JxAlwZcgZ7vfV62TIWYsB5eylJZGLV886rZ LWKpjQTNT48nRoJUEaqdgDD4V6NzoWOAsDjh+oMQS2gomGA7HYEKy6T0maeSAT1qU0w3 S8Jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CjRpE+HV; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-168125-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168125-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u13-20020a65670d000000b0061c32da2953si2188971pgf.557.2024.05.03.12.36.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:36:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168125-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CjRpE+HV; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-168125-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168125-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DCBA9B246A1 for ; Fri, 3 May 2024 19:30:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09B8D158DC8; Fri, 3 May 2024 19:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CjRpE+HV" Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E8E6158D9E for ; Fri, 3 May 2024 19:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764579; cv=none; b=MDmTlXviHVtZ7w8cVKn9OEGS4uAXOgNlVYMxVqSpUW1kH0RU5yUx2wwpvjJEN17mw3dCItfkpYKcaFLWwK5lFk5MPym21mjyuxN32+vBxIniZC2oWJyzcEEARQfMD2cc8LTLgVg3poLy9OmBEnACj4eN+K+KjXC7v7sU9QmzYaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764579; c=relaxed/simple; bh=PLen0t4lPNPVJdv3n/uRm7OsjE0H9FjfjZdimOaVjDA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EAgiDNgU6pvudY26TqOgRmqDcyeFZbhfeF+GLlO2BZ+vA3DIpPYC2617MrsL0MCRkZDaq56DKvmFyoOyp+bS+0Ud+z+0UbguQuRPSK9CGshDIbCgR2rxFixIDfzcWcu2ybhtFyrqHRWspSGDvWJQINo6rgwdS1b0tE/vwH8TlJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CjRpE+HV; arc=none smtp.client-ip=95.215.58.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714764575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lY0dS1dQWmU5ByfM7oUy9R/EqObXbNIdMhGhis7Pbh4=; b=CjRpE+HVJPfp20haZ74fqVaOKqvUaSIUdwegTHaZ8aDutuiBV8xfdv2srHqcCzIeMJnCRK 66l1wbxw1/fCN7uZVpy6PnAc4+ZR2aKEdh/55DhNIesz1+UwTLieENjXA9YdTypPK/m3NW azzWMPRVDY8YrwR2pcYlQScuQr7DYK8= From: Sean Anderson To: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, David Airlie , linux-kernel@vger.kernel.org, Daniel Vetter , Tomi Valkeinen , Michal Simek , Sean Anderson Subject: [PATCH v5 03/10] drm: zynqmp_dp: Don't delay work Date: Fri, 3 May 2024 15:29:15 -0400 Message-Id: <20240503192922.2172314-4-sean.anderson@linux.dev> In-Reply-To: <20240503192922.2172314-1-sean.anderson@linux.dev> References: <20240503192922.2172314-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT We always call scheduled_delayed_work with no delay, so just use a non-delayed work_struct instead. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen --- (no changes since v3) 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 12a8248ed125..129beac4c073 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -298,7 +298,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; @@ -1482,7 +1482,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, @@ -1648,8 +1648,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); @@ -1685,7 +1684,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; @@ -1727,7 +1726,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"); @@ -1832,7 +1831,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); -- 2.35.1.1320.gc452695387.dirty