mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: dw-dp: support dynamic binding to different vp port
According to the application scenario, DP0/DP1 may be bind to the same vp port, or different vp port. The corresponding bit in output_if needs to be set or cleared correctly. Change-Id: I880946d0c61a209d5a16ff7d2aada43f87a075c5 Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
@@ -1496,7 +1496,14 @@ static void dw_dp_encoder_enable(struct drm_encoder *encoder)
|
|||||||
|
|
||||||
static void dw_dp_encoder_disable(struct drm_encoder *encoder)
|
static void dw_dp_encoder_disable(struct drm_encoder *encoder)
|
||||||
{
|
{
|
||||||
|
struct dw_dp *dp = encoder_to_dp(encoder);
|
||||||
|
struct drm_crtc *crtc = encoder->crtc;
|
||||||
|
struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc->state);
|
||||||
|
|
||||||
|
if (dp->split_mode)
|
||||||
|
s->output_if &= ~(VOP_OUTPUT_IF_DP0 | VOP_OUTPUT_IF_DP1);
|
||||||
|
else
|
||||||
|
s->output_if &= ~(dp->id ? VOP_OUTPUT_IF_DP1 : VOP_OUTPUT_IF_DP0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dw_dp_encoder_atomic_check(struct drm_encoder *encoder,
|
static int dw_dp_encoder_atomic_check(struct drm_encoder *encoder,
|
||||||
@@ -1519,7 +1526,7 @@ static int dw_dp_encoder_atomic_check(struct drm_encoder *encoder,
|
|||||||
s->output_flags |= dp->id ? ROCKCHIP_OUTPUT_DATA_SWAP : 0;
|
s->output_flags |= dp->id ? ROCKCHIP_OUTPUT_DATA_SWAP : 0;
|
||||||
s->output_if |= VOP_OUTPUT_IF_DP0 | VOP_OUTPUT_IF_DP1;
|
s->output_if |= VOP_OUTPUT_IF_DP0 | VOP_OUTPUT_IF_DP1;
|
||||||
} else {
|
} else {
|
||||||
s->output_if = dp->id ? VOP_OUTPUT_IF_DP1 : VOP_OUTPUT_IF_DP0;
|
s->output_if |= dp->id ? VOP_OUTPUT_IF_DP1 : VOP_OUTPUT_IF_DP0;
|
||||||
}
|
}
|
||||||
s->output_bpc = di->bpc;
|
s->output_bpc = di->bpc;
|
||||||
s->bus_flags = di->bus_flags;
|
s->bus_flags = di->bus_flags;
|
||||||
|
|||||||
Reference in New Issue
Block a user