From patchwork Wed May 4 19:07:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Souza, Jose" X-Patchwork-Id: 12838430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BC91AC433FE for ; Wed, 4 May 2022 19:07:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 840A910E9AF; Wed, 4 May 2022 19:07:31 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67E8210E91A for ; Wed, 4 May 2022 19:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651691249; x=1683227249; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vIynpL4BgbOpDpCqyJsQvV0lr6qCrRINV7asH+DtUzM=; b=eESRNnL2ee8ScH5sMN26p9F8U2dm49EXcLeOcnpDx45y0EDGQtz2vem3 q+WpGaaJpt110XhOJBWVRJicXgNzz+OmSJ6pliF+4SNgGX5DHeqzTVLAV IzY34rIM0+E6/TxLq9zuxVe/XU90/KgHiT0/UMVcTu9YAJpKteymS1sKN rXUEI0zXzqsJBWNl/Xzaez2L12l1gvIypNUJap4C7wp53CIIAPxNkVG9K U9b03vy4br9jil4QbNOCX2B2scGIjHVcaIDd8ePFOpEPHSwWuaiSsEhkl ibB21W8qj4RC9X81WH0ZnMfQZ6aCMGKi0+e+7qazBvj6FZ4i61WgH9ent g==; X-IronPort-AV: E=McAfee;i="6400,9594,10337"; a="249854510" X-IronPort-AV: E=Sophos;i="5.91,199,1647327600"; d="scan'208";a="249854510" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 12:07:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,199,1647327600"; d="scan'208";a="517162878" Received: from unknown (HELO josouza-mobl2.fso.intel.com) ([10.230.18.139]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 12:07:28 -0700 From: =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= To: intel-gfx@lists.freedesktop.org Date: Wed, 4 May 2022 12:07:56 -0700 Message-Id: <20220504190756.466270-12-jose.souza@intel.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504190756.466270-1-jose.souza@intel.com> References: <20220504190756.466270-1-jose.souza@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 12/12] drm/i915: Drop supports_tv from device info 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" Only four platforms ever support this feature so we can elimitate this from device info and use platform checks instead. Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 4 ---- drivers/gpu/drm/i915/intel_device_info.h | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index d866287c663a2..3c5980d174f81 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1286,7 +1286,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, */ #define HAS_128_BYTE_Y_TILING(dev_priv) (GRAPHICS_VER(dev_priv) != 2 && \ !(IS_I915G(dev_priv) || IS_I915GM(dev_priv))) -#define SUPPORTS_TV(dev_priv) (INTEL_INFO(dev_priv)->display.supports_tv) +#define SUPPORTS_TV(dev_priv) (IS_I915GM(dev_priv) || IS_I945GM(dev_priv) || \ + IS_I965GM(dev_priv) || IS_GM45(dev_priv)) #define I915_HAS_HOTPLUG(dev_priv) (INTEL_INFO(dev_priv)->display.has_hotplug) #define HAS_FW_BLC(dev_priv) (DISPLAY_VER(dev_priv) > 2) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index c6e99305e24d0..184a1eb6e2fce 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -259,7 +259,6 @@ static const struct intel_device_info i915gm_info = { .display.cursor_needs_physical = 1, .display.has_overlay = 1, .display.overlay_needs_physical = 1, - .display.supports_tv = 1, .display.fbc_mask = BIT(INTEL_FBC_A), .hws_needs_physical = 1, .unfenced_needs_alignment = 1, @@ -284,7 +283,6 @@ static const struct intel_device_info i945gm_info = { .display.cursor_needs_physical = 1, .display.has_overlay = 1, .display.overlay_needs_physical = 1, - .display.supports_tv = 1, .display.fbc_mask = BIT(INTEL_FBC_A), .hws_needs_physical = 1, .unfenced_needs_alignment = 1, @@ -346,7 +344,6 @@ static const struct intel_device_info i965gm_info = { .is_mobile = 1, .display.fbc_mask = BIT(INTEL_FBC_A), .display.has_overlay = 1, - .display.supports_tv = 1, .hws_needs_physical = 1, .has_snoop = false, }; @@ -363,7 +360,6 @@ static const struct intel_device_info gm45_info = { PLATFORM(INTEL_GM45), .is_mobile = 1, .display.fbc_mask = BIT(INTEL_FBC_A), - .display.supports_tv = 1, .platform_engine_mask = BIT(RCS0) | BIT(VCS0), .gpu_reset_clobbers_display = false, }; diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h index bea9f92e2264c..a1d111fc83346 100644 --- a/drivers/gpu/drm/i915/intel_device_info.h +++ b/drivers/gpu/drm/i915/intel_device_info.h @@ -174,8 +174,7 @@ enum intel_ppgtt_type { func(has_hti); \ func(has_modular_fia); \ func(has_overlay); \ - func(overlay_needs_physical); \ - func(supports_tv); + func(overlay_needs_physical); struct ip_version { u8 ver;