Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-07-04 16:09 [Intel-xe] [PATCH 0/1] Synchronize ext/intel_dram.c with the i915 source Lucas De Marchi
@ 2023-07-04 16:09 ` Lucas De Marchi
  0 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2023-07-04 16:09 UTC (permalink / raw)
  To: intel-xe; +Cc: Lucas De Marchi

Synchronize ext/intel_dram.c with the i915 source.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/display/ext/intel_dram.c | 40 ++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/display/ext/intel_dram.c b/drivers/gpu/drm/xe/display/ext/intel_dram.c
index 3e8c413280a5..77b874ef4f22 100644
--- a/drivers/gpu/drm/xe/display/ext/intel_dram.c
+++ b/drivers/gpu/drm/xe/display/ext/intel_dram.c
@@ -464,6 +464,42 @@ static int gen12_get_dram_info(struct drm_i915_private *i915)
 	return icl_pcode_read_mem_global_info(i915);
 }
 
+static int xelpdp_get_dram_info(struct drm_i915_private *i915)
+{
+	u32 val = intel_de_read(i915, MTL_MEM_SS_INFO_GLOBAL);
+	struct dram_info *dram_info = &i915->dram_info;
+
+	switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) {
+	case 0:
+		dram_info->type = INTEL_DRAM_DDR4;
+		break;
+	case 1:
+		dram_info->type = INTEL_DRAM_DDR5;
+		break;
+	case 2:
+		dram_info->type = INTEL_DRAM_LPDDR5;
+		break;
+	case 3:
+		dram_info->type = INTEL_DRAM_LPDDR4;
+		break;
+	case 4:
+		dram_info->type = INTEL_DRAM_DDR3;
+		break;
+	case 5:
+		dram_info->type = INTEL_DRAM_LPDDR3;
+		break;
+	default:
+		MISSING_CASE(val);
+		return -EINVAL;
+	}
+
+	dram_info->num_channels = REG_FIELD_GET(MTL_N_OF_POPULATED_CH_MASK, val);
+	dram_info->num_qgv_points = REG_FIELD_GET(MTL_N_OF_ENABLED_QGV_POINTS_MASK, val);
+	/* PSF GV points not supported in D14+ */
+
+	return 0;
+}
+
 void intel_dram_detect(struct drm_i915_private *i915)
 {
 	struct dram_info *dram_info = &i915->dram_info;
@@ -478,7 +514,9 @@ void intel_dram_detect(struct drm_i915_private *i915)
 	 */
 	dram_info->wm_lv_0_adjust_needed = !IS_GEN9_LP(i915);
 
-	if (GRAPHICS_VER(i915) >= 12)
+	if (DISPLAY_VER(i915) >= 14)
+		ret = xelpdp_get_dram_info(i915);
+	else if (GRAPHICS_VER(i915) >= 12)
 		ret = gen12_get_dram_info(i915);
 	else if (GRAPHICS_VER(i915) >= 11)
 		ret = gen11_get_dram_info(i915);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-06 20:00 [Intel-xe] [PATCH 0/1] Return -EPROBE_DEFER from xe_display_driver_probe_defer() Gustavo Sousa
@ 2023-09-06 20:00 ` Gustavo Sousa
  2023-09-06 20:49   ` Lucas De Marchi
  0 siblings, 1 reply; 10+ messages in thread
From: Gustavo Sousa @ 2023-09-06 20:00 UTC (permalink / raw)
  To: intel-xe

The function xe_display_driver_probe_defer() is supposed to return
-EPROBE_DEFER when not yet ready to continue the probing, but the
current implementation is actually returning 1 instead of the proper
value, which would probably keep the probe operation to be attempted
again. Fix that by returning the expected value in case we need to defer
the probe.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/xe_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index a453946ad108..bf475f9a7e14 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -45,7 +45,10 @@ int xe_display_driver_probe_defer(struct pci_dev *pdev)
 	if (!enable_display)
 		return 0;
 
-	return intel_display_driver_probe_defer(pdev);
+	if (intel_display_driver_probe_defer(pdev))
+		return -EPROBE_DEFER;
+
+	return 0;
 }
 
 static void xe_display_last_close(struct drm_device *dev)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-06 20:00 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
@ 2023-09-06 20:49   ` Lucas De Marchi
  2023-09-06 21:26     ` Gustavo Sousa
  0 siblings, 1 reply; 10+ messages in thread
From: Lucas De Marchi @ 2023-09-06 20:49 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Sep 06, 2023 at 05:00:49PM -0300, Gustavo Sousa wrote:
>The function xe_display_driver_probe_defer() is supposed to return
>-EPROBE_DEFER when not yet ready to continue the probing, but the
>current implementation is actually returning 1 instead of the proper
>value, which would probably keep the probe operation to be attempted
>again. Fix that by returning the expected value in case we need to defer
>the probe.
>
>Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>---
> drivers/gpu/drm/xe/xe_display.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
>index a453946ad108..bf475f9a7e14 100644
>--- a/drivers/gpu/drm/xe/xe_display.c
>+++ b/drivers/gpu/drm/xe/xe_display.c
>@@ -45,7 +45,10 @@ int xe_display_driver_probe_defer(struct pci_dev *pdev)
> 	if (!enable_display)
> 		return 0;
>
>-	return intel_display_driver_probe_defer(pdev);
>+	if (intel_display_driver_probe_defer(pdev))
>+		return -EPROBE_DEFER;

but now we have the odd situation that xe_display_driver_probe_defer()
returns an int (with < 0 as error code) and
intel_display_driver_probe_defer() returns a bool. I'd rather convert
xe_display_driver_probe_defer() to a bool and then force the -EPROBE_DEFER
return code in the caller, like is done by i915_pci_probe().

Lucas De Marchi

>+
>+	return 0;
> }
>
> static void xe_display_last_close(struct drm_device *dev)
>-- 
>2.41.0
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-06 20:49   ` Lucas De Marchi
@ 2023-09-06 21:26     ` Gustavo Sousa
  0 siblings, 0 replies; 10+ messages in thread
From: Gustavo Sousa @ 2023-09-06 21:26 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-xe

Quoting Lucas De Marchi (2023-09-06 17:49:55-03:00)
>On Wed, Sep 06, 2023 at 05:00:49PM -0300, Gustavo Sousa wrote:
>>The function xe_display_driver_probe_defer() is supposed to return
>>-EPROBE_DEFER when not yet ready to continue the probing, but the
>>current implementation is actually returning 1 instead of the proper
>>value, which would probably keep the probe operation to be attempted
>>again. Fix that by returning the expected value in case we need to defer
>>the probe.
>>
>>Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>>---
>> drivers/gpu/drm/xe/xe_display.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>>diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
>>index a453946ad108..bf475f9a7e14 100644
>>--- a/drivers/gpu/drm/xe/xe_display.c
>>+++ b/drivers/gpu/drm/xe/xe_display.c
>>@@ -45,7 +45,10 @@ int xe_display_driver_probe_defer(struct pci_dev *pdev)
>>         if (!enable_display)
>>                 return 0;
>>
>>-        return intel_display_driver_probe_defer(pdev);
>>+        if (intel_display_driver_probe_defer(pdev))
>>+                return -EPROBE_DEFER;
>
>but now we have the odd situation that xe_display_driver_probe_defer()
>returns an int (with < 0 as error code) and
>intel_display_driver_probe_defer() returns a bool. I'd rather convert
>xe_display_driver_probe_defer() to a bool and then force the -EPROBE_DEFER
>return code in the caller, like is done by i915_pci_probe().

Sounds good. Just sent a v2. Thanks!

--
Gustavo Sousa

>
>Lucas De Marchi
>
>>+
>>+        return 0;
>> }
>>
>> static void xe_display_last_close(struct drm_device *dev)
>>-- 
>>2.41.0
>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-xe] [PATCH 0/1] Turn display finalizers into static functions
@ 2023-09-08 14:42 Gustavo Sousa
  2023-09-08 14:42 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
  2023-09-08 17:44 ` [Intel-xe] ✗ CI.Patch_applied: failure for Turn display finalizers into static functions (rev2) Patchwork
  0 siblings, 2 replies; 10+ messages in thread
