Commit 711fa266 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-fixes-2025-07-24' of...

Merge tag 'drm-misc-next-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

Two more bridge conversions to devm_drm_bridge_alloc that address a
warning now reported by the bridge core code.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250724-petite-gray-foxhound-b4fbb8@houat
parents ba0f4c4c b213eb34
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -90,14 +90,18 @@ int tidss_encoder_create(struct tidss_device *tidss,
	struct drm_connector *connector;
	int ret;

	t_enc = drmm_simple_encoder_alloc(&tidss->ddev, struct tidss_encoder,
					  encoder, encoder_type);
	t_enc = devm_drm_bridge_alloc(tidss->dev, struct tidss_encoder,
				      bridge, &tidss_bridge_funcs);
	if (IS_ERR(t_enc))
		return PTR_ERR(t_enc);

	ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder,
				      encoder_type);
	if (ret)
		return ret;

	t_enc->tidss = tidss;
	t_enc->next_bridge = next_bridge;
	t_enc->bridge.funcs = &tidss_bridge_funcs;

	enc = &t_enc->encoder;
	enc->possible_crtcs = possible_crtcs;
+4 −4
Original line number Diff line number Diff line
@@ -534,9 +534,10 @@ int tidss_oldi_init(struct tidss_device *tidss)
			continue;
		}

		oldi = devm_kzalloc(tidss->dev, sizeof(*oldi), GFP_KERNEL);
		if (!oldi) {
			ret = -ENOMEM;
		oldi = devm_drm_bridge_alloc(tidss->dev, struct tidss_oldi, bridge,
					     &tidss_oldi_bridge_funcs);
		if (IS_ERR(oldi)) {
			ret = PTR_ERR(oldi);
			goto err_put_node;
		}

@@ -577,7 +578,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
		/* Register the bridge. */
		oldi->bridge.of_node = child;
		oldi->bridge.driver_private = oldi;
		oldi->bridge.funcs = &tidss_oldi_bridge_funcs;
		oldi->bridge.timings = &default_tidss_oldi_timings;

		tidss->oldis[tidss->num_oldis++] = oldi;