diff mbox

[03/21,v2] drm/i915: Enable get_colorkey functions for primary plane.

Message ID 1426896282-23215-4-git-send-email-chandra.konduru@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chandra Konduru March 21, 2015, 12:04 a.m. UTC
Made intel_colorkey_enabled and skl_get_colorkey functions
available for primary plane.

Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h    |    3 +++
 drivers/gpu/drm/i915/intel_sprite.c |    9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
diff mbox

Patch

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) {