All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Santa <carlos.santa@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH v4 15/22] drm/i915: Introduce GEN3_FEATURES for device info
Date: Wed, 17 Aug 2016 12:30:50 -0700	[thread overview]
Message-ID: <1471462257-24146-16-git-send-email-carlos.santa@intel.com> (raw)
In-Reply-To: <1471462257-24146-1-git-send-email-carlos.santa@intel.com>

Introducing a GEN3_FEATURES macro to simplify the struct definitions by
platforms given that most of the features are common. Inspired by the
GEN7_FEATURES macro done by Ben W. and others.

Use it for i915g, i915gm, i945g, i945gm, g33 and pnv.

CC: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 42 ++++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 66e1266..ca776f5 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -88,39 +88,37 @@ static const struct intel_device_info intel_i865g_info = {
 	CURSOR_OFFSETS,
 };
 
+#define GEN3_FEATURES \
+	.gen = 3, .num_pipes = 2, \
+	.ring_mask = RENDER_RING, \
+	GEN_DEFAULT_PIPEOFFSETS, \
+	CURSOR_OFFSETS
+
 static const struct intel_device_info intel_i915g_info = {
-	.gen = 3, .is_i915g = 1, .cursor_needs_physical = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.is_i915g = 1, .cursor_needs_physical = 1,
 	.has_overlay = 1, .overlay_needs_physical = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 static const struct intel_device_info intel_i915gm_info = {
-	.gen = 3, .is_mobile = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.is_mobile = 1,
 	.cursor_needs_physical = 1,
 	.has_overlay = 1, .overlay_needs_physical = 1,
 	.supports_tv = 1,
 	.has_fbc = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 static const struct intel_device_info intel_i945g_info = {
-	.gen = 3, .has_hotplug = 1, .cursor_needs_physical = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.has_hotplug = 1, .cursor_needs_physical = 1,
 	.has_overlay = 1, .overlay_needs_physical = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 static const struct intel_device_info intel_i945gm_info = {
-	.gen = 3, .is_i945gm = 1, .is_mobile = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.is_i945gm = 1, .is_mobile = 1,
 	.has_hotplug = 1, .cursor_needs_physical = 1,
 	.has_overlay = 1, .overlay_needs_physical = 1,
 	.supports_tv = 1,
 	.has_fbc = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 
 #define GEN4_FEATURES \
@@ -145,12 +143,10 @@ static const struct intel_device_info intel_i965gm_info = {
 };
 
 static const struct intel_device_info intel_g33_info = {
-	.gen = 3, .is_g33 = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.is_g33 = 1,
 	.need_gfx_hws = 1, .has_hotplug = 1,
 	.has_overlay = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 
 static const struct intel_device_info intel_g45_info = {
@@ -170,12 +166,10 @@ static const struct intel_device_info intel_gm45_info = {
 };
 
 static const struct intel_device_info intel_pineview_info = {
-	.gen = 3, .is_g33 = 1, .is_pineview = 1, .is_mobile = 1, .num_pipes = 2,
+	GEN3_FEATURES,
+	.is_g33 = 1, .is_pineview = 1, .is_mobile = 1,
 	.need_gfx_hws = 1, .has_hotplug = 1,
 	.has_overlay = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 
 #define GEN5_FEATURES \
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-08-17 19:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 19:30 [PATCH v4 00/22] drm/i915: Organize most GPU features by platform Carlos Santa
2016-08-17 19:30 ` [PATCH v4 01/22] drm/i915: Move HAS_PSR definition to platform struct definition Carlos Santa
2016-08-17 19:30 ` [PATCH v4 02/22] drm/i915: Remove .is_mobile field from platform struct Carlos Santa
2016-08-17 19:30 ` [PATCH v4 03/22] drm/i915: Introduce GEN6_FEATURES for device info Carlos Santa
2016-08-17 19:30 ` [PATCH v4 04/22] drm/i915: Move HAS_RUNTIME_PM definition to platform Carlos Santa
2016-09-07 22:55   ` Rodrigo Vivi
2016-08-17 19:30 ` [PATCH v4 05/22] drm/i915: Remove runtime PM for SNB Carlos Santa
2016-09-07 22:54   ` Rodrigo Vivi
2016-08-17 19:30 ` [PATCH v4 06/22] drm/i915: Get rid of HAS_CORE_RING_FREQ Carlos Santa
2016-09-07 22:50   ` Rodrigo Vivi
2016-08-17 19:30 ` [PATCH v4 07/22] drm/i915 Move HAS_CSR definition to platform definition Carlos Santa
2016-08-17 19:30 ` [PATCH v4 08/22] drm/i915: Move HAS_RESOURCE_STREAMER " Carlos Santa
2016-08-17 19:30 ` [PATCH v4 09/22] drm/i915: Move HAS_RC6 " Carlos Santa
2016-08-17 19:30 ` [PATCH v4 10/22] drm/i915: Move HAS_RC6p " Carlos Santa
2016-09-07 22:52   ` Rodrigo Vivi
2016-08-17 19:30 ` [PATCH v4 11/22] drm/i915: Move HAS_DP_MST " Carlos Santa
2016-08-17 19:30 ` [PATCH v4 12/22] drm/i915: Introduce GEN5_FEATURES for device info Carlos Santa
2016-08-17 19:30 ` [PATCH v4 13/22] drm/i915: Move HAS_GMBUS_IRQ definition to platform definition Carlos Santa
2016-08-17 19:30 ` [PATCH v4 14/22] drm/i915: Introduce GEN4_FEATURES for device info Carlos Santa
2016-08-17 19:30 ` Carlos Santa [this message]
2016-08-17 19:30 ` [PATCH v4 16/22] drm/i915: Introduce GEN2_FEATURES " Carlos Santa
2016-08-17 19:30 ` [PATCH v4 17/22] drm/i915: Move HAS_HW_CONTEXTS definition to platform Carlos Santa
2016-08-17 19:30 ` [PATCH v4 18/22] drm/i915: Move HAS_LOGICAL_RING_CONTEXTS " Carlos Santa
2016-08-17 19:30 ` [PATCH v4 19/22] drm/i915: Move HAS_L3_DPF definition to platform definition Carlos Santa
2016-08-17 19:30 ` [PATCH v4 20/22] drm/i915: Move HAS_GMCH_DISPLAY definition to platform Carlos Santa
2016-08-17 19:30 ` [PATCH v4 21/22] drm/i915: Make HWS_NEEDS_PHYSICAL the exception Carlos Santa
2016-08-17 19:30 ` [PATCH v4 22/22] drm/i915: Move HAS_GUC definition to platform definition Carlos Santa
2016-08-18  6:22 ` ✗ Ro.CI.BAT: failure for drm/i915: Organize most GPU features by platform (rev4) Patchwork
2016-09-13 16:06 ` [PATCH v4 00/22] drm/i915: Organize most GPU features by platform Rodrigo Vivi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471462257-24146-16-git-send-email-carlos.santa@intel.com \
    --to=carlos.santa@intel.com \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.