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 45A43CD5BAB for ; Thu, 21 May 2026 05:37:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 070ED10F1DD; Thu, 21 May 2026 05:37:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QcTgk9ji"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id C9E0E10E45E; Thu, 21 May 2026 05:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779341842; x=1810877842; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JChYDdRSXqGFrgAO7ovqrQ+uQ7MKFrtY7Yta0StmD34=; b=QcTgk9jiLvqw0UIi6D0aUURAcTzapWodGykRHjRq+6vaiEoBD3M9MH8b hSnHEmcMVGiUSb7ndsmWEgItLfeo6JgeyN/qiAUtMKxIPLj56xO94zrRm BrmzCAE5JUhYonzy/jDmE1BnT4l++3fdOXbkNvvw4/prlu8c3b3k9spO4 cGiq8qPJOz85u+JVlzSXGsA3ofKrT29g15xEZ3h+vV31KhBUOZeMKKkeJ Mdz7rLcOHayLshkXWHDmDQJSUnoYifiZFMST3c/k32CBJRceTmUfKfKdI 6DPkXIRnWztSp6woTHL4A4uz8dE+ztF1Fy8JHzpzvZi3m3fmMC9A0OPr2 g==; X-CSE-ConnectionGUID: prkzySsbRDq7X87cNX2CHQ== X-CSE-MsgGUID: b4B0VC/VRBSmiH2pWl/KpQ== X-IronPort-AV: E=McAfee;i="6800,10657,11792"; a="80286387" X-IronPort-AV: E=Sophos;i="6.23,245,1770624000"; d="scan'208";a="80286387" 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:21 -0700 X-CSE-ConnectionGUID: KvOn4zpgSUCuN6jzyqY5YQ== X-CSE-MsgGUID: DAydlcPQSfKYThbamgE8FA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,245,1770624000"; d="scan'208";a="245420569" 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:16 -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 0/7] Refactor drm_writeback_connector structure Date: Thu, 21 May 2026 11:07:01 +0530 Message-Id: <20260521053708.1475129-1-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 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" 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 helper drm: writeback: Modify drm_writeback_signal_completion helper drm: writeback: Modify drm_writeback_get_out_fence helper drm: writeback: Modify prepare_writeback_job helper drm: writeback: 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 | 50 +++++++----- .../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 | 6 +- .../drm/renesas/rcar-du/rcar_du_writeback.c | 16 ++-- 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, 164 insertions(+), 163 deletions(-) -- 2.34.1