Re: [Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes

2015-04-02 Thread Jani Nikula
On Mon, 30 Mar 2015, Daniel Vetter dan...@ffwll.ch wrote:
 On Fri, Mar 27, 2015 at 07:59:40PM +0200, ville.syrj...@linux.intel.com wrote:
 From: Ville Syrjälä ville.syrj...@linux.intel.com
 
 The legcy colorkey ioctls are only implemented for sprite planes, so
 reject the ioctl for primary/cursor planes. If we want to support
 colorkeying with these planes (assuming we have hw support of course)
 we should just move ahead with the colorkey property conversion.
 
 Cc: Tommi Rantala tt.rant...@gmail.com
 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com

 Testcase: kms_legacy_colorkey
 Cc: sta...@vger.kernel.org
 Reviewed-by: Daniel Vetter daniel.vet...@ffwll.ch

Pushed to drm-intel-fixes, with cc: stable and a bunch of other tags
added, thanks for the patch, review, and testing.

BR,
Jani.




 ---
  drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
 b/drivers/gpu/drm/i915/intel_sprite.c
 index f41e872..7017384 100644
 --- a/drivers/gpu/drm/i915/intel_sprite.c
 +++ b/drivers/gpu/drm/i915/intel_sprite.c
 @@ -1113,7 +1113,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, 
 void *data,
  drm_modeset_lock_all(dev);
  
  plane = drm_plane_find(dev, set-plane_id);
 -if (!plane) {
 +if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
  ret = -ENOENT;
  goto out_unlock;
  }
 @@ -1145,7 +1145,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, 
 void *data,
  drm_modeset_lock_all(dev);
  
  plane = drm_plane_find(dev, get-plane_id);
 -if (!plane) {
 +if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
  ret = -ENOENT;
  goto out_unlock;
  }
 -- 
 2.0.5
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes

2015-03-30 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 07:59:40PM +0200, ville.syrj...@linux.intel.com wrote:
 From: Ville Syrjälä ville.syrj...@linux.intel.com
 
 The legcy colorkey ioctls are only implemented for sprite planes, so
 reject the ioctl for primary/cursor planes. If we want to support
 colorkeying with these planes (assuming we have hw support of course)
 we should just move ahead with the colorkey property conversion.
 
 Cc: Tommi Rantala tt.rant...@gmail.com
 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com

Testcase: kms_legacy_colorkey
Cc: sta...@vger.kernel.org
Reviewed-by: Daniel Vetter daniel.vet...@ffwll.ch

 ---
  drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
 b/drivers/gpu/drm/i915/intel_sprite.c
 index f41e872..7017384 100644
 --- a/drivers/gpu/drm/i915/intel_sprite.c
 +++ b/drivers/gpu/drm/i915/intel_sprite.c
 @@ -1113,7 +1113,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, 
 void *data,
   drm_modeset_lock_all(dev);
  
   plane = drm_plane_find(dev, set-plane_id);
 - if (!plane) {
 + if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
   ret = -ENOENT;
   goto out_unlock;
   }
 @@ -1145,7 +1145,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, 
 void *data,
   drm_modeset_lock_all(dev);
  
   plane = drm_plane_find(dev, get-plane_id);
 - if (!plane) {
 + if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
   ret = -ENOENT;
   goto out_unlock;
   }
 -- 
 2.0.5
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes

2015-03-29 Thread Tommi Rantala
2015-03-27 19:59 GMT+02:00  ville.syrj...@linux.intel.com:
 From: Ville Syrjälä ville.syrj...@linux.intel.com

 The legcy colorkey ioctls are only implemented for sprite planes, so
 reject the ioctl for primary/cursor planes. If we want to support
 colorkeying with these planes (assuming we have hw support of course)
 we should just move ahead with the colorkey property conversion.

 Cc: Tommi Rantala tt.rant...@gmail.com
 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com

Thanks, this fixes the oopses I was seeing.

Tommi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes

2015-03-28 Thread shuang . he
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: 
shuang...@intel.com)
Task id: 6083
-Summary-
Platform  Delta  drm-intel-nightly  Series Applied
PNV -1  270/270  269/270
ILK  303/303  303/303
SNB -1  304/304  303/304
IVB  337/337  337/337
BYT  287/287  287/287
HSW  361/361  361/361
BDW  309/309  309/309
-Detailed-
Platform  Testdrm-intel-nightly  Series 
Applied
 PNV  igt@gem_userptr_blits@coherency-sync  CRASH(1)PASS(1)  
CRASH(1)PASS(1)
*SNB  igt@kms_rotation_crc@sprite-rotation  PASS(2)  
DMESG_WARN(1)PASS(1)
(dmesg patch 
applied)drm:intel_dp_start_link_train[i915]]*ERROR*failed_to_enable_link_training@failed
 to enable link training
drm:intel_dp_complete_link_train[i915]]*ERROR*failed_to_start_channel_equalization@failed
 to start channel equalization
drm:intel_dp_start_link_train[i915]]*ERROR*too_many_voltage_retries,give_up@too 
many voltage .* give up
drm:intel_dp_complete_link_train[i915]]*ERROR*failed_to_train_DP,aborting@failed
 to train .* aborting
Note: You need to pay more attention to line start with '*'
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes

2015-03-27 Thread ville . syrjala
From: Ville Syrjälä ville.syrj...@linux.intel.com

The legcy colorkey ioctls are only implemented for sprite planes, so
reject the ioctl for primary/cursor planes. If we want to support
colorkeying with these planes (assuming we have hw support of course)
we should just move ahead with the colorkey property conversion.

Cc: Tommi Rantala tt.rant...@gmail.com
Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
---
 drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
b/drivers/gpu/drm/i915/intel_sprite.c
index f41e872..7017384 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1113,7 +1113,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, 
void *data,
drm_modeset_lock_all(dev);
 
plane = drm_plane_find(dev, set-plane_id);
-   if (!plane) {
+   if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
ret = -ENOENT;
goto out_unlock;
}
@@ -1145,7 +1145,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, 
void *data,
drm_modeset_lock_all(dev);
 
plane = drm_plane_find(dev, get-plane_id);
-   if (!plane) {
+   if (!plane || plane-type != DRM_PLANE_TYPE_OVERLAY) {
ret = -ENOENT;
goto out_unlock;
}
-- 
2.0.5

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx