diff mbox series

[4/5] drm/i915: Make HW readout mark CRTC scaler as in use.

Message ID 20181217095024.2340-4-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [RESEND,1/5] drm/i915/backlight: Restore backlight on resume, v2. | expand

Commit Message

Maarten Lankhorst Dec. 17, 2018, 9:50 a.m. UTC
This way we don't accidentally double allocate it and hopefully disable
it during fastset. I noticed this when I wrote a patch to sanity check
all of the scaler state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Hans de Goede Dec. 18, 2018, 4:01 p.m. UTC | #1
Hi,

On 17-12-18 10:50, Maarten Lankhorst wrote:
> This way we don't accidentally double allocate it and hopefully disable
> it during fastset. I noticed this when I wrote a patch to sanity check
> all of the scaler state.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   drivers/gpu/drm/i915/intel_display.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2dd99e5437a5..825d9b9e7f28 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8849,6 +8849,7 @@ static void skylake_get_pfit_config(struct intel_crtc *crtc,
>   			pipe_config->pch_pfit.enabled = true;
>   			pipe_config->pch_pfit.pos = I915_READ(SKL_PS_WIN_POS(crtc->pipe, i));
>   			pipe_config->pch_pfit.size = I915_READ(SKL_PS_WIN_SZ(crtc->pipe, i));
> +			scaler_state->scalers[i].in_use = true;
>   			break;
>   		}
>   	}
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2dd99e5437a5..825d9b9e7f28 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8849,6 +8849,7 @@  static void skylake_get_pfit_config(struct intel_crtc *crtc,
 			pipe_config->pch_pfit.enabled = true;
 			pipe_config->pch_pfit.pos = I915_READ(SKL_PS_WIN_POS(crtc->pipe, i));
 			pipe_config->pch_pfit.size = I915_READ(SKL_PS_WIN_SZ(crtc->pipe, i));
+			scaler_state->scalers[i].in_use = true;
 			break;
 		}
 	}