Re: [PATCH] drm/i915: Force a full modeset if the requested CRTC is disconnected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 13, 2013 at 06:59:34PM +0100, Chris Wilson wrote:
> If the CRTC for this modeset is not attached to any encoder, it will be
> off. In this case, we will need to turn it on as well as update its
> base. This requires a full modeset sequence.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_display.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4f9c3d8..30bd919 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8836,9 +8836,8 @@ is_crtc_connector_off(struct drm_mode_set *set)
>  
>  	for (i = 0; i < set->num_connectors; i++)
>  		if (set->connectors[i]->encoder &&
> -		    set->connectors[i]->encoder->crtc == set->crtc &&
> -		    set->connectors[i]->dpms != DRM_MODE_DPMS_ON)
> -			return true;
> +		    set->connectors[i]->encoder->crtc == set->crtc)
> +			return set->connectors[i]->dpms != DRM_MODE_DPMS_ON;
>  
>  	return false;
>  }
> @@ -8853,11 +8852,10 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
>  	if (is_crtc_connector_off(set)) {
>  		config->mode_changed = true;
>  	} else if (set->crtc->fb != set->fb) {
> -		/* If we have no fb then treat it as a full mode set */
> -		if (set->crtc->fb == NULL) {
> -			struct intel_crtc *intel_crtc =
> -				to_intel_crtc(set->crtc);
> +		struct intel_crtc *intel_crtc = to_intel_crtc(set->crtc);
>  
> +		/* If we have no fb (or off) then treat it as a full mode set */
> +		if (set->crtc->fb == NULL) {
>  			if (intel_crtc->active && i915_fastboot) {
>  				DRM_DEBUG_KMS("crtc has no fb, will flip\n");
>  				config->fb_changed = true;
> @@ -8870,6 +8868,8 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
>  		} else if (set->fb->pixel_format !=
>  			   set->crtc->fb->pixel_format) {
>  			config->mode_changed = true;
> +		} else if (!intel_crtc->active) {
> +			config->mode_changed = true;

This hunk here /should/ be redundant, at least if we don't botch up the
connector iteration above. Also can you please pimp the commit message a
bit to trace the epic multi-chapter train wreak this has become?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux