Loading drivers/gpu/drm/msm/sde/sde_connector.c +1 −7 Original line number Diff line number Diff line Loading @@ -658,13 +658,7 @@ static int sde_connector_atomic_get_property(struct drm_connector *connector, idx = msm_property_index(&c_conn->property_info, property); if (idx == CONNECTOR_PROP_RETIRE_FENCE) /* * Set a fence offset if not a virtual connector, so that the * fence signals after one additional commit rather than at the * end of the current one. */ rc = sde_fence_create(&c_conn->retire_fence, val, c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL); rc = sde_fence_create(&c_conn->retire_fence, val, 0); else /* get cached property value */ rc = msm_property_atomic_get(&c_conn->property_info, Loading drivers/gpu/drm/msm/sde/sde_connector.h +17 −0 Original line number Diff line number Diff line Loading @@ -440,5 +440,22 @@ int sde_connector_register_custom_event(struct sde_kms *kms, */ int sde_connector_pre_kickoff(struct drm_connector *connector); /** * sde_connector_needs_offset - adjust the output fence offset based on * display type * @connector: Pointer to drm connector object * Returns: true if offset is required, false for all other cases. */ static inline bool sde_connector_needs_offset(struct drm_connector *connector) { struct sde_connector *c_conn; if (!connector) return false; c_conn = to_sde_connector(connector); return (c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL); } #endif /* _SDE_CONNECTOR_H_ */ drivers/gpu/drm/msm/sde/sde_crtc.c +11 −2 Original line number Diff line number Diff line Loading @@ -2707,19 +2707,28 @@ static int sde_crtc_atomic_get_property(struct drm_crtc *crtc, struct sde_crtc *sde_crtc; struct sde_crtc_state *cstate; int i, ret = -EINVAL; bool conn_offset = 0; if (!crtc || !state) { SDE_ERROR("invalid argument(s)\n"); } else { sde_crtc = to_sde_crtc(crtc); cstate = to_sde_crtc_state(state); for (i = 0; i < cstate->num_connectors; ++i) { conn_offset = sde_connector_needs_offset( cstate->connectors[i]); if (conn_offset) break; } i = msm_property_index(&sde_crtc->property_info, property); if (i == CRTC_PROP_OUTPUT_FENCE) { uint32_t offset = sde_crtc_get_property(cstate, CRTC_PROP_OUTPUT_FENCE_OFFSET); ret = sde_fence_create( &sde_crtc->output_fence, val, offset); ret = sde_fence_create(&sde_crtc->output_fence, val, offset + conn_offset); if (ret) SDE_ERROR("fence create failed\n"); } else { Loading Loading
drivers/gpu/drm/msm/sde/sde_connector.c +1 −7 Original line number Diff line number Diff line Loading @@ -658,13 +658,7 @@ static int sde_connector_atomic_get_property(struct drm_connector *connector, idx = msm_property_index(&c_conn->property_info, property); if (idx == CONNECTOR_PROP_RETIRE_FENCE) /* * Set a fence offset if not a virtual connector, so that the * fence signals after one additional commit rather than at the * end of the current one. */ rc = sde_fence_create(&c_conn->retire_fence, val, c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL); rc = sde_fence_create(&c_conn->retire_fence, val, 0); else /* get cached property value */ rc = msm_property_atomic_get(&c_conn->property_info, Loading
drivers/gpu/drm/msm/sde/sde_connector.h +17 −0 Original line number Diff line number Diff line Loading @@ -440,5 +440,22 @@ int sde_connector_register_custom_event(struct sde_kms *kms, */ int sde_connector_pre_kickoff(struct drm_connector *connector); /** * sde_connector_needs_offset - adjust the output fence offset based on * display type * @connector: Pointer to drm connector object * Returns: true if offset is required, false for all other cases. */ static inline bool sde_connector_needs_offset(struct drm_connector *connector) { struct sde_connector *c_conn; if (!connector) return false; c_conn = to_sde_connector(connector); return (c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL); } #endif /* _SDE_CONNECTOR_H_ */
drivers/gpu/drm/msm/sde/sde_crtc.c +11 −2 Original line number Diff line number Diff line Loading @@ -2707,19 +2707,28 @@ static int sde_crtc_atomic_get_property(struct drm_crtc *crtc, struct sde_crtc *sde_crtc; struct sde_crtc_state *cstate; int i, ret = -EINVAL; bool conn_offset = 0; if (!crtc || !state) { SDE_ERROR("invalid argument(s)\n"); } else { sde_crtc = to_sde_crtc(crtc); cstate = to_sde_crtc_state(state); for (i = 0; i < cstate->num_connectors; ++i) { conn_offset = sde_connector_needs_offset( cstate->connectors[i]); if (conn_offset) break; } i = msm_property_index(&sde_crtc->property_info, property); if (i == CRTC_PROP_OUTPUT_FENCE) { uint32_t offset = sde_crtc_get_property(cstate, CRTC_PROP_OUTPUT_FENCE_OFFSET); ret = sde_fence_create( &sde_crtc->output_fence, val, offset); ret = sde_fence_create(&sde_crtc->output_fence, val, offset + conn_offset); if (ret) SDE_ERROR("fence create failed\n"); } else { Loading