From: Gustavo Sousa @ 2023-09-08 14:42 UTC (permalink / raw)
  To: intel-xe

Finalizer counterparts of display initializers are registered with
drmm_add_action_or_reset(). Since there are no other explicit users of
them outside of xe_display.c, let's turn them into static functions.

Gustavo Sousa (1):
  fixup! drm/xe/display: Implement display support

 drivers/gpu/drm/xe/xe_display.c |  6 +++---
 drivers/gpu/drm/xe/xe_display.h | 15 +--------------
 2 files changed, 4 insertions(+), 17 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-08 14:42 [Intel-xe] [PATCH 0/1] Turn display finalizers into static functions Gustavo Sousa
@ 2023-09-08 14:42 ` Gustavo Sousa
  2023-09-08 17:41   ` Lucas De Marchi
  2023-09-08 17:44 ` [Intel-xe] ✗ CI.Patch_applied: failure for Turn display finalizers into static functions (rev2) Patchwork
  1 sibling, 1 reply; 10+ messages in thread
From: Gustavo Sousa @ 2023-09-08 14:42 UTC (permalink / raw)
  To: intel-xe

Finalizer counterparts of display initializers are registered with
drmm_add_action_or_reset(). Since there are no other explicit users of
them outside of xe_display.c, let's turn them into static functions.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/xe_display.c |  6 +++---
 drivers/gpu/drm/xe/xe_display.h | 15 +--------------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index a453946ad108..3d15d3ac431f 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -132,7 +132,7 @@ int xe_display_create(struct xe_device *xe)
 	return 0;
 }
 
-void xe_display_fini_nommio(struct drm_device *dev, void *dummy)
+static void xe_display_fini_nommio(struct drm_device *dev, void *dummy)
 {
 	struct xe_device *xe = to_xe_device(dev);
 
@@ -164,7 +164,7 @@ int xe_display_init_nommio(struct xe_device *xe)
 	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_nommio, xe);
 }
 
-void xe_display_fini_noirq(struct drm_device *dev, void *dummy)
+static void xe_display_fini_noirq(struct drm_device *dev, void *dummy)
 {
 	struct xe_device *xe = to_xe_device(dev);
 
@@ -204,7 +204,7 @@ int xe_display_init_noirq(struct xe_device *xe)
 	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_noirq, NULL);
 }
 
-void xe_display_fini_noaccel(struct drm_device *dev, void *dummy)
+static void xe_display_fini_noaccel(struct drm_device *dev, void *dummy)
 {
 	struct xe_device *xe = to_xe_device(dev);
 
diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
index 9e29de012df7..71e0bd27f1eb 100644
--- a/drivers/gpu/drm/xe/xe_display.h
+++ b/drivers/gpu/drm/xe/xe_display.h
@@ -20,13 +20,8 @@ int xe_display_create(struct xe_device *xe);
 void xe_display_info_init(struct xe_device *xe);
 
 int xe_display_init_nommio(struct xe_device *xe);
-void xe_display_fini_nommio(struct drm_device *dev, void *dummy);
-
 int xe_display_init_noirq(struct xe_device *xe);
-void xe_display_fini_noirq(struct drm_device *dev, void *dummy);
-
 int xe_display_init_noaccel(struct xe_device *xe);
-void xe_display_fini_noaccel(struct drm_device *dev, void *dummy);
 
 int xe_display_init(struct xe_device *xe);
 void xe_display_unlink(struct xe_device *xe);
@@ -60,17 +55,9 @@ static inline void xe_display_info_init(struct xe_device *xe) { }
 static inline int
 xe_display_enable(struct pci_dev *pdev, struct drm_driver *driver) { return 0; }
 
-static inline int
-xe_display_init_nommio(struct xe_device *xe) { return 0; }
-static inline void xe_display_fini_nommio(struct drm_device *dev, void *dummy) {}
-
+static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
 static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
-
-static inline void
-xe_display_fini_noirq(struct drm_device *dev, void *dummy) {}
-
 static inline int xe_display_init_noaccel(struct xe_device *xe) { return 0; }
-static inline void xe_display_fini_noaccel(struct drm_device *dev, void *dummy) {}
 
 static inline int xe_display_init(struct xe_device *xe) { return 0; }
 static inline void xe_display_unlink(struct xe_device *xe) {}
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-08 14:42 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
@ 2023-09-08 17:41   ` Lucas De Marchi
  0 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2023-09-08 17:41 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Fri, Sep 08, 2023 at 11:42:35AM -0300, Gustavo Sousa wrote:
