From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792750939; b=m9IVm+Opbq5FH5IpS3sNfMpWrsbC+3XEAv3YfUjX1lEeo0IxnMurK7xzIWA+Fc7zZJzv Kx4bSz78pUZXNlmZUYERvN8Yhpt7CUNWcdcxXo/ucG3JQIb+/bvpoasyuNZcFCDhW2t6F 5achiyUg+NsOEfyMqP/ZCKkGo13ZeP5HthVEMi6eac6k4w+DDOudOnJSrs2e8GLnW61jy W31ZdbZWjHX5NiFgM6OJlzoV+o1LrGV0rpTvfJGRw51hRJzkaWMIdMgxhubJLlMcOSqot ODujt3sUzrrl3jo3J49OgARGeXVhQShQjOfyZpkd0MVVQ0ninTtcB7qC1xfplO2URVw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792750939; h=DMARC-Filter:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=WWj8cJaFKWW/3VUfB0olF9gXuECfuO0KdXvS2+pAZ6g=; b=KrrpdZ4c71Nikj5RhPPfgQVWtRUUPjlNdd5FXZuruN36R9VXeDoWU9PUmH3irIy72QmR 1fq4eRvCpyKtMQTKOpRZN6glRI0zFQJtTI56ntxiFQyF4Qwi45nFqS3Iy99NaytR2qG0P VFUR5IZ9QqbFIyH0ZrmCNV7t/rzgBHxqICw5DWYHcAn2L3Xdrdjdp/IICPf/8tKFeb9/T O1kxHMCB8/sMk+otXuhlwbSg6tYSLOtV4uMd2uibbWtu4QvEPZPWaQdT1dJfcFuf31z60 GUGIdJSFZnvuYZiNipv2VHDtDb+/dy5WDdBLq9gvRPaMsfZfEuL7mdko0wrYbAnkHCg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=nzChOU5N; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65173606A31B for ; Fri, 23 Oct 2026 10:22:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 65173606A31B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=nzChOU5N Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6F30B302F for ; Fri, 23 Oct 2026 03:22:14 -0700 (PDT) Received: from [192.168.0.1] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6F05F3F7B4 for ; Fri, 23 Oct 2026 03:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1792750937; bh=VnaOaoCbZWtRveOiSDtrRS+aRrEZTeoetU0oSSXUGhU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nzChOU5NS4gIPzxLmLBt9GD3WfCP7xTX35O1qXEa3wCBao6+xhaEV/Uu25VBLwhVU NyZVjDEu+FLB7pVSpvj1WkxbvpohFbEtH81/sUgfEbg53ABVtFUDrq6fDdTnXAYVl5 kBFQTZqIIJooc9o/Id4Qtq0RKO8dQjWxunglV8h8= Date: Fri, 23 Oct 2026 11:21:48 +0100 From: Liviu Dudau To: Dmitry Baryshkov Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , John Harrison , Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Dave Stevenson , =?utf-8?B?TWHDrXJh?= Canal , Raspberry Pi Kernel Maintenance , Louis Chauvet , Mihail Atanassov , Eric Anholt , Rob Clark , Brian Starkey , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Suraj Kandpal Subject: Re: [PATCH v7 0/9] drm: writeback: clean up writeback connector initialization Message-ID: References: <20261019-wb-drop-encoder-v7-0-d4288a26eb54@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261019-wb-drop-encoder-v7-0-d4288a26eb54@oss.qualcomm.com> On Mon, Oct 19, 2026 at 04:12:26PM +0300, Dmitry Baryshkov wrote: > Drivers using drm_writeback_connector_init() / _with_encoder() don't > perform cleanup in a manner similar to drmm_writeback_connector_init() > (see drm_writeback_connector_cleanup()). Enough of the drivers don't use > the encoder embedded into the drm_writeback connector. In preparation > to further rework of the WB connectors (as planned to enable WB for i915 > / xe drivers, which would move drm_writeback_connector to be a field > inside drm_connector instead of subclassing it) remove the drm_encoder > wrapped in struct drm_writeback_connector. Rename the > drm_writeback_connector_init_with_encoder() to > drm_writeback_connector_init() > and copy drmm_writeback_connector_init() interface. Then, with the > encoder being gone, handle proper cleanup of writeback data in > drm_connector_cleanup(). > > --- > Changes in v7: > - Significantly reworked series, no longer insisting on using drmm. > - Link to v6: https://patch.msgid.link/20260612-wb-drop-encoder-v6-0-9f3a54f81310@oss.qualcomm.com > > Changes in v6: > - Dropped applied patch > - Implemented suggestion by Alex to use drmm allocation for the > writeback connector. > - Link to v5: https://patch.msgid.link/20260505-wb-drop-encoder-v5-0-42567b7c7af2@oss.qualcomm.com > > Changes in v5: > - Rebased on top of drm-misc-next > - Expanded commit message for msm patch, describing devm vs drmm issues (Laurent) > - Expanded commit messages, describing why the drivers are converted to > drmm_writeback_connector_init() (Laurent) > - Link to v4: https://lore.kernel.org/r/20251228-wb-drop-encoder-v4-0-58d28e668901@oss.qualcomm.com > > Changes in v4: > - Rebase on top of drm-misc-next, dropping applied patch. > - Added a note regarding memory leak in the AMDGPU driver. > - Fixed a devm vs drmm issue in the msm/dpu driver. > - Link to v3: https://lore.kernel.org/r/20250819-wb-drop-encoder-v3-0-b48a6af7903b@oss.qualcomm.com > > Changes in v3: > - Fixed subject prefix for the rcar-du patch (Jessica Zhang) > - Link to v2: https://lore.kernel.org/r/20250816-wb-drop-encoder-v2-0-f951de04f4f9@oss.qualcomm.com > > Changes in v2: > - Switched to drm_crtc_mask() where applicable (Louis Chauvet) > - Link to v1: https://lore.kernel.org/r/20250801-wb-drop-encoder-v1-0-824646042f7d@oss.qualcomm.com > > To: Maarten Lankhorst > To: Maxime Ripard > To: Thomas Zimmermann > To: David Airlie > To: Simona Vetter > To: John Harrison > To: Harry Wentland > To: Leo Li > To: Rodrigo Siqueira > To: Alex Deucher > To: Christian König > To: Liviu Dudau > To: Laurent Pinchart > To: Tomi Valkeinen > To: Kieran Bingham > To: Geert Uytterhoeven > To: Magnus Damm > To: Dave Stevenson > To: Maíra Canal > To: Raspberry Pi Kernel Maintenance > To: Louis Chauvet > To: Mihail Atanassov > To: Eric Anholt > To: Rob Clark > To: Brian Starkey > Cc: dri-devel@lists.freedesktop.org > Cc: linux-kernel@vger.kernel.org > Cc: amd-gfx@lists.freedesktop.org > Cc: linux-renesas-soc@vger.kernel.org > > --- > Dmitry Baryshkov (9): > drm/amd/display: embed the writeback encoder in amdgpu_dm_wb_connector > drm/komeda: embed the writeback encoder in komeda_wb_connector > drm/mali: embed the writeback encoder in malidp_drm > drm: renesas: rcar-du: embed the writeback encoder in rcar_du_crtc > drm: writeback: drop excess connector initialization functions > drm: writeback: rename drm_writeback_connector_init_with_encoder() > drm: writeback: don't destroy the shared writeback properties > drm: writeback: clean up writeback connectors in drm_connector_cleanup() > drm: writeback: drop the drmm writeback cleanup action > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 27 +++- > .../amd/display/amdgpu_dm/tests/amdgpu_dm_test.c | 4 +- > .../display/amdgpu_dm/tests/amdgpu_dm_wb_test.c | 4 +- > drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 + > .../drm/arm/display/komeda/komeda_wb_connector.c | 24 +++- > drivers/gpu/drm/arm/malidp_drv.h | 1 + > drivers/gpu/drm/arm/malidp_mw.c | 25 +++- > drivers/gpu/drm/drm_connector.c | 3 + > drivers/gpu/drm/drm_crtc_internal.h | 3 + > drivers/gpu/drm/drm_writeback.c | 147 +++++---------------- > drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.h | 2 + > .../gpu/drm/renesas/rcar-du/rcar_du_writeback.c | 29 +++- > drivers/gpu/drm/vc4/vc4_txp.c | 8 +- > include/drm/drm_writeback.h | 22 +-- > 16 files changed, 140 insertions(+), 165 deletions(-) I still personally dislike the whole idea of removing a framework feature that was beneficial to a lot of drivers in order to help one driver, but that is just my stance. The stats kind of show that and if it wasn't for the massive delete in drm_writeback.c (partly of comments) you would add more code with this change. The cleanup and fixes patches in this series also points out that there are still issues with the concept and John and sashiko are also raising issues. Anyway, as far as komeda and malidp drivers changes are concerned, I'm OK with them being applied as long as the framework or the patch series solves any cleanup issues. So for those two patches you can have my Reviewed-by: Liviu Dudau Best regards, Liviu > --- > base-commit: 725953d4da85cfb97a4c309fad6346b72f8529e7 > change-id: 20250801-wb-drop-encoder-97a0c75bd5d7 > > Best regards, > -- > With best wishes > Dmitry > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