* [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE
@ 2018-02-02 20:42 Ville Syrjala
2018-02-02 21:17 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ville Syrjala @ 2018-02-02 20:42 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Deprecate the silly I915_SET_COLORKEY_NONE flag. The obvious
way to disable colorkey is to just set flags to 0, which is
exactly what the intel ddx has been doing all along.
Currently when userspace sets the flags to 0, we end up in a
funny state where colorkey is disabled, but various colorkey
vs. scaling checks still consider colorkey to be enabled, and
thus we don't allow plane scaling to kick in.
In case there is some other userspace out there that actually
uses this flag (unlikely as this is an i915 specific uapi)
we'll keep on accepting it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 1 -
drivers/gpu/drm/i915/intel_display.c | 4 ++--
drivers/gpu/drm/i915/intel_sprite.c | 5 ++++-
include/uapi/drm/i915_drm.h | 4 +++-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index c7984a80706e..0ee32275994a 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -56,7 +56,6 @@ intel_create_plane_state(struct drm_plane *plane)
state->base.plane = plane;
state->base.rotation = DRM_MODE_ROTATE_0;
- state->ckey.flags = I915_SET_COLORKEY_NONE;
return state;
}
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ad8d9c6c40e4..60ba5bb3f34c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4787,7 +4787,7 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
return ret;
/* check colorkey */
- if (plane_state->ckey.flags != I915_SET_COLORKEY_NONE) {
+ if (plane_state->ckey.flags) {
DRM_DEBUG_KMS("[PLANE:%d:%s] scaling with color key not allowed",
intel_plane->base.base.id,
intel_plane->base.name);
@@ -12803,7 +12803,7 @@ intel_check_primary_plane(struct intel_plane *plane,
if (INTEL_GEN(dev_priv) >= 9) {
/* use scaler when colorkey is not required */
- if (state->ckey.flags == I915_SET_COLORKEY_NONE) {
+ if (!state->ckey.flags) {
min_scale = 1;
max_scale = skl_max_scale(to_intel_crtc(crtc), crtc_state);
}
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index aea21a9abf6c..3be22c0fcfb5 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -894,7 +894,7 @@ intel_check_sprite_plane(struct intel_plane *plane,
/* setup can_scale, min_scale, max_scale */
if (INTEL_GEN(dev_priv) >= 9) {
/* use scaler when colorkey is not required */
- if (state->ckey.flags == I915_SET_COLORKEY_NONE) {
+ if (!state->ckey.flags) {
can_scale = 1;
min_scale = 1;
max_scale = skl_max_scale(crtc, crtc_state);
@@ -1074,6 +1074,9 @@ int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
struct drm_modeset_acquire_ctx ctx;
int ret = 0;
+ /* ignore the pointless "none" flag */
+ set->flags &= ~I915_SET_COLORKEY_NONE;
+
/* Make sure we don't try to enable both src & dest simultaneously */
if ((set->flags & (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE)) == (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE))
return -EINVAL;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 536ee4febd74..29fa48e4755d 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -1358,7 +1358,9 @@ struct drm_intel_overlay_attrs {
* active on a given plane.
*/
-#define I915_SET_COLORKEY_NONE (1<<0) /* disable color key matching */
+#define I915_SET_COLORKEY_NONE (1<<0) /* Deprecated. Instead set
+ * flags==0 to disable colorkeying.
+ */
#define I915_SET_COLORKEY_DESTINATION (1<<1)
#define I915_SET_COLORKEY_SOURCE (1<<2)
struct drm_intel_sprite_colorkey {
--
2.13.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE
2018-02-02 20:42 [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE Ville Syrjala
@ 2018-02-02 21:17 ` Chris Wilson
2018-02-05 19:27 ` Ville Syrjälä
2018-02-02 21:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-03 7:32 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-02-02 21:17 UTC (permalink / raw)
To: Ville Syrjala, intel-gfx
Quoting Ville Syrjala (2018-02-02 20:42:31)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Deprecate the silly I915_SET_COLORKEY_NONE flag. The obvious
> way to disable colorkey is to just set flags to 0, which is
> exactly what the intel ddx has been doing all along.
I can confirm that I never realised the flag existed. Just not setting
either the dst or src flags made sense to me.
> Currently when userspace sets the flags to 0, we end up in a
> funny state where colorkey is disabled, but various colorkey
> vs. scaling checks still consider colorkey to be enabled, and
> thus we don't allow plane scaling to kick in.
>
> In case there is some other userspace out there that actually
> uses this flag (unlikely as this is an i915 specific uapi)
> we'll keep on accepting it.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Deprecate I915_SET_COLORKEY_NONE
2018-02-02 20:42 [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE Ville Syrjala
2018-02-02 21:17 ` Chris Wilson
@ 2018-02-02 21:39 ` Patchwork
2018-02-03 7:32 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-02-02 21:39 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Deprecate I915_SET_COLORKEY_NONE
URL : https://patchwork.freedesktop.org/series/37584/
State : success
== Summary ==
Series 37584v1 drm/i915: Deprecate I915_SET_COLORKEY_NONE
https://patchwork.freedesktop.org/api/1.0/series/37584/revisions/1/mbox/
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:418s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:422s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:372s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:482s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:280s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:481s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:492s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:464s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:454s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:562s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:411s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:276s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:508s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:388s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:396s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:408s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:455s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:411s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:456s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:499s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:573s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:426s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:505s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:526s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:495s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:501s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:411s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:430s
fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:392s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:467s
2e76a2952923eba64c4f9baf461613bc42ee997a drm-tip: 2018y-02m-02d-20h-33m-12s UTC integration manifest
5d1c9edf2c98 drm/i915: Deprecate I915_SET_COLORKEY_NONE
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7871/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for drm/i915: Deprecate I915_SET_COLORKEY_NONE
2018-02-02 20:42 [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE Ville Syrjala
2018-02-02 21:17 ` Chris Wilson
2018-02-02 21:39 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-02-03 7:32 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-02-03 7:32 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Deprecate I915_SET_COLORKEY_NONE
URL : https://patchwork.freedesktop.org/series/37584/
State : warning
== Summary ==
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-atomic:
fail -> PASS (shard-hsw) fdo#102670 +1
Test kms_flip:
Subgroup 2x-flip-vs-expired-vblank-interruptible:
fail -> PASS (shard-hsw) fdo#102887
Test kms_draw_crc:
Subgroup fill-fb:
pass -> SKIP (shard-snb)
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS (shard-snb) fdo#104058
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
shard-apl total:2836 pass:1751 dwarn:1 dfail:0 fail:20 skip:1064 time:12360s
shard-hsw total:2836 pass:1732 dwarn:1 dfail:0 fail:12 skip:1090 time:11597s
shard-snb total:2836 pass:1327 dwarn:1 dfail:0 fail:10 skip:1498 time:6377s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7871/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE
2018-02-02 21:17 ` Chris Wilson
@ 2018-02-05 19:27 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-02-05 19:27 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Fri, Feb 02, 2018 at 09:17:08PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-02-02 20:42:31)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Deprecate the silly I915_SET_COLORKEY_NONE flag. The obvious
> > way to disable colorkey is to just set flags to 0, which is
> > exactly what the intel ddx has been doing all along.
>
> I can confirm that I never realised the flag existed. Just not setting
> either the dst or src flags made sense to me.
>
> > Currently when userspace sets the flags to 0, we end up in a
> > funny state where colorkey is disabled, but various colorkey
> > vs. scaling checks still consider colorkey to be enabled, and
> > thus we don't allow plane scaling to kick in.
> >
> > In case there is some other userspace out there that actually
> > uses this flag (unlikely as this is an i915 specific uapi)
> > we'll keep on accepting it.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks. Pushed to dinq.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-05 19:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 20:42 [PATCH] drm/i915: Deprecate I915_SET_COLORKEY_NONE Ville Syrjala
2018-02-02 21:17 ` Chris Wilson
2018-02-05 19:27 ` Ville Syrjälä
2018-02-02 21:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-03 7:32 ` ✗ Fi.CI.IGT: warning " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.