Thread (151 messages) 151 messages, 9 authors, 2022-08-30

Re: [PATCH v1 32/35] drm/sun4i: tv: Convert to the new TV mode property

From: Noralf Trønnes <hidden>
Date: 2022-08-28 17:12:22
Also in: dri-devel, linux-amlogic, linux-sunxi, lkml


Den 29.07.2022 18.35, skrev Maxime Ripard:
quoted hunk ↗ jump to hunk
Now that the core can deal fine with analog TV modes, let's convert the
sun4i TV driver to leverage those new features.

Signed-off-by: Maxime Ripard <redacted>
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 74ff5ad6a8b9..bed52423776e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
quoted hunk ↗ jump to hunk
@@ -586,8 +524,17 @@ static int sun4i_tv_bind(struct device *dev, struct device *master,
 
 	drm_connector_attach_encoder(&tv->connector, &tv->encoder);
 
+	ret = drm_mode_create_tv_properties(drm,
+					    DRM_MODE_TV_NORM_NTSC_M |
+					    DRM_MODE_TV_NORM_PAL_B,
+					    0, NULL);
+	if (ret)
+		goto err_cleanup_connector;
+
Looks like you have forgotten to attach the property?

Noralf.
 	return 0;
 
+err_cleanup_connector:
+	drm_connector_cleanup(&tv->connector);
 err_cleanup_encoder:
 	drm_encoder_cleanup(&tv->encoder);
 err_disable_clk:
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help