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 89FB5CD343F for ; Thu, 21 May 2026 05:37:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4EE710F208; Thu, 21 May 2026 05:37:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QyBB0OAS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id A88B210F1D7; Thu, 21 May 2026 05:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779341869; x=1810877869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c1t8ekt6EqGzT6w6J1N/s0qhJcfrFTg2xdbayMYf7tQ=; b=QyBB0OASxumgPTH7nTNXqtcpfe/kMS06W7PDpiRgECfXFrmZ5t9c+6yq yuYISC+2n8Q/PmwjfemnwGzWaC0WrEirKS5S1J+MtEVm6sXpQhBsfKMMF zUkKE8qIBnjiQ7DE6J7hg8Wv6MKRK4M/+MJzLgfS1iNA8AY16vCwb0Fmc QR9HuxDUD7Kjt3lH0uKGGx29FPOZPd4/pPq75imAS4zqPHfmYbNUBh3F+ tZgjSzqvn6jdB7jM7zpKD42rmfW1zeFgcS7GuJEBkp9v5C32bJIDn1V3I GAS0YSSofwt/81vHn09ygQ0PnlsKohfLvp2Nts5FJ7VEiBCN4b39GYn1l g==; X-CSE-ConnectionGUID: 8FUilW0DRIS+4Yf4LVUWew== X-CSE-MsgGUID: HH6CYBSjREGxkiZ+tOZrgA== X-IronPort-AV: E=McAfee;i="6800,10657,11792"; a="80286462" X-IronPort-AV: E=Sophos;i="6.23,245,1770624000"; d="scan'208";a="80286462" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 22:37:48 -0700 X-CSE-ConnectionGUID: rSigSDYzRLCublGHfTveiw== X-CSE-MsgGUID: BQ0j8BjPTGG+dC0Bo28uxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,245,1770624000"; d="scan'208";a="245420697" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa005.jf.intel.com with ESMTP; 20 May 2026 22:37:44 -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: 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 , kernel-dev@igalia.com, John.Harrison@Igalia.com, Suraj Kandpal Subject: [PATCH v4 5/7] drm: writeback: Modify drm_writeback_get_out_fence helper Date: Thu, 21 May 2026 11:07:06 +0530 Message-Id: <20260521053708.1475129-6-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260521053708.1475129-1-suraj.kandpal@intel.com> References: <20260521053708.1475129-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 --- 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 | 5 ++--- include/drm/drm_writeback.h | 2 +- 3 files changed, 4 insertions(+), 7 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 f3b4371d4201..72e437f4394b 100644 --- a/drivers/gpu/drm/drm_writeback.c +++ b/drivers/gpu/drm/drm_writeback.c @@ -528,11 +528,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