Re: [PATCH 2/9] drm/i915: Reduce clutter by using the local plane pointer

Jesse Barnes
2015-03-10T15:59:46Z

On 03/10/2015 04:15 AM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> No need to go dig throguh intel_crtc->base.cursor when we already have
> the same thing as 'plane' local variable.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1d5107e..0da3abf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12299,7 +12299,7 @@ intel_check_cursor_plane(struct drm_plane *plane,
>
> finish:
> if (intel_crtc->active) {
> - if (intel_crtc->base.cursor->state->crtc_w != state->base.crtc_w)
> + if (plane->state->crtc_w != state->base.crtc_w)
> intel_crtc->atomic.update_wm = true;
>
> intel_crtc->atomic.fb_bits |=
>

At least it looks like we'll always get the right plane obj here. :)

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>