>Finalizer counterparts of display initializers are registered with
>drmm_add_action_or_reset(). Since there are no other explicit users of
>them outside of xe_display.c, let's turn them into static functions.
>
>Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

since this is a fixup patch, what about squeezing a few more renames
and cleanups?

1) xe_display_modset_driver_remove()... there was a typo
    s/modset/modeset/ but I think just using xe_display_driver would
    be better
2) Group functions by namespace
3) Remove unused inline function
4) s/unlink/shutdown/ to follow naming nearby


Lucas De Marchi

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index b3ecbbd6d020b..0141fd53a41cf 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -344,12 +344,12 @@ int xe_device_probe(struct xe_device *xe)
  	return 0;
  
  err_fini_display:
-	xe_display_modset_driver_remove(xe);
+	xe_display_driver_remove(xe);
  
  err_irq_shutdown:
  	xe_irq_shutdown(xe);
  err:
-	xe_display_unlink(xe);
+	xe_display_shutdown(xe);
  	return err;
  }
  
@@ -358,14 +358,14 @@ static void xe_device_remove_display(struct xe_device *xe)
  	xe_display_unregister(xe);
  
  	drm_dev_unplug(&xe->drm);
-	xe_display_modset_driver_remove(xe);
+	xe_display_driver_remove(xe);
  }
  
  void xe_device_remove(struct xe_device *xe)
  {
  	xe_device_remove_display(xe);
  
-	xe_display_unlink(xe);
+	xe_display_shutdown(xe);
  
  	xe_irq_shutdown(xe);
  }
diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index 3d15d3ac431f9..32b703af44931 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -236,7 +236,7 @@ int xe_display_init(struct xe_device *xe)
  	return intel_display_driver_probe(xe);
  }
  
-void xe_display_unlink(struct xe_device *xe)
+void xe_display_shutdown(struct xe_device *xe)
  {
  	if (!xe->info.enable_display)
  		return;
@@ -269,7 +269,7 @@ void xe_display_unregister(struct xe_device *xe)
  	intel_display_driver_unregister(xe);
  }
  
-void xe_display_modset_driver_remove(struct xe_device *xe)
+void xe_display_driver_remove(struct xe_device *xe)
  {
  	if (!xe->info.enable_display)
  		return;
diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
index 71e0bd27f1ebe..7e05b4737b0e8 100644
--- a/drivers/gpu/drm/xe/xe_display.h
+++ b/drivers/gpu/drm/xe/xe_display.h
@@ -14,6 +14,7 @@ struct drm_driver;
  
  int xe_display_driver_probe_defer(struct pci_dev *pdev);
  void xe_display_driver_set_hooks(struct drm_driver *driver);
+void xe_display_driver_remove(struct xe_device *xe);
  
  int xe_display_create(struct xe_device *xe);
  
@@ -22,17 +23,14 @@ void xe_display_info_init(struct xe_device *xe);
  int xe_display_init_nommio(struct xe_device *xe);
  int xe_display_init_noirq(struct xe_device *xe);
  int xe_display_init_noaccel(struct xe_device *xe);
-
  int xe_display_init(struct xe_device *xe);
-void xe_display_unlink(struct xe_device *xe);
+void xe_display_shutdown(struct xe_device *xe);
  
  void xe_display_register(struct xe_device *xe);
  void xe_display_unregister(struct xe_device *xe);
-void xe_display_modset_driver_remove(struct xe_device *xe);
  
  void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl);
  void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir);
-
  void xe_display_irq_reset(struct xe_device *xe);
  void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt);
  
@@ -44,27 +42,21 @@ void xe_display_pm_resume(struct xe_device *xe);
  #else
  
  static inline int xe_display_driver_probe_defer(struct pci_dev *pdev) { return 0; }
-
  static inline void xe_display_driver_set_hooks(struct drm_driver *driver) { }
+static inline void xe_display_driver_remove(struct xe_device *xe) {}
  
-static inline int
-xe_display_create(struct xe_device *xe) { return 0; }
+static inline int xe_display_create(struct xe_device *xe) { return 0; }
  
  static inline void xe_display_info_init(struct xe_device *xe) { }
  
-static inline int
-xe_display_enable(struct pci_dev *pdev, struct drm_driver *driver) { return 0; }
-
  static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
  static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
  static inline int xe_display_init_noaccel(struct xe_device *xe) { return 0; }
-
  static inline int xe_display_init(struct xe_device *xe) { return 0; }
-static inline void xe_display_unlink(struct xe_device *xe) {}
+static inline void xe_display_shutdown(struct xe_device *xe) {}
  
  static inline void xe_display_register(struct xe_device *xe) {}
  static inline void xe_display_unregister(struct xe_device *xe) {}
-static inline void xe_display_modset_driver_remove(struct xe_device *xe) {}
  
  static inline void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl) {}
  static inline void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir) {}
>---
> drivers/gpu/drm/xe/xe_display.c |  6 +++---
> drivers/gpu/drm/xe/xe_display.h | 15 +--------------
> 2 files changed, 4 insertions(+), 17 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
>index a453946ad108..3d15d3ac431f 100644
>--- a/drivers/gpu/drm/xe/xe_display.c
>+++ b/drivers/gpu/drm/xe/xe_display.c
>@@ -132,7 +132,7 @@ int xe_display_create(struct xe_device *xe)
> 	return 0;
> }
>
>-void xe_display_fini_nommio(struct drm_device *dev, void *dummy)
>+static void xe_display_fini_nommio(struct drm_device *dev, void *dummy)
> {
> 	struct xe_device *xe = to_xe_device(dev);
>
>@@ -164,7 +164,7 @@ int xe_display_init_nommio(struct xe_device *xe)
> 	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_nommio, xe);
> }
>
>-void xe_display_fini_noirq(struct drm_device *dev, void *dummy)
>+static void xe_display_fini_noirq(struct drm_device *dev, void *dummy)
> {
> 	struct xe_device *xe = to_xe_device(dev);
>
>@@ -204,7 +204,7 @@ int xe_display_init_noirq(struct xe_device *xe)
> 	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_noirq, NULL);
> }
>
>-void xe_display_fini_noaccel(struct drm_device *dev, void *dummy)
>+static void xe_display_fini_noaccel(struct drm_device *dev, void *dummy)
> {
> 	struct xe_device *xe = to_xe_device(dev);
>
>diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
>index 9e29de012df7..71e0bd27f1eb 100644
>--- a/drivers/gpu/drm/xe/xe_display.h
>+++ b/drivers/gpu/drm/xe/xe_display.h
>@@ -20,13 +20,8 @@ int xe_display_create(struct xe_device *xe);
> void xe_display_info_init(struct xe_device *xe);
>
> int xe_display_init_nommio(struct xe_device *xe);
>-void xe_display_fini_nommio(struct drm_device *dev, void *dummy);
>-
> int xe_display_init_noirq(struct xe_device *xe);
>-void xe_display_fini_noirq(struct drm_device *dev, void *dummy);
>-
> int xe_display_init_noaccel(struct xe_device *xe);
>-void xe_display_fini_noaccel(struct drm_device *dev, void *dummy);
>
> int xe_display_init(struct xe_device *xe);
> void xe_display_unlink(struct xe_device *xe);
>@@ -60,17 +55,9 @@ static inline void xe_display_info_init(struct xe_device *xe) { }
> static inline int
> xe_display_enable(struct pci_dev *pdev, struct drm_driver *driver) { return 0; }
>
>-static inline int
>-xe_display_init_nommio(struct xe_device *xe) { return 0; }
>-static inline void xe_display_fini_nommio(struct drm_device *dev, void *dummy) {}
>-
>+static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
> static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
>-
>-static inline void
>-xe_display_fini_noirq(struct drm_device *dev, void *dummy) {}
>-
> static inline int xe_display_init_noaccel(struct xe_device *xe) { return 0; }
>-static inline void xe_display_fini_noaccel(struct drm_device *dev, void *dummy) {}
>
> static inline int xe_display_init(struct xe_device *xe) { return 0; }
> static inline void xe_display_unlink(struct xe_device *xe) {}
>-- 
>2.41.0
>

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-xe] ✗ CI.Patch_applied: failure for Turn display finalizers into static functions (rev2)
  2023-09-08 14:42 [Intel-xe] [PATCH 0/1] Turn display finalizers into static functions Gustavo Sousa
  2023-09-08 14:42 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
