diff mbox

[08/23] drm/i915: Move HAS_GUC_SCHED definition to platform definition

Message ID 1469036435-18918-9-git-send-email-carlos.santa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Santa, Carlos July 20, 2016, 5:40 p.m. UTC
Moving all GPU features to the platform definition allows for
	- standard place when adding new features from new platforms
	- possible to see supported features when dumping struct
	  definitions

Signed-off-by: Carlos Santa <carlos.santa@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 3 ++-
 drivers/gpu/drm/i915/i915_pci.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Rodrigo Vivi July 20, 2016, 9:07 p.m. UTC | #1
please kill this _sched variation that is just a alias to guc instead....

On Wed, Jul 20, 2016 at 10:40 AM, Carlos Santa <carlos.santa@intel.com> wrote:
> Moving all GPU features to the platform definition allows for
>         - standard place when adding new features from new platforms
>         - possible to see supported features when dumping struct
>           definitions
>
> Signed-off-by: Carlos Santa <carlos.santa@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 3 ++-
>  drivers/gpu/drm/i915/i915_pci.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7186665..2ba441e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -774,6 +774,7 @@ struct intel_csr {
>         func(has_csr) sep \
>         func(has_guc) sep \
>         func(has_guc_ucode) sep \
> +       func(has_guc_sched) sep \
>         func(has_pipe_cxsr) sep \
>         func(has_hotplug) sep \
>         func(cursor_needs_physical) sep \
> @@ -2866,7 +2867,7 @@ struct drm_i915_cmd_table {
>   */
>  #define HAS_GUC(dev)           (INTEL_INFO(dev)->has_guc)
>  #define HAS_GUC_UCODE(dev)     (INTEL_INFO(dev)->has_guc_ucode)
> -#define HAS_GUC_SCHED(dev)     (HAS_GUC(dev))
> +#define HAS_GUC_SCHED(dev)     (INTEL_INFO(dev)->has_guc_sched)
>
>  #define HAS_RESOURCE_STREAMER(dev) (IS_HASWELL(dev) || \
>                                     INTEL_INFO(dev)->gen >= 8)
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 8171915..f2cb5c3 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -328,7 +328,8 @@ static const struct intel_device_info intel_cherryview_info = {
>         .gen = 9, \
>         .has_csr = 1, \
>         .has_guc = 1, \
> -       .has_guc_ucode = 1
> +       .has_guc_ucode = 1, \
> +       .has_guc_sched = 1
>
>  static const struct intel_device_info intel_skylake_info = {
>         BDW_FEATURES,
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7186665..2ba441e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -774,6 +774,7 @@  struct intel_csr {
 	func(has_csr) sep \
 	func(has_guc) sep \
 	func(has_guc_ucode) sep \
+	func(has_guc_sched) sep \
 	func(has_pipe_cxsr) sep \
 	func(has_hotplug) sep \
 	func(cursor_needs_physical) sep \
@@ -2866,7 +2867,7 @@  struct drm_i915_cmd_table {
  */
 #define HAS_GUC(dev)		(INTEL_INFO(dev)->has_guc)
 #define HAS_GUC_UCODE(dev)	(INTEL_INFO(dev)->has_guc_ucode)
-#define HAS_GUC_SCHED(dev)	(HAS_GUC(dev))
+#define HAS_GUC_SCHED(dev)	(INTEL_INFO(dev)->has_guc_sched)
 
 #define HAS_RESOURCE_STREAMER(dev) (IS_HASWELL(dev) || \
 				    INTEL_INFO(dev)->gen >= 8)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 8171915..f2cb5c3 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -328,7 +328,8 @@  static const struct intel_device_info intel_cherryview_info = {
 	.gen = 9, \
 	.has_csr = 1, \
 	.has_guc = 1, \
-	.has_guc_ucode = 1
+	.has_guc_ucode = 1, \
+	.has_guc_sched = 1
 
 static const struct intel_device_info intel_skylake_info = {
 	BDW_FEATURES,