[Intel-gfx] [PATCH] drm/i915: Postpone plane readout until after encoder readout

Patrik Jakobsson patrik.r.jakobsson at gmail.com
Tue Aug 4 08:37:40 PDT 2015


On Mon, Aug 3, 2015 at 4:36 PM, Maarten Lankhorst
<maarten.lankhorst at linux.intel.com> wrote:
> Hey,
>
> Op 31-07-15 om 15:04 schreef Patrik Jakobsson:
>> When reading out hw state for planes we disable inactive planes which in
>> turn triggers an update of the watermarks. The update depends on the
>> crtc_clock being set which is done when reading out encoders. Thus
>> postpone the plane readout until after encoder readout.
>>
>> This prevents a warning in skl_compute_linetime_wm() where pixel_rate
>> becomes 0 when crtc_clock is 0.
>>
> Running this on skylake it looks like like it's a partial fix.
> You would need to move hwmode like below too?
>
> Also:
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=91428

Ah yes, I'll send a v2. Thanks.

>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index add7f807a82d..49907f4e939a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14888,8 +14888,6 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
>                         crtc->base.state->mode.private_flags = I915_MODE_FLAG_INHERITED;
>                 }
>
> -               crtc->base.hwmode = crtc->config->base.adjusted_mode;
> -
>                 DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n",
>                               crtc->base.base.id,
>                               crtc->active ? "enabled" : "disabled");
> @@ -14971,6 +14969,7 @@ intel_modeset_setup_hw_state(struct drm_device *dev)
>
>         for_each_pipe(dev_priv, pipe) {
>                 crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
> +               crtc->base.hwmode = crtc->config->base.adjusted_mode;
>
>                 for_each_intel_plane(crtc->base.dev, plane) {
>                         if (crtc->pipe != plane->pipe)
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list