Re: [PATCH v2 14/27] drm/i915: clean up atomic plane check functions

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

 



On Thu, Jun 04, 2015 at 02:47:44PM +0200, Maarten Lankhorst wrote:
> By passing crtc_state to the check_plane functions a lot of duplicated
> code can be removed. And now that the transitional helpers are gone the
> crtc_state can be reliably obtained.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_atomic_plane.c |  4 ++-
>  drivers/gpu/drm/i915/intel_display.c      | 48 ++++++++++---------------------
>  drivers/gpu/drm/i915/intel_drv.h          |  1 +
>  drivers/gpu/drm/i915/intel_sprite.c       | 13 +++------
>  4 files changed, 23 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index aa2128369a0a..4d8cacbca777 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -119,6 +119,8 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
>  	crtc = crtc ? crtc : plane->crtc;
>  	intel_crtc = to_intel_crtc(crtc);
>  
> +	intel_state->visible = false;
> +

What do we need this change for?  Primary and cursor check functions
immediately overwrite state->visible, so setting this here has no
effect.  The sprite case where fb==NULL is the only case where this
would matter, but moving the assignment from the sprite check function
to here doesn't seem like it gains us anything.

Here's the only effect I see it having:

> @@ -757,14 +758,8 @@ intel_check_sprite_plane(struct drm_plane *plane,
<snip>
> -	if (!fb) {
> -		state->visible = false;
> +	if (!fb)
>  		return 0;
> -	}
>  
>  	/* Don't modify another pipe's plane */
>  	if (intel_plane->pipe != intel_crtc->pipe) {

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
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