Commit d77182ad authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Mauro Carvalho Chehab
Browse files

media: sun8i: Add Allwinner A83T Rotate driver



Allwinner A83T contains rotation core which can rotate and flip images.

Add a driver for it.

Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
[hverkuil-cisco@xs4all.nl: MAINTAINERS paths were out of date, fix that]
[hverkuil-cisco@xs4all.nl: VFL_TYPE_GRABBER -> _VIDEO]
[hverkuil-cisco@xs4all.nl: Fix module build]
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 02fd2782
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -14363,6 +14363,14 @@ F: include/net/rose.h
F:	include/uapi/linux/rose.h
F:	include/uapi/linux/rose.h
F:	net/rose/
F:	net/rose/
ROTATION DRIVER FOR ALLWINNER A83T
M:	Jernej Skrabec <jernej.skrabec@siol.net>
L:	linux-media@vger.kernel.org
T:	git git://linuxtv.org/media_tree.git
S:	Maintained
F:	drivers/media/platform/sunxi/sun8i-rotate/
F:	Documentation/devicetree/bindings/media/allwinner,sun8i-a83t-de2-rotate.yaml
RTL2830 MEDIA DRIVER
RTL2830 MEDIA DRIVER
M:	Antti Palosaari <crope@iki.fi>
M:	Antti Palosaari <crope@iki.fi>
L:	linux-media@vger.kernel.org
L:	linux-media@vger.kernel.org
+12 −0
Original line number Original line Diff line number Diff line
@@ -507,6 +507,18 @@ config VIDEO_SUN8I_DEINTERLACE
	   capability found on some SoCs, like H3.
	   capability found on some SoCs, like H3.
	   To compile this driver as a module choose m here.
	   To compile this driver as a module choose m here.


config VIDEO_SUN8I_ROTATE
	tristate "Allwinner DE2 rotation driver"
	depends on VIDEO_DEV && VIDEO_V4L2
	depends on ARCH_SUNXI || COMPILE_TEST
	depends on COMMON_CLK && OF
	depends on PM
	select VIDEOBUF2_DMA_CONTIG
	select V4L2_MEM2MEM_DEV
	help
	   Support for the Allwinner DE2 rotation unit.
	   To compile this driver as a module choose m here.

endif # V4L_MEM2MEM_DRIVERS
endif # V4L_MEM2MEM_DRIVERS


# TI VIDEO PORT Helper Modules
# TI VIDEO PORT Helper Modules
+1 −0
Original line number Original line Diff line number Diff line
obj-y		+= sun4i-csi/
obj-y		+= sun4i-csi/
obj-y		+= sun6i-csi/
obj-y		+= sun6i-csi/
obj-y		+= sun8i-di/
obj-y		+= sun8i-di/
obj-y		+= sun8i-rotate/
+5 −0
Original line number Original line Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
sun8i-rotate-y += sun8i_rotate.o
sun8i-rotate-y += sun8i_formats.o

obj-$(CONFIG_VIDEO_SUN8I_ROTATE) += sun8i-rotate.o
+25 −0
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Jernej Skrabec <jernej.skrabec@siol.net> */

#ifndef _SUN8I_FORMATS_H_
#define _SUN8I_FORMATS_H_

#include <linux/videodev2.h>

#define ROTATE_FLAG_YUV    BIT(0)
#define ROTATE_FLAG_OUTPUT BIT(1)

struct rotate_format {
	u32 fourcc;
	u32 hw_format;
	int planes;
	int bpp[3];
	int hsub;
	int vsub;
	unsigned int flags;
};

const struct rotate_format *rotate_find_format(u32 pixelformat);
int rotate_enum_fmt(struct v4l2_fmtdesc *f, bool dst);

#endif
Loading