From patchwork Tue Jan 14 22:45:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 11332949 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5939138D for ; Tue, 14 Jan 2020 22:45:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD19024658 for ; Tue, 14 Jan 2020 22:45:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD19024658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5528892E3; Tue, 14 Jan 2020 22:45:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 17545892E3 for ; Tue, 14 Jan 2020 22:45:20 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2020 14:45:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,320,1574150400"; d="scan'208";a="256493651" Received: from mdroper-desk1.fm.intel.com ([10.1.27.64]) by fmsmga002.fm.intel.com with ESMTP; 14 Jan 2020 14:45:19 -0800 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Tue, 14 Jan 2020 14:45:08 -0800 Message-Id: <20200114224508.3302967-1-matthew.d.roper@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC] drm/i915: Restrict legacy color key ioctl to pre-gen12 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since gen12 platform support isn't finalized yet, let's kill off the legacy color key ioctl for this platform; there's no userspace today that can run on this platform that utilizes this legacy ioctl, so we can safely kill it now before it becomes ABI. Color key functionality never got integrated into the property / atomic interface, and the only known open source consumer was the Intel DDX which was never updated to run on platforms beyond gen9. If color keying is desired going forward, it should really be exposed as a property so that it can be applied atomically with other display updates (and should probably be standardized in a way all drivers can choose to support rather than being i915-specific). Arguably we might be able to prohibit this on gen10 and gen11 as well since no open source userspace exists for those platforms that utilizes these ioctls. However there's always the very slight chance that unknown closed source software is actively utilizing the color key ioctl on those platforms, so we should maintain the support there to avoid breaking ABI. Cc: Ville Syrjälä Cc: Chris Wilson Cc: Daniel Vetter Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/display/intel_sprite.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c index fca77ec1e0dd..6e8a4686a406 100644 --- a/drivers/gpu/drm/i915/display/intel_sprite.c +++ b/drivers/gpu/drm/i915/display/intel_sprite.c @@ -2290,6 +2290,14 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data, struct drm_modeset_acquire_ctx ctx; int ret = 0; + /* + * Userspace that uses this legacy interface only exists up through + * gen9. Discontinue support for the interface starting with gen12 so + * that it doesn't become ABI on newer platforms. + */ + if (INTEL_GEN(dev_priv) >= 12) + return -EINVAL; + /* ignore the pointless "none" flag */ set->flags &= ~I915_SET_COLORKEY_NONE;