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

Philipp Zabel p.zabel at pengutronix.de
Tue Jul 26 10:06:32 UTC 2016


Am Dienstag, den 19.07.2016, 18:10 -0700 schrieb Steve Longerbeam:
> Adds the Video Deinterlacer (VDIC) unit.
> 
> Signed-off-by: Steve Longerbeam <steve_longerbeam at mentor.com>
[...]
> +++ 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



More information about the dri-devel mailing list