[Intel-gfx] [PATCH 03/21] drm/i915: Enable get_colorkey functions for primary plane.

Daniel Vetter daniel at ffwll.ch
Tue Mar 17 07:12:10 PDT 2015


On Sat, Mar 14, 2015 at 10:55:28PM -0700, Chandra Konduru wrote:
> Made intel_colorkey_enabled and skl_get_colorkey functions
> available for primary plane.
> 
> Signed-off-by: Chandra Konduru <chandra.konduru at intel.com>

This is a legacy plane attribute which we first need to convert over to
properties. Do we really need this for skl scaler support? The problem
here is that this directly looks at hw state, so breaks the check/commit
split atomic needs.

Imo best would be if we could push this ouf of the scaler series. I
haven't checked for usage though.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_drv.h    |    3 +++
>  drivers/gpu/drm/i915/intel_sprite.c |    9 +++++----
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index ec99046..3f7d05e 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1263,6 +1263,9 @@ int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
>  			      struct drm_file *file_priv);
>  int intel_sprite_get_colorkey(struct drm_device *dev, void *data,
>  			      struct drm_file *file_priv);
> +bool intel_colorkey_enabled(struct intel_plane *intel_plane);
> +void skl_get_colorkey(struct drm_plane *drm_plane,
> +                struct drm_intel_sprite_colorkey *key);
>  bool intel_pipe_update_start(struct intel_crtc *crtc,
>  			     uint32_t *start_vbl_count);
>  void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count);
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index a828736..9ee12d0 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -336,7 +336,7 @@ skl_update_colorkey(struct drm_plane *drm_plane,
>  	return 0;
>  }
>  
> -static void
> +void
>  skl_get_colorkey(struct drm_plane *drm_plane,
>  		 struct drm_intel_sprite_colorkey *key)
>  {
> @@ -1068,11 +1068,12 @@ ilk_get_colorkey(struct drm_plane *plane, struct drm_intel_sprite_colorkey *key)
>  		key->flags = I915_SET_COLORKEY_NONE;
>  }
>  
> -static bool colorkey_enabled(struct intel_plane *intel_plane)
> +bool intel_colorkey_enabled(struct intel_plane *intel_plane)
>  {
>  	struct drm_intel_sprite_colorkey key;
>  
> -	intel_plane->get_colorkey(&intel_plane->base, &key);
> +	if (intel_plane->get_colorkey)
> +		intel_plane->get_colorkey(&intel_plane->base, &key);
>  
>  	return key.flags != I915_SET_COLORKEY_NONE;
>  }
> @@ -1241,7 +1242,7 @@ finish:
>  	 * we can disable the primary and save power.
>  	 */
>  	state->hides_primary = fb != NULL && drm_rect_equals(dst, clip) &&
> -		!colorkey_enabled(intel_plane);
> +		!intel_colorkey_enabled(intel_plane);
>  	WARN_ON(state->hides_primary && !state->visible && intel_crtc->active);
>  
>  	if (intel_crtc->active) {
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list