mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
61890ccaef
This patch adds driver for MediaTek's Media Data Path ver.3 (MDP3). It provides the following functions: color transform, format conversion, resize, crop, rotate, flip and additional image quality enhancement. The MDP3 driver is mainly used for Google Chromebook products to import the new architecture to set the HW settings as shown below: User -> V4L2 framework -> MDP3 driver -> SCP (setting calculations) -> MDP3 driver -> CMDQ (GCE driver) -> HW Each modules' related operation control is sited in mtk-mdp3-comp.c Each modules' register table is defined in file with "mdp_reg_" prefix GCE related API, operation control sited in mtk-mdp3-cmdq.c V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c Probe, power, suspend/resume, system level functions are defined in mtk-mdp3-core.c [hverkuil: add 'depends on REMOTEPROC'] Signed-off-by: Ping-Hsun Wu <ping-hsun.wu@mediatek.com> Signed-off-by: daoyuan huang <daoyuan.huang@mediatek.com> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
40 lines
1.9 KiB
C
40 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2022 MediaTek Inc.
|
|
* Author: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
|
|
*/
|
|
|
|
#ifndef __MDP_REG_RSZ_H__
|
|
#define __MDP_REG_RSZ_H__
|
|
|
|
#define PRZ_ENABLE 0x000
|
|
#define PRZ_CONTROL_1 0x004
|
|
#define PRZ_CONTROL_2 0x008
|
|
#define PRZ_INPUT_IMAGE 0x010
|
|
#define PRZ_OUTPUT_IMAGE 0x014
|
|
#define PRZ_HORIZONTAL_COEFF_STEP 0x018
|
|
#define PRZ_VERTICAL_COEFF_STEP 0x01c
|
|
#define PRZ_LUMA_HORIZONTAL_INTEGER_OFFSET 0x020
|
|
#define PRZ_LUMA_HORIZONTAL_SUBPIXEL_OFFSET 0x024
|
|
#define PRZ_LUMA_VERTICAL_INTEGER_OFFSET 0x028
|
|
#define PRZ_LUMA_VERTICAL_SUBPIXEL_OFFSET 0x02c
|
|
#define PRZ_CHROMA_HORIZONTAL_INTEGER_OFFSET 0x030
|
|
#define PRZ_CHROMA_HORIZONTAL_SUBPIXEL_OFFSET 0x034
|
|
|
|
/* MASK */
|
|
#define PRZ_ENABLE_MASK 0x00010001
|
|
#define PRZ_CONTROL_1_MASK 0xfffffff3
|
|
#define PRZ_CONTROL_2_MASK 0x0ffffaff
|
|
#define PRZ_INPUT_IMAGE_MASK 0xffffffff
|
|
#define PRZ_OUTPUT_IMAGE_MASK 0xffffffff
|
|
#define PRZ_HORIZONTAL_COEFF_STEP_MASK 0x007fffff
|
|
#define PRZ_VERTICAL_COEFF_STEP_MASK 0x007fffff
|
|
#define PRZ_LUMA_HORIZONTAL_INTEGER_OFFSET_MASK 0x0000ffff
|
|
#define PRZ_LUMA_HORIZONTAL_SUBPIXEL_OFFSET_MASK 0x001fffff
|
|
#define PRZ_LUMA_VERTICAL_INTEGER_OFFSET_MASK 0x0000ffff
|
|
#define PRZ_LUMA_VERTICAL_SUBPIXEL_OFFSET_MASK 0x001fffff
|
|
#define PRZ_CHROMA_HORIZONTAL_INTEGER_OFFSET_MASK 0x0000ffff
|
|
#define PRZ_CHROMA_HORIZONTAL_SUBPIXEL_OFFSET_MASK 0x001fffff
|
|
|
|
#endif // __MDP_REG_RSZ_H__
|