Thread (24 messages) 24 messages, 4 authors, 2016-08-12

Re: [PATCH v2 01/13] gpu: ipu-v3: Add Video Deinterlacer unit

From: Philipp Zabel <p.zabel@pengutronix.de>
Date: 2016-07-26 10:06:41
Also in: dri-devel, lkml

Am Dienstag, den 19.07.2016, 18:10 -0700 schrieb Steve Longerbeam:
Adds the Video Deinterlacer (VDIC) unit.

Signed-off-by: Steve Longerbeam <redacted>
[...]
quoted hunk ↗ jump to hunk
+++ b/drivers/gpu/ipu-v3/ipu-vdi.c
[...]
+static void __ipu_vdi_set_top_field_man(struct ipu_vdi *vdi, bool top_field_0)
+{
+	u32 reg;
+
+	reg = ipu_vdi_read(vdi, VDI_C);
+	if (top_field_0)
+		reg &= ~VDI_C_TOP_FIELD_MAN_1;
+	else
+		reg |= VDI_C_TOP_FIELD_MAN_1;
+	ipu_vdi_write(vdi, reg, VDI_C);
+}
[...]
+void ipu_vdi_toggle_top_field_man(struct ipu_vdi *vdi)
+{
+	unsigned long flags;
+	u32 reg;
+	u32 mask_reg;
+
+	spin_lock_irqsave(&vdi->lock, flags);
+
+	reg = ipu_vdi_read(vdi, VDI_C);
+	mask_reg = reg & VDI_C_TOP_FIELD_MAN_1;
+	if (mask_reg = VDI_C_TOP_FIELD_MAN_1)
+		reg &= ~VDI_C_TOP_FIELD_MAN_1;
+	else
+		reg |= VDI_C_TOP_FIELD_MAN_1;
+
+	ipu_vdi_write(vdi, reg, VDI_C);
+
+	spin_unlock_irqrestore(&vdi->lock, flags);
+}
+EXPORT_SYMBOL_GPL(ipu_vdi_toggle_top_field_man);
Why not export set top field man? Does it make sense to keep the user of
this API in the dark about the current setting?

regards
Philipp
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help