mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm/rockchip: vop: Add bt656 support for RV1126B
Change-Id: I6e67a045fa6326c7924a6848948cf7ec9e9872f3 Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
This commit is contained in:
@@ -3444,10 +3444,10 @@ vop_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
|
||||
|
||||
/*
|
||||
* Dclk need to be double if BT656 interface and vop version >= 2.12.
|
||||
* That is RV1126/RV1106/RK3576_LITE/RK3506
|
||||
* That is RV1126/RV1106/RK3576_LITE/RK3506/RV1126B
|
||||
*/
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK ||
|
||||
(VOP_MAJOR(vop->version) == 2 && VOP_MINOR(vop->version) >= 12 &&
|
||||
(vop->version >= VOP_VERSION_RV1106 && vop->version <= VOP_VERSION_RK3288 &&
|
||||
s->output_if & VOP_OUTPUT_IF_BT656))
|
||||
request_clock *= 2;
|
||||
clock = clk_round_rate(vop->dclk, request_clock * 1000) / 1000;
|
||||
@@ -3903,10 +3903,10 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
|
||||
/*
|
||||
* Dclk need to be double if BT656 interface and vop version >= 2.12.
|
||||
* That is RV1126/RV1106/RK3576_LITE/RK3506
|
||||
* That is RV1126/RV1106/RK3576_LITE/RK3506/RV1126B
|
||||
*/
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK ||
|
||||
(VOP_MAJOR(vop->version) == 2 && VOP_MINOR(vop->version) >= 12 &&
|
||||
(vop->version >= VOP_VERSION_RV1106 && vop->version <= VOP_VERSION_RK3288 &&
|
||||
s->output_if & VOP_OUTPUT_IF_BT656))
|
||||
adj_mode->crtc_clock *= 2;
|
||||
|
||||
@@ -4010,11 +4010,11 @@ static void vop_update_csc(struct drm_crtc *crtc)
|
||||
u32 val;
|
||||
|
||||
/*
|
||||
* When using BT656, set RV1126/RV1106/RK3576_LITE/RK3506 to P8888 mode.
|
||||
* When using BT656, set RV1126/RV1106/RK3576_LITE/RK3506/RV1126B to P8888 mode.
|
||||
*/
|
||||
if ((s->output_mode == ROCKCHIP_OUT_MODE_AAAA &&
|
||||
!(vop->data->feature & VOP_FEATURE_OUTPUT_10BIT)) ||
|
||||
(VOP_MAJOR(vop->version) == 2 && VOP_MINOR(vop->version) >= 12 &&
|
||||
(vop->version >= VOP_VERSION_RV1106 && vop->version <= VOP_VERSION_RK3288 &&
|
||||
s->output_if & VOP_OUTPUT_IF_BT656))
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_P888;
|
||||
|
||||
|
||||
@@ -1942,6 +1942,7 @@ static const struct vop_ctrl rv1126b_ctrl_data = {
|
||||
.mipi_pin_pol = VOP_REG(RK3366_LIT_DSP_CTRL0, 0x7, 26),
|
||||
.bt1120_yc_swap = VOP_REG(RK3366_LIT_DSP_CTRL0, 0x1, 30),
|
||||
.bt1120_en = VOP_REG(RK3366_LIT_DSP_CTRL0, 0x1, 31),
|
||||
.bt656_en = VOP_REG(RK3366_LIT_DSP_CTRL0, 0x1, 6),
|
||||
|
||||
.mcu_force_rdn = VOP_REG(RV1126B_DSP_CTRL1, 0x1, 21),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user