Loading drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c +9 −17 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ #define TO_S15D16(_x_) ((_x_) << 7) #define MULTIPLE_CONN_DETECTED(x) (x > 1) /** * sde_rgb2yuv_601l - rgb to yuv color space conversion matrix * Loading Loading @@ -453,11 +452,9 @@ static void sde_encoder_phys_wb_setup_cdp(struct sde_encoder_phys *phys_enc) static void _sde_enc_phys_wb_detect_cwb(struct sde_encoder_phys *phys_enc, struct drm_crtc_state *crtc_state) { struct drm_connector *conn; struct drm_connector_state *conn_state; struct drm_encoder *encoder; struct sde_encoder_phys_wb *wb_enc = to_sde_encoder_phys_wb(phys_enc); const struct sde_wb_cfg *wb_cfg = wb_enc->hw_wb->caps; int conn_count = 0; phys_enc->in_clone_mode = false; Loading @@ -465,20 +462,15 @@ static void _sde_enc_phys_wb_detect_cwb(struct sde_encoder_phys *phys_enc, if (!(wb_cfg->features & BIT(SDE_WB_HAS_CWB))) return; /* Count the number of connectors on the given crtc */ drm_for_each_connector(conn, crtc_state->crtc->dev) { conn_state = drm_atomic_get_connector_state(crtc_state->state, conn); if ((conn->state && conn->state->crtc == crtc_state->crtc) || (conn_state && conn_state->crtc == crtc_state->crtc)) conn_count++; } /* Enable clone mode If crtc has multiple connectors & one is WB */ if (MULTIPLE_CONN_DETECTED(conn_count)) /* if any other encoder is connected to same crtc enable clone mode*/ drm_for_each_encoder(encoder, crtc_state->crtc->dev) { if (encoder->crtc != crtc_state->crtc) continue; if (phys_enc->parent != encoder) { phys_enc->in_clone_mode = true; break; } } SDE_DEBUG("detect CWB - status:%d\n", phys_enc->in_clone_mode); } Loading Loading
drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c +9 −17 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ #define TO_S15D16(_x_) ((_x_) << 7) #define MULTIPLE_CONN_DETECTED(x) (x > 1) /** * sde_rgb2yuv_601l - rgb to yuv color space conversion matrix * Loading Loading @@ -453,11 +452,9 @@ static void sde_encoder_phys_wb_setup_cdp(struct sde_encoder_phys *phys_enc) static void _sde_enc_phys_wb_detect_cwb(struct sde_encoder_phys *phys_enc, struct drm_crtc_state *crtc_state) { struct drm_connector *conn; struct drm_connector_state *conn_state; struct drm_encoder *encoder; struct sde_encoder_phys_wb *wb_enc = to_sde_encoder_phys_wb(phys_enc); const struct sde_wb_cfg *wb_cfg = wb_enc->hw_wb->caps; int conn_count = 0; phys_enc->in_clone_mode = false; Loading @@ -465,20 +462,15 @@ static void _sde_enc_phys_wb_detect_cwb(struct sde_encoder_phys *phys_enc, if (!(wb_cfg->features & BIT(SDE_WB_HAS_CWB))) return; /* Count the number of connectors on the given crtc */ drm_for_each_connector(conn, crtc_state->crtc->dev) { conn_state = drm_atomic_get_connector_state(crtc_state->state, conn); if ((conn->state && conn->state->crtc == crtc_state->crtc) || (conn_state && conn_state->crtc == crtc_state->crtc)) conn_count++; } /* Enable clone mode If crtc has multiple connectors & one is WB */ if (MULTIPLE_CONN_DETECTED(conn_count)) /* if any other encoder is connected to same crtc enable clone mode*/ drm_for_each_encoder(encoder, crtc_state->crtc->dev) { if (encoder->crtc != crtc_state->crtc) continue; if (phys_enc->parent != encoder) { phys_enc->in_clone_mode = true; break; } } SDE_DEBUG("detect CWB - status:%d\n", phys_enc->in_clone_mode); } Loading