[Intel-gfx] [PATCH v2 02/12] drm/i915: Update atomic state when removing mst connector.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Aug 6 00:28:17 PDT 2015


Op 06-08-15 om 07:34 schreef Sivakumar Thulasimani:
>
>
> On 7/27/2015 6:05 PM, Maarten Lankhorst wrote:
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_display.c |  7 ------
>>   drivers/gpu/drm/i915/intel_dp_mst.c  | 45 +++++++++++++++++++++++++++++++++++-
>>   2 files changed, 44 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 7747520bf9f6..3ab0a8a8e702 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -12751,13 +12751,6 @@ check_encoder_state(struct drm_device *dev)
>>                       encoder->base.crtc,
>>                    "connector's crtc doesn't match encoder crtc\n");
>>           }
>> -        /*
>> -         * for MST connectors if we unplug the connector is gone
>> -         * away but the encoder is still connected to a crtc
>> -         * until a modeset happens in response to the hotplug.
>> -         */
>> -        if (!enabled && encoder->base.encoder_type == DRM_MODE_ENCODER_DPMST)
>> -            continue;
>>             I915_STATE_WARN(!!encoder->base.crtc != enabled,
>>                "encoder's enabled state mismatch "
>> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
>> index 585f0a45b3f1..35f2eb59818a 100644
>> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
>> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
>> @@ -448,6 +448,49 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>>       return connector;
>>   }
>>   +static void
>> +intel_dp_unbind_mst_connector(struct drm_device *dev,
>> +                  struct drm_connector *connector)
>> +{
>> +    struct drm_atomic_state *state;
>> +    struct drm_connector_state *conn_state;
>> +    struct drm_crtc *crtc = connector->state->crtc;
>> +    int ret;
>> +
>> +    if (!crtc)
>> +        return;
>> +
> why cant we call drm_atomic_helper_set_config with just crtc copied into struct drm_mode_set ?

Excellent idea! I think I overengineered this a little by trying to keep the crtc active after disabling if there are other connectors.

However I don't think it's allowed because cloneable is not set on the mst encoder. So new version coming up!

~Maarten


More information about the Intel-gfx mailing list