@ 2023-09-08 17:44 ` Patchwork
  1 sibling, 0 replies; 10+ messages in thread
From: Patchwork @ 2023-09-08 17:44 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-xe

== Series Details ==

Series: Turn display finalizers into static functions (rev2)
URL   : https://patchwork.freedesktop.org/series/123443/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: ===
Base commit: 92bbb0596 drm/xe/uapi: Remove useless max_page_size
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_device.c:344
error: drivers/gpu/drm/xe/xe_device.c: patch does not apply
error: patch failed: drivers/gpu/drm/xe/xe_display.c:236
error: drivers/gpu/drm/xe/xe_display.c: patch does not apply
error: patch failed: drivers/gpu/drm/xe/xe_display.h:14
error: drivers/gpu/drm/xe/xe_display.h: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: fixup! drm/xe/display: Implement display support
Patch failed at 0001 fixup! drm/xe/display: Implement display support
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-08 18:49 [Intel-xe] [PATCH 0/1] Remove redundant call to intel_init_display_hooks() Gustavo Sousa
@ 2023-09-08 18:49 ` Gustavo Sousa
  2023-09-21  6:50   ` Balasubramani Vivekanandan
  0 siblings, 1 reply; 10+ messages in thread
From: Gustavo Sousa @ 2023-09-08 18:49 UTC (permalink / raw)
  To: intel-xe

In Xe initialization path, the function intel_init_display_hooks() is
being called twice, which is redundant. To remove redundancy, let's
remove one of the calls.

That function sets up hooks that are called from: (i) later in the
initialization path (i.e. intel_display_driver_probe_nogem()), (ii)
resume, or (iii) mode set commits.

In both call sites, none of the scenarios above are reached yet, so it
would be safe to remove the redundant call from either of the two.
However, since intel_display_driver_early_probe() is shared by both i915
and Xe, prefer to remove the call done from xe_display_init_nommio().

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/xe_display.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index a453946ad108..5823e3f2de1c 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -159,8 +159,6 @@ int xe_display_init_nommio(struct xe_device *xe)
 	if (err)
 		return err;
 
-	intel_init_display_hooks(xe);
-
 	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_nommio, xe);
 }
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
  2023-09-08 18:49 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
@ 2023-09-21  6:50   ` Balasubramani Vivekanandan
  0 siblings, 0 replies; 10+ messages in thread
From: Balasubramani Vivekanandan @ 2023-09-21  6:50 UTC (permalink / raw)
  To: Gustavo Sousa, intel-xe

On 08.09.2023 15:49, Gustavo Sousa wrote:
> In Xe initialization path, the function intel_init_display_hooks() is
> being called twice, which is redundant. To remove redundancy, let's
> remove one of the calls.
> 
> That function sets up hooks that are called from: (i) later in the
> initialization path (i.e. intel_display_driver_probe_nogem()), (ii)
> resume, or (iii) mode set commits.
> 
> In both call sites, none of the scenarios above are reached yet, so it
> would be safe to remove the redundant call from either of the two.
> However, since intel_display_driver_early_probe() is shared by both i915
> and Xe, prefer to remove the call done from xe_display_init_nommio().
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Regards,
Bala

> ---
>  drivers/gpu/drm/xe/xe_display.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
> index a453946ad108..5823e3f2de1c 100644
> --- a/drivers/gpu/drm/xe/xe_display.c
> +++ b/drivers/gpu/drm/xe/xe_display.c
> @@ -159,8 +159,6 @@ int xe_display_init_nommio(struct xe_device *xe)
>  	if (err)
>  		return err;
>  
> -	intel_init_display_hooks(xe);
> -
>  	return drmm_add_action_or_reset(&xe->drm, xe_display_fini_nommio, xe);
>  }
>  
> -- 
> 2.41.0
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-21  6:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08 14:42 [Intel-xe] [PATCH 0/1] Turn display finalizers into static functions Gustavo Sousa
2023-09-08 14:42 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-08 17:41   ` Lucas De Marchi
2023-09-08 17:44 ` [Intel-xe] ✗ CI.Patch_applied: failure for Turn display finalizers into static functions (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-09-08 18:49 [Intel-xe] [PATCH 0/1] Remove redundant call to intel_init_display_hooks() Gustavo Sousa
2023-09-08 18:49 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-21  6:50   ` Balasubramani Vivekanandan
2023-09-06 20:00 [Intel-xe] [PATCH 0/1] Return -EPROBE_DEFER from xe_display_driver_probe_defer() Gustavo Sousa
2023-09-06 20:00 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-06 20:49   ` Lucas De Marchi
2023-09-06 21:26     ` Gustavo Sousa
2023-07-04 16:09 [Intel-xe] [PATCH 0/1] Synchronize ext/intel_dram.c with the i915 source Lucas De Marchi
2023-07-04 16:09 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox