From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAF75CD4F5B for ; Fri, 22 May 2026 05:04:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE29310F4B2; Fri, 22 May 2026 05:04:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="M9/zz44s"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBEFE10F4B6; Fri, 22 May 2026 05:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779426246; x=1810962246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qwOf7ZjszM5GyykvZC2rN1Z6vl98EqGIg56vQDgEr2Y=; b=M9/zz44sHctNt8AegOKGsJ19+0Vi+48dfYDkkw/+16LFGJzaAzDR9GXW CGCF1MGnYHaw/SF33S9L91nD1kiX4tz8Lrv9zPntFOBG4H4V4EsXPJfc+ jAmUpevmoT7UAtJMLkg3qOs1KK9s43eCSEKRUiqbCafIKAxcXhwD25LGm TvR4ic3g0XkRjQQeuqLEu1aCeE+tFFmGvf9cCypR415IlZIS9HXQY/0M9 BcLFjjIIIHdvJvvBQzvJSNykXR1D0UB3FXmbaKXQn+snOXcqv3BDc077V WzYuM1Pd8KP97NVYQxr5+mg+3yv5wVN0AghfziZ337QF9A0e0hPxFwqgh A==; X-CSE-ConnectionGUID: /9WMBCMRTau+3AoLyOPdkQ== X-CSE-MsgGUID: sQYjKFWvTT2tcsbtrwPu1w== X-IronPort-AV: E=McAfee;i="6800,10657,11793"; a="90651760" X-IronPort-AV: E=Sophos;i="6.24,161,1774335600"; d="scan'208";a="90651760" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2026 22:04:06 -0700 X-CSE-ConnectionGUID: fMFLdNFlSkKANiMKSD1tmg== X-CSE-MsgGUID: 1pB1XaqcQE2eWKkGcnAdgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,161,1774335600"; d="scan'208";a="239946379" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa010.jf.intel.com with ESMTP; 21 May 2026 22:04:00 -0700 From: Suraj Kandpal To: freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel-list@raspberrypi.com, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: uma.shankar@intel.com, arun.r.murthy@intel.com, abhinav.kumar@linux.dev, tzimmermann@suse.de, sean@poorly.ru, marijn.suijten@somainline.org, laurent.pinchart+renesas@ideasonboard.com, dave.stevenson@raspberrypi.com, tomi.valkeinen+renesas@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, louis.chauvet@bootlin.com, kernel-dev@igalia.com, John.Harrison@Igalia.com, Suraj Kandpal Subject: [PATCH v5 5/7] drm: writeback: Modify drm_writeback_get_out_fence helper Date: Fri, 22 May 2026 10:33:11 +0530 Message-Id: <20260522050313.1800378-6-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260522050313.1800378-1-suraj.kandpal@intel.com> References: <20260522050313.1800378-1-suraj.kandpal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_writeback_get_out_fence() does not itself need the parent drm_connector object, but update it to take drm_connector for consistency across the writeback interface, which is being moved to use the top level drm_connector and traverse down to drm_writeback_connector rather than passing in the lower level object and traversing back up. Signed-off-by: Suraj Kandpal Reviewed-by: John Harrison --- v3 -> v4: - Update subject line for consitency (John) - Update commit message across commits for consitency (John) drivers/gpu/drm/drm_atomic_uapi.c | 4 +--- drivers/gpu/drm/drm_writeback.c | 4 ++-- include/drm/drm_writeback.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 7add982e3a3f..65845b096b0c 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1450,7 +1450,6 @@ static int prepare_signaling(struct drm_device *dev, } for_each_new_connector_in_state(state, conn, conn_state, i) { - struct drm_writeback_connector *wb_conn; struct drm_out_fence_state *f; struct dma_fence *fence; s32 __user *fence_ptr; @@ -1472,8 +1471,7 @@ static int prepare_signaling(struct drm_device *dev, f[*num_fences].out_fence_ptr = fence_ptr; *fence_state = f; - wb_conn = &conn->writeback; - fence = drm_writeback_get_out_fence(wb_conn); + fence = drm_writeback_get_out_fence(conn); if (!fence) return -ENOMEM; diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c index 5423abc825ee..7d08ffeaabb1 100644 --- a/drivers/gpu/drm/drm_writeback.c +++ b/drivers/gpu/drm/drm_writeback.c @@ -524,10 +524,10 @@ drm_writeback_signal_completion(struct drm_connector *connector, EXPORT_SYMBOL(drm_writeback_signal_completion); struct dma_fence * -drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector) +drm_writeback_get_out_fence(struct drm_connector *connector) { struct dma_fence *fence; - struct drm_connector *connector = drm_writeback_to_connector(wb_connector); + struct drm_writeback_connector *wb_connector = &connector->writeback; if (WARN_ON(connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)) diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h index 5e8ab51c2da4..2afa48ea7c00 100644 --- a/include/drm/drm_writeback.h +++ b/include/drm/drm_writeback.h @@ -104,5 +104,5 @@ drm_writeback_signal_completion(struct drm_connector *connector, int status); struct dma_fence * -drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector); +drm_writeback_get_out_fence(struct drm_connector *connector); #endif -- 2.34.1