Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 DBD9F34DCD1 for ; Mon, 16 Mar 2026 08:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773649838; cv=none; b=HyNR95fdHWOPE3xT0XTYaRQIlZ2msSWhIap7xikhQ1Tar2ayuzR20qV8mSXYCfPTMWhK/PDVNglkct5uM8/QOXR4KyTeWY3+QhNm5+LemX43KJKJkw7ESLyy4Du9x3hTMms4soEDR/x1tDEBXEJ8F+VptEualua5+z0mLhirvSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773649838; c=relaxed/simple; bh=aRM3qd+6F6N7GpoYtfIBeQSbvfWgtoGFVl5Adw4VJro=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nTpocbzRRyf+XFLWmJPqhUE7LcWPBZGOIGy6CLau2NJg5WMmniaNy+4d9HIeZG/NkldC1scf8VFldwZKFnNEvoTUCytcAf9hYJ81S2utxkAIRAxphlMVm6MmTnEmMqneDpT0B/fJsTDsbSSTf+lztfz6v9mMJ8Ww/+9UOoR2/Mo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dJhV7Ems; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dJhV7Ems" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773649837; x=1805185837; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aRM3qd+6F6N7GpoYtfIBeQSbvfWgtoGFVl5Adw4VJro=; b=dJhV7EmsUOuKhpDFCDlG4+TpNgiPAWZquRLSeNb5m1IWZXN7hYIBH8RG fM8X5ocfMvqaRWn60iAShR77Ln9dBawou4i4y+yxVhNZeC5ScEbFzrPDo c5u70seKh9fOcov0Vv/vj5o4uW+8kRHrbjg27aCJ3NIuxC0uEmaPZ+0SN ETd7N+diyEQA0ACA8K9JpAXcMcCvM9K0AQH1DFkPLEz8e7VEqblvbN4ct xQs8f34TvdBcWxfqBkHW2+mKDEHLDfgMlD0NSFgf4QSIV5KmYzqyfLBFR eurslkqT8iy9L7jlqvWi+aCjWxm+Gbp0+fmWRrCVbWteux3kKHgz+mj2c g==; X-CSE-ConnectionGUID: gxklOQiISgaR+QlIRLXLmw== X-CSE-MsgGUID: ADXUj/f2Sj6HFoK1GuHMew== X-IronPort-AV: E=McAfee;i="6800,10657,11730"; a="77268179" X-IronPort-AV: E=Sophos;i="6.23,123,1770624000"; d="scan'208";a="77268179" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2026 01:30:36 -0700 X-CSE-ConnectionGUID: PYw3hLuIRgCceOEhjDSOaw== X-CSE-MsgGUID: pL2WZByGRnaBzy52hfC9BQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,123,1770624000"; d="scan'208";a="220888952" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa006.jf.intel.com with ESMTP; 16 Mar 2026 01:30:28 -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: ankit.k.nautiyal@intel.com, uma.shankar@intel.com, dmitry.baryshkov@oss.qualcomm.com, arun.r.murthy@intel.com, jani.nikula@intel.com, harry.wentland@amd.com, siqueira@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch, liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, robin.clark@oss.qualcomm.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, Suraj Kandpal Subject: [PATCH v3 0/7] Refactor drm_writeback_connector structure Date: Mon, 16 Mar 2026 14:00:02 +0530 Message-Id: <20260316083008.87466-1-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some drivers cannot work with the current design where the connector is embedded within the drm_writeback_connector such as intel and some drivers that can get it working end up adding a lot of checks all around the code to check if it's a writeback conenctor or not. This is due to the inheritance limitation in C. This series intends to solve it by moving the drm_writeback_connector within the drm_connector and remove the drm_connector base which was in drm_writeback_connector. This is done in union with hdmi connector within drm_connector to save memory and since drm_connector cannot be both hdmi and writeback it serves is well. A RFC version was floated and discussion had taken place at [1] which kicked of this more cleaner series. We do all other required modifications that come with these changes along with addition of new function which returns the drm_connector when drm_writeback_connector is present. This series also contains some writeback API cleanups as a consequence of writeback connector moving into drm_connector All drivers will be expected to allocate the drm_connector. This discussion was tiggered from [2] and sits on top of Dmitry's series see [3]. [1] https://patchwork.freedesktop.org/series/152758/ [2] https://patchwork.freedesktop.org/series/152106/ [3] https://patchwork.freedesktop.org/series/152420/ Signed-off-by: Suraj Kandpal Suraj Kandpal (7): drm: writeback: Refactor drm_writeback_connector structure drm: writeback: Modify writeback init helpers drm: writeback: Modify drm_writeback_queue_job params drm: writeback: Modify drm_writeback_signal_completion param drm: writeback: Modify params for drm_writeback_get_out_fence drm/connector: Modify prepare_writeback_job helper drm/connector: Modify cleanup_writeback_job helper .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 12 +-- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- .../gpu/drm/arm/display/komeda/komeda_kms.h | 6 +- .../arm/display/komeda/komeda_wb_connector.c | 11 +-- drivers/gpu/drm/arm/malidp_crtc.c | 2 +- drivers/gpu/drm/arm/malidp_drv.h | 2 +- drivers/gpu/drm/arm/malidp_mw.c | 7 +- drivers/gpu/drm/drm_atomic_uapi.c | 4 +- drivers/gpu/drm/drm_writeback.c | 51 ++++++++----- .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 9 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 10 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.h | 4 +- .../gpu/drm/renesas/rcar-du/rcar_du_crtc.h | 4 +- .../drm/renesas/rcar-du/rcar_du_writeback.c | 12 ++- drivers/gpu/drm/vc4/vc4_txp.c | 8 +- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- drivers/gpu/drm/vkms/vkms_writeback.c | 15 ++-- include/drm/drm_connector.h | 69 ++++++++++++++++- include/drm/drm_modeset_helper_vtables.h | 4 +- include/drm/drm_writeback.h | 76 ++----------------- 22 files changed, 162 insertions(+), 160 deletions(-) -- 2.34.1