Commit 53c2710c authored by Alex Bee's avatar Alex Bee Committed by Heiko Stuebner

drm: rockchip: add scaling for RK3036 win1

Add the registers needed to make scaling work on RK3036's win1.
Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-2-knaerzche@gmail.com
parent 3c1ed51a
...@@ -77,15 +77,20 @@ static const uint64_t format_modifiers_win_lite[] = { ...@@ -77,15 +77,20 @@ static const uint64_t format_modifiers_win_lite[] = {
DRM_FORMAT_MOD_INVALID, DRM_FORMAT_MOD_INVALID,
}; };
static const struct vop_scl_regs rk3036_win_scl = { static const struct vop_scl_regs rk3036_win0_scl = {
.scale_yrgb_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 0x0), .scale_yrgb_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 0x0),
.scale_yrgb_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 16), .scale_yrgb_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 16),
.scale_cbcr_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 0x0), .scale_cbcr_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 0x0),
.scale_cbcr_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 16), .scale_cbcr_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 16),
}; };
static const struct vop_scl_regs rk3036_win1_scl = {
.scale_yrgb_x = VOP_REG(RK3036_WIN1_SCL_FACTOR_YRGB, 0xffff, 0x0),
.scale_yrgb_y = VOP_REG(RK3036_WIN1_SCL_FACTOR_YRGB, 0xffff, 16),
};
static const struct vop_win_phy rk3036_win0_data = { static const struct vop_win_phy rk3036_win0_data = {
.scl = &rk3036_win_scl, .scl = &rk3036_win0_scl,
.data_formats = formats_win_full, .data_formats = formats_win_full,
.nformats = ARRAY_SIZE(formats_win_full), .nformats = ARRAY_SIZE(formats_win_full),
.format_modifiers = format_modifiers_win_full, .format_modifiers = format_modifiers_win_full,
...@@ -102,6 +107,7 @@ static const struct vop_win_phy rk3036_win0_data = { ...@@ -102,6 +107,7 @@ static const struct vop_win_phy rk3036_win0_data = {
}; };
static const struct vop_win_phy rk3036_win1_data = { static const struct vop_win_phy rk3036_win1_data = {
.scl = &rk3036_win1_scl,
.data_formats = formats_win_lite, .data_formats = formats_win_lite,
.nformats = ARRAY_SIZE(formats_win_lite), .nformats = ARRAY_SIZE(formats_win_lite),
.format_modifiers = format_modifiers_win_lite, .format_modifiers = format_modifiers_win_lite,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment