Message ID | 20250424-drm-bridge-convert-to-alloc-api-v2-0-8f91a404d86b@bootlin.com |
---|---|
Headers | show |
Series | drm: convert all bridges to devm_drm_bridge_alloc() | expand |
Hi Maxime, other DRM maintainers, On Thu, 24 Apr 2025 20:59:07 +0200 Luca Ceresoli <luca.ceresoli@bootlin.com> wrote: > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > bridge, and the only one supported from now on. It is also necessary for > implementing reference counting and thus needed to support removal of > bridges from a still existing DRM pipeline without use-after-free. > > This series converts all DRM bridges to the new API. > > Patch 1 uses a coccinelle semantic patch to mass-convert some of those > drivers -- thanks Maxime for having suggested the patch that served as a > starting point for me. I was unable to come up with a better patch > converting more drivers though, so I converted all others manually. Most of > them were trivial. I left the non-trivial ones at the end of the series to > help reviewers know where to look at more carefully. > > Due to the large number of touched files, the list of recipients generated > by get_maintainers (b4 actually) was huge, 60~70 people (not counting > mailing lists), so I took the liberty of trimming the list as reasonably as > I could to DRM maintainers and frequent contributors, and added all other > recipients individually per-patch. I hope this is fine. Don't hesitate to > suggest more people which should be Cc-ed in a future series, or a better > Cc policy. > > Current plan and status of the DRM bridge refcounting work: > > A. ✔ add new alloc API and refcounting -> (now in drm-misc-next) > B. ➜ convert all bridge drivers to new API (this series) > C. … documentation, kunit tests, debugfs improvements (v1 under discussion) > D. after (B), add get/put to drm_bridge_add/remove() + attach/detech() > E. after (B), convert accessors; this is a large work and can be done > in chunks > > Luca > > [0] https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Maintaining this long series is quite painful. Do you think at least patches with a R-by or T-by tag could be merged before I send v3, so we can relieve the maintenance effort, mail servers, and everybody's inboxes? Otherwise I could split this series in parts somewhat arbitrarily, but that is an additional work on its own and is not a perfect solution as it would not provide the big picture. Best regards, Luca
On Mon, Apr 28, 2025 at 05:24:57PM +0200, Luca Ceresoli wrote: > Hi Maxime, other DRM maintainers, > > On Thu, 24 Apr 2025 20:59:07 +0200 > Luca Ceresoli <luca.ceresoli@bootlin.com> wrote: > > > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > > bridge, and the only one supported from now on. It is also necessary for > > implementing reference counting and thus needed to support removal of > > bridges from a still existing DRM pipeline without use-after-free. > > > > This series converts all DRM bridges to the new API. > > > > Patch 1 uses a coccinelle semantic patch to mass-convert some of those > > drivers -- thanks Maxime for having suggested the patch that served as a > > starting point for me. I was unable to come up with a better patch > > converting more drivers though, so I converted all others manually. Most of > > them were trivial. I left the non-trivial ones at the end of the series to > > help reviewers know where to look at more carefully. > > > > Due to the large number of touched files, the list of recipients generated > > by get_maintainers (b4 actually) was huge, 60~70 people (not counting > > mailing lists), so I took the liberty of trimming the list as reasonably as > > I could to DRM maintainers and frequent contributors, and added all other > > recipients individually per-patch. I hope this is fine. Don't hesitate to > > suggest more people which should be Cc-ed in a future series, or a better > > Cc policy. > > > > Current plan and status of the DRM bridge refcounting work: > > > > A. ✔ add new alloc API and refcounting -> (now in drm-misc-next) > > B. ➜ convert all bridge drivers to new API (this series) > > C. … documentation, kunit tests, debugfs improvements (v1 under discussion) > > D. after (B), add get/put to drm_bridge_add/remove() + attach/detech() > > E. after (B), convert accessors; this is a large work and can be done > > in chunks > > Maintaining this long series is quite painful. Do you think at least > patches with a R-by or T-by tag could be merged before I send v3, so > we can relieve the maintenance effort, mail servers, and everybody's > inboxes? Yes? What's stopping you though? You have at least a colleague that can apply them, and you could just as well apply for commit rights yourself. Maxime
Hi Maxime, On Mon, 28 Apr 2025 17:42:46 +0200 Maxime Ripard <mripard@kernel.org> wrote: > On Mon, Apr 28, 2025 at 05:24:57PM +0200, Luca Ceresoli wrote: > > Hi Maxime, other DRM maintainers, > > > > On Thu, 24 Apr 2025 20:59:07 +0200 > > Luca Ceresoli <luca.ceresoli@bootlin.com> wrote: > > > > > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > > > bridge, and the only one supported from now on. It is also necessary for > > > implementing reference counting and thus needed to support removal of > > > bridges from a still existing DRM pipeline without use-after-free. > > > > > > This series converts all DRM bridges to the new API. > > > > > > Patch 1 uses a coccinelle semantic patch to mass-convert some of those > > > drivers -- thanks Maxime for having suggested the patch that served as a > > > starting point for me. I was unable to come up with a better patch > > > converting more drivers though, so I converted all others manually. Most of > > > them were trivial. I left the non-trivial ones at the end of the series to > > > help reviewers know where to look at more carefully. > > > > > > Due to the large number of touched files, the list of recipients generated > > > by get_maintainers (b4 actually) was huge, 60~70 people (not counting > > > mailing lists), so I took the liberty of trimming the list as reasonably as > > > I could to DRM maintainers and frequent contributors, and added all other > > > recipients individually per-patch. I hope this is fine. Don't hesitate to > > > suggest more people which should be Cc-ed in a future series, or a better > > > Cc policy. > > > > > > Current plan and status of the DRM bridge refcounting work: > > > > > > A. ✔ add new alloc API and refcounting -> (now in drm-misc-next) > > > B. ➜ convert all bridge drivers to new API (this series) > > > C. … documentation, kunit tests, debugfs improvements (v1 under discussion) > > > D. after (B), add get/put to drm_bridge_add/remove() + attach/detech() > > > E. after (B), convert accessors; this is a large work and can be done > > > in chunks > > > > Maintaining this long series is quite painful. Do you think at least > > patches with a R-by or T-by tag could be merged before I send v3, so > > we can relieve the maintenance effort, mail servers, and everybody's > > inboxes? > > Yes? > > What's stopping you though? You have at least a colleague that can apply > them, and you could just as well apply for commit rights yourself. OK, thanks. Will do. The reason I haven't done it is this policy in DRM still appears a bit unusual to me, but if it works for DRM I'm OK with it. Only, in case of doubt, I didn't want to risk abusing of the commit rights. Best regards, Luca
On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > bridge, and the only one supported from now on. It is also necessary for > implementing reference counting and thus needed to support removal of > bridges from a still existing DRM pipeline without use-after-free. > > This series converts all DRM bridges to the new API. > > [...] Applied, thanks! [02/34] platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API commit: 411465d35bc56877c33e2498ac697acfcf484e6b [03/34] drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API commit: 53ddeb25159781b029fda404226af600e76f975f [06/34] drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API commit: 4e90a3d96a6185e143041273f9867a1092dd4a71 [07/34] drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API commit: 6287ffd9eff6eea65865e64b9d4c45e115fa5ecf [11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API commit: ed6987b674185873ebed7a619a646da6dd1a78fa [12/34] drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API commit: 7fe58bf1a9a24b533875c262a3222581a3f759e4 [13/34] drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API commit: a4754ae9cfa76fbce79f023c268a5bac56f36321 [14/34] drm/exynos: mic: convert to devm_drm_bridge_alloc() API commit: 91c5c7b5bb2dd09b43b025bce6d790d3c79f4518 [15/34] drm/mcde: convert to devm_drm_bridge_alloc() API commit: 40c25b9ec641f43ba17c7b788ac16ec23f8daaa8 [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API commit: fffc8847743e45604c4478f554d628481b985556 [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API commit: e11532be87e437648521a8ed5358c56df11933b4 [27/34] drm/vc4: convert to devm_drm_bridge_alloc() API commit: 9545c91ed75ff65e114761a7729de0e1b440aec6 [31/34] drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API commit: e74b84cd83962e357329a695ba348b3dfe37395c Best regards,
Le 29/04/2025 à 11:27, Louis Chauvet a écrit : > > On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: >> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM >> bridge, and the only one supported from now on. It is also necessary for >> implementing reference counting and thus needed to support removal of >> bridges from a still existing DRM pipeline without use-after-free. >> >> This series converts all DRM bridges to the new API. >> >> [...] > > Applied, thanks! > > [02/34] platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API > commit: 411465d35bc56877c33e2498ac697acfcf484e6b > [03/34] drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API > commit: 53ddeb25159781b029fda404226af600e76f975f > [06/34] drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API > commit: 4e90a3d96a6185e143041273f9867a1092dd4a71 > [07/34] drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API > commit: 6287ffd9eff6eea65865e64b9d4c45e115fa5ecf > [11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API > commit: ed6987b674185873ebed7a619a646da6dd1a78fa > [12/34] drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API > commit: 7fe58bf1a9a24b533875c262a3222581a3f759e4 > [13/34] drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API > commit: a4754ae9cfa76fbce79f023c268a5bac56f36321 > [14/34] drm/exynos: mic: convert to devm_drm_bridge_alloc() API > commit: 91c5c7b5bb2dd09b43b025bce6d790d3c79f4518 Hello all, I made a mistake while applying those patches. Instead of taking 2-3,11-13,15-18,27,31, I took 2-3,11-18,27,31, which includes the patch 14. This patch is not R-by/A-by/SoB by non-Bootlin people. For me, the patch is correct, it does not break the build nor generate warnings. What should I do? Is my SoB sufficient, or should I revert the patch and wait for R/A-by before taking it again? Sorry for this, Louis Chauvet > [15/34] drm/mcde: convert to devm_drm_bridge_alloc() API > commit: 40c25b9ec641f43ba17c7b788ac16ec23f8daaa8 > [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API > commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c > [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API > commit: fffc8847743e45604c4478f554d628481b985556 > [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API > commit: e11532be87e437648521a8ed5358c56df11933b4 > [27/34] drm/vc4: convert to devm_drm_bridge_alloc() API > commit: 9545c91ed75ff65e114761a7729de0e1b440aec6 > [31/34] drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API > commit: e74b84cd83962e357329a695ba348b3dfe37395c > > Best regards,
On Tue, Apr 29, 2025 at 11:27:51AM +0200, Louis Chauvet wrote: > > On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: > > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > > bridge, and the only one supported from now on. It is also necessary for > > implementing reference counting and thus needed to support removal of > > bridges from a still existing DRM pipeline without use-after-free. > > > > This series converts all DRM bridges to the new API. > > > > [...] > > Applied, thanks! > [...] > [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API > commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c > [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API > commit: fffc8847743e45604c4478f554d628481b985556 > [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API > commit: e11532be87e437648521a8ed5358c56df11933b4 Why? These drivers are explicitly handled outside of drm-misc. Please be more careful next time.
On Tue, Apr 29, 2025 at 02:41:42PM +0200, Louis Chauvet wrote: > Le 29/04/2025 à 11:27, Louis Chauvet a écrit : > > > > On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: > > > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > > > bridge, and the only one supported from now on. It is also necessary for > > > implementing reference counting and thus needed to support removal of > > > bridges from a still existing DRM pipeline without use-after-free. > > > > > > This series converts all DRM bridges to the new API. > > > > > > [...] > > > > Applied, thanks! > > > > [02/34] platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API > > commit: 411465d35bc56877c33e2498ac697acfcf484e6b > > [03/34] drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API > > commit: 53ddeb25159781b029fda404226af600e76f975f > > [06/34] drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API > > commit: 4e90a3d96a6185e143041273f9867a1092dd4a71 > > [07/34] drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API > > commit: 6287ffd9eff6eea65865e64b9d4c45e115fa5ecf > > [11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API > > commit: ed6987b674185873ebed7a619a646da6dd1a78fa > > [12/34] drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API > > commit: 7fe58bf1a9a24b533875c262a3222581a3f759e4 > > [13/34] drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API > > commit: a4754ae9cfa76fbce79f023c268a5bac56f36321 > > [14/34] drm/exynos: mic: convert to devm_drm_bridge_alloc() API > > commit: 91c5c7b5bb2dd09b43b025bce6d790d3c79f4518 > > Hello all, > > I made a mistake while applying those patches. Instead of taking > 2-3,11-13,15-18,27,31, I took 2-3,11-18,27,31, which includes the patch 14. > > This patch is not R-by/A-by/SoB by non-Bootlin people. For me, the patch is > correct, it does not break the build nor generate warnings. > > What should I do? Is my SoB sufficient, or should I revert the patch and > wait for R/A-by before taking it again? It's worse: just like msm, it was never supposed to be applied in drm-misc, exynos has its own git tree. Inki, Kyungmin, Seung-Woo, sorry for the mishap. Do you agree with the following patch, and it going through drm-misc? https://lore.kernel.org/dri-devel/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com/ If not, we'll revert. Maxime
Le 29/04/2025 à 16:42, Dmitry Baryshkov a écrit : > On Tue, Apr 29, 2025 at 11:27:51AM +0200, Louis Chauvet wrote: >> >> On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: >>> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM >>> bridge, and the only one supported from now on. It is also necessary for >>> implementing reference counting and thus needed to support removal of >>> bridges from a still existing DRM pipeline without use-after-free. >>> >>> This series converts all DRM bridges to the new API. >>> >>> [...] >> >> Applied, thanks! >> > > [...] > >> [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API >> commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c >> [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API >> commit: fffc8847743e45604c4478f554d628481b985556 >> [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API >> commit: e11532be87e437648521a8ed5358c56df11933b4 > > Why? These drivers are explicitly handled outside of drm-misc. Please be > more careful next time. > Sorry, I was not aware that msm also have his own repository. TBH, I was not aware that other repositories existed for drm (I should have looked at MAINTAINERS, it is totally my fault). DIM and doc[1] only list drm, drm-misc, drm-xe, drm-intel, so I just tough "intel is special", not "drm is divided in many repositories". Again, sorry, for the future series I will double-check and only commit what I should. [1]:https://drm.pages.freedesktop.org/maintainer-tools/repositories/index.html
On Wed, Apr 30, 2025 at 10:21:48AM +0200, Louis Chauvet wrote: > > > Le 29/04/2025 à 16:42, Dmitry Baryshkov a écrit : > > On Tue, Apr 29, 2025 at 11:27:51AM +0200, Louis Chauvet wrote: > > > > > > On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: > > > > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > > > > bridge, and the only one supported from now on. It is also necessary for > > > > implementing reference counting and thus needed to support removal of > > > > bridges from a still existing DRM pipeline without use-after-free. > > > > > > > > This series converts all DRM bridges to the new API. > > > > > > > > [...] > > > > > > Applied, thanks! > > > > > > > [...] > > > > > [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API > > > commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c > > > [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API > > > commit: fffc8847743e45604c4478f554d628481b985556 > > > [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API > > > commit: e11532be87e437648521a8ed5358c56df11933b4 > > > > Why? These drivers are explicitly handled outside of drm-misc. Please be > > more careful next time. > > > > Sorry, I was not aware that msm also have his own repository. > > TBH, I was not aware that other repositories existed for drm (I should have > looked at MAINTAINERS, it is totally my fault). DIM and doc[1] only list > drm, drm-misc, drm-xe, drm-intel, so I just tough "intel is special", not > "drm is divided in many repositories". It's mentioned in the drm-misc section: https://drm.pages.freedesktop.org/maintainer-tools/repositories/drm-misc.html > This repository consists mostly of the core drm code as well as DRM > drivers that do not have a dedicated repository. Feel free to send a patch to improve the doc. If you missed it, someone else will. Maxime
Le 30/04/2025 à 12:39, Maxime Ripard a écrit : > On Wed, Apr 30, 2025 at 10:21:48AM +0200, Louis Chauvet wrote: >> >> >> Le 29/04/2025 à 16:42, Dmitry Baryshkov a écrit : >>> On Tue, Apr 29, 2025 at 11:27:51AM +0200, Louis Chauvet wrote: >>>> >>>> On Thu, 24 Apr 2025 20:59:07 +0200, Luca Ceresoli wrote: >>>>> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM >>>>> bridge, and the only one supported from now on. It is also necessary for >>>>> implementing reference counting and thus needed to support removal of >>>>> bridges from a still existing DRM pipeline without use-after-free. >>>>> >>>>> This series converts all DRM bridges to the new API. >>>>> >>>>> [...] >>>> >>>> Applied, thanks! >>>> >>> >>> [...] >>> >>>> [16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API >>>> commit: b2aabe5c6b65516d88214aba4b12ce2ca78bac6c >>>> [17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API >>>> commit: fffc8847743e45604c4478f554d628481b985556 >>>> [18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API >>>> commit: e11532be87e437648521a8ed5358c56df11933b4 >>> >>> Why? These drivers are explicitly handled outside of drm-misc. Please be >>> more careful next time. >>> >> >> Sorry, I was not aware that msm also have his own repository. >> >> TBH, I was not aware that other repositories existed for drm (I should have >> looked at MAINTAINERS, it is totally my fault). DIM and doc[1] only list >> drm, drm-misc, drm-xe, drm-intel, so I just tough "intel is special", not >> "drm is divided in many repositories". > > It's mentioned in the drm-misc section: > > https://drm.pages.freedesktop.org/maintainer-tools/repositories/drm-misc.html > >> This repository consists mostly of the core drm code as well as DRM >> drivers that do not have a dedicated repository. > > Feel free to send a patch to improve the doc. If you missed it, someone > else will. Done : https://gitlab.freedesktop.org/drm/maintainer-tools/-/merge_requests/77#c304368de02d740ca751f5812ddcd0cfac40d162 I added more details for the push process, clarified the existing drm repositories and added a small check in dim to warn user if the pushed commits does not belong to the targeted brach. > Maxime
Inki, Kyungmin, Seung-Woo, Alim, On Wed, 30 Apr 2025 10:08:14 +0200 Maxime Ripard <mripard@kernel.org> wrote: > Inki, Kyungmin, Seung-Woo, sorry for the mishap. Do you agree with the > following patch, and it going through drm-misc? > > https://lore.kernel.org/dri-devel/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com/ > > If not, we'll revert. Did you have a chance to have a look at the patch mentioned by Maxime? It was applied to drm-misc-next by mistake. Not your mistake of course, but now it's there so if you don't reply anything it will have to be reverted, and then sent again to go through all the review process to be hopefully re-applied in the future. If you agree with keeping it in drm-misc-next, that would be less noise for everybody. I'm going to send v3 very soon, so it would be good to decide what to do before that. Best regards, Luca
On 05/05/2025 14:06, Luca Ceresoli wrote: > Inki, Kyungmin, Seung-Woo, Alim, > > On Wed, 30 Apr 2025 10:08:14 +0200 > Maxime Ripard <mripard@kernel.org> wrote: > >> Inki, Kyungmin, Seung-Woo, sorry for the mishap. Do you agree with the >> following patch, and it going through drm-misc? >> >> https://lore.kernel.org/dri-devel/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com/ >> >> If not, we'll revert. > > Did you have a chance to have a look at the patch mentioned by Maxime? > > It was applied to drm-misc-next by mistake. Not your mistake of course, > but now it's there so if you don't reply anything it will have to be > reverted, and then sent again to go through all the review process to > be hopefully re-applied in the future. > > If you agree with keeping it in drm-misc-next, that would be less noise > for everybody. > > I'm going to send v3 very soon, so it would be good to decide what to > do before that. For the record: even though I'm not happy with msm-related patches going through drm-misc without additional ack from our side, I think reverting those and reapplying them later will create a bigger mess. So, I'm fine with keeping drm/msm/* bridged patches in.
Hi Dmitry, On Mon, 5 May 2025 14:58:58 +0300 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote: > On 05/05/2025 14:06, Luca Ceresoli wrote: > > Inki, Kyungmin, Seung-Woo, Alim, > > > > On Wed, 30 Apr 2025 10:08:14 +0200 > > Maxime Ripard <mripard@kernel.org> wrote: > > > >> Inki, Kyungmin, Seung-Woo, sorry for the mishap. Do you agree with the > >> following patch, and it going through drm-misc? > >> > >> https://lore.kernel.org/dri-devel/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com/ > >> > >> If not, we'll revert. > > > > Did you have a chance to have a look at the patch mentioned by Maxime? > > > > It was applied to drm-misc-next by mistake. Not your mistake of course, > > but now it's there so if you don't reply anything it will have to be > > reverted, and then sent again to go through all the review process to > > be hopefully re-applied in the future. > > > > If you agree with keeping it in drm-misc-next, that would be less noise > > for everybody. > > > > I'm going to send v3 very soon, so it would be good to decide what to > > do before that. > > For the record: even though I'm not happy with msm-related patches going > through drm-misc without additional ack from our side, I think reverting > those and reapplying them later will create a bigger mess. So, I'm fine > with keeping drm/msm/* bridged patches in. That was my understanding of your previous e-mail, but thanks for having made it explicit. Luca
devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM bridge, and the only one supported from now on. It is also necessary for implementing reference counting and thus needed to support removal of bridges from a still existing DRM pipeline without use-after-free. This series converts all DRM bridges to the new API. Patch 1 uses a coccinelle semantic patch to mass-convert some of those drivers -- thanks Maxime for having suggested the patch that served as a starting point for me. I was unable to come up with a better patch converting more drivers though, so I converted all others manually. Most of them were trivial. I left the non-trivial ones at the end of the series to help reviewers know where to look at more carefully. Due to the large number of touched files, the list of recipients generated by get_maintainers (b4 actually) was huge, 60~70 people (not counting mailing lists), so I took the liberty of trimming the list as reasonably as I could to DRM maintainers and frequent contributors, and added all other recipients individually per-patch. I hope this is fine. Don't hesitate to suggest more people which should be Cc-ed in a future series, or a better Cc policy. Current plan and status of the DRM bridge refcounting work: A. ✔ add new alloc API and refcounting -> (now in drm-misc-next) B. ➜ convert all bridge drivers to new API (this series) C. … documentation, kunit tests, debugfs improvements (v1 under discussion) D. after (B), add get/put to drm_bridge_add/remove() + attach/detech() E. after (B), convert accessors; this is a large work and can be done in chunks Luca [0] https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> --- Changes in v2: - Improved cover letter with link to commit adding devm_drm_bridge_alloc() - add review tags - fix bugs in zynqmp, vc4 patches - fix patch 1 error code checking - Link to v1: https://lore.kernel.org/r/20250407-drm-bridge-convert-to-alloc-api-v1-0-42113ff8d9c0@bootlin.com --- Luca Ceresoli (34): drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API drm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API drm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API drm/exynos: mic: convert to devm_drm_bridge_alloc() API drm/mcde: convert to devm_drm_bridge_alloc() API drm/msm/dp: convert to devm_drm_bridge_alloc() API drm/msm/dsi: convert to devm_drm_bridge_alloc() API drm/msm/hdmi: convert to devm_drm_bridge_alloc() API drm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API drm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API drm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API drm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API drm/omap: dss: venc: convert to devm_drm_bridge_alloc() API drm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API drm/vc4: convert to devm_drm_bridge_alloc() API drm/sti: dvo: convert to devm_drm_bridge_alloc() API drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API drm/bridge: add devm_drm_put_bridge() drm/bridge: panel: convert to devm_drm_bridge_alloc() API drivers/gpu/drm/adp/adp-mipi.c | 8 ++-- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 ++-- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 8 ++-- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 9 ++-- drivers/gpu/drm/bridge/analogix/anx7625.c | 7 ++- drivers/gpu/drm/bridge/aux-bridge.c | 9 ++-- drivers/gpu/drm/bridge/aux-hpd-bridge.c | 9 ++-- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 8 ++-- .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 8 ++-- drivers/gpu/drm/bridge/chipone-icn6211.c | 9 ++-- drivers/gpu/drm/bridge/chrontel-ch7033.c | 8 ++-- drivers/gpu/drm/bridge/cros-ec-anx7688.c | 9 ++-- drivers/gpu/drm/bridge/display-connector.c | 8 ++-- drivers/gpu/drm/bridge/fsl-ldb.c | 7 ++- drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 4 +- drivers/gpu/drm/bridge/imx/imx-ldb-helper.h | 3 +- drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 9 ++-- drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c | 10 ++-- drivers/gpu/drm/bridge/imx/imx8qm-ldb.c | 32 ++++++++----- drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 20 +++++--- .../gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 18 ++++--- drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c | 8 ++-- drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c | 8 ++-- drivers/gpu/drm/bridge/ite-it6263.c | 9 ++-- drivers/gpu/drm/bridge/ite-it6505.c | 9 ++-- drivers/gpu/drm/bridge/ite-it66121.c | 9 ++-- drivers/gpu/drm/bridge/lontium-lt8912b.c | 9 ++-- drivers/gpu/drm/bridge/lontium-lt9211.c | 8 ++-- drivers/gpu/drm/bridge/lontium-lt9611.c | 9 ++-- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 7 ++- drivers/gpu/drm/bridge/lvds-codec.c | 9 ++-- .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 11 ++--- drivers/gpu/drm/bridge/microchip-lvds.c | 8 ++-- drivers/gpu/drm/bridge/nwl-dsi.c | 8 ++-- drivers/gpu/drm/bridge/nxp-ptn3460.c | 9 ++-- drivers/gpu/drm/bridge/panel.c | 11 ++--- drivers/gpu/drm/bridge/parade-ps8622.c | 9 ++-- drivers/gpu/drm/bridge/parade-ps8640.c | 9 ++-- drivers/gpu/drm/bridge/sii902x.c | 7 ++- drivers/gpu/drm/bridge/sii9234.c | 9 ++-- drivers/gpu/drm/bridge/sil-sii8620.c | 9 ++-- drivers/gpu/drm/bridge/simple-bridge.c | 10 ++-- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 8 ++-- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 ++- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 ++-- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c | 8 ++-- drivers/gpu/drm/bridge/tc358762.c | 9 ++-- drivers/gpu/drm/bridge/tc358764.c | 9 ++-- drivers/gpu/drm/bridge/tc358767.c | 56 +++++++++++++++------- drivers/gpu/drm/bridge/tc358768.c | 9 ++-- drivers/gpu/drm/bridge/tc358775.c | 9 ++-- drivers/gpu/drm/bridge/tda998x_drv.c | 7 ++- drivers/gpu/drm/bridge/thc63lvd1024.c | 8 ++-- drivers/gpu/drm/bridge/ti-dlpc3433.c | 9 ++-- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 ++- drivers/gpu/drm/bridge/ti-tdp158.c | 8 ++-- drivers/gpu/drm/bridge/ti-tfp410.c | 9 ++-- drivers/gpu/drm/bridge/ti-tpd12s015.c | 9 ++-- drivers/gpu/drm/drm_bridge.c | 14 ++++++ drivers/gpu/drm/exynos/exynos_drm_mic.c | 7 ++- drivers/gpu/drm/mcde/mcde_dsi.c | 7 ++- drivers/gpu/drm/mediatek/mtk_dp.c | 9 ++-- drivers/gpu/drm/mediatek/mtk_dpi.c | 9 ++-- drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++-- drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 ++-- drivers/gpu/drm/meson/meson_encoder_cvbs.c | 12 ++--- drivers/gpu/drm/meson/meson_encoder_dsi.c | 12 ++--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 ++--- drivers/gpu/drm/msm/dp/dp_drm.c | 9 ++-- drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 ++-- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 9 ++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 7 ++- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 26 ++++------ drivers/gpu/drm/omapdrm/dss/hdmi5.c | 26 ++++------ drivers/gpu/drm/omapdrm/dss/sdi.c | 25 ++++------ drivers/gpu/drm/omapdrm/dss/venc.c | 23 ++++----- drivers/gpu/drm/renesas/rcar-du/rcar_lvds.c | 9 ++-- drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 8 ++-- drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++-- drivers/gpu/drm/sti/sti_dvo.c | 29 +++++------ drivers/gpu/drm/stm/lvds.c | 7 ++- drivers/gpu/drm/vc4/vc4_dsi.c | 34 ++----------- drivers/gpu/drm/xlnx/zynqmp_dp.c | 31 +++++------- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 1 - drivers/platform/arm64/acer-aspire1-ec.c | 7 ++- include/drm/drm_bridge.h | 4 ++ 87 files changed, 448 insertions(+), 510 deletions(-) --- base-commit: 82d6ce3a9e828e73ef43b8072a89d94608ae1554 change-id: 20250404-drm-bridge-convert-to-alloc-api-614becf62294 Best regards,