Skip to contentSkip to conversation

ACPI / PMIC: Add support for executing PMIC MIPI sequence elements

PATCH Superseded Hans de Goede 4 participants 11 messages Dec 6, 2018 – Dec 12, 2018

Subsystems (6)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 ACPI / PMIC: Add support for executing PMIC MIPI sequence elements

DSI LCD panels describe an initialization sequence in the Video BIOS Tables using so called MIPI sequences. One possible element in these sequences is a PMIC specific element of 15 bytes.

Although this is not really an ACPI opregion, the ACPI opregion code is the closest thing we have. We need to have support for these PMIC specific MIPI sequence elements somwhere. Since we already instantiate a special platform device for Intel PMICs for the ACPI PMIC OpRegion handler to bind to, with PMIC specific implementations of the OpRegion, the handling of MIPI sequence PMIC elements fits very well in the ACPI PMIC OpRegion code.

This commit adds a new intel_soc_pmic_exec_mipi_pmic_seq_element() function, which is to be backed by a PMIC specific exec_mipi_pmic_seq_element callback. This function will be called by the i915 code to execture MIPI sequence PMIC elements.

---
 drivers/acpi/pmic/intel_pmic.c     | 25 +++++++++++++++++++++++++
 drivers/acpi/pmic/intel_pmic.h     |  1 +
 include/linux/mfd/intel_soc_pmic.h |  2 ++
 3 files changed, 28 insertions(+)
drivers/acpi/pmic/intel_pmic.c +25 -0
index ca18e0d23df9..0d96ca08bb79 100644
@@ -15,6 +15,7 @@
 
 #include <linux/export.h>
 #include <linux/acpi.h>
+#include <linux/mfd/intel_soc_pmic.h>
 #include <linux/regmap.h>
 #include <acpi/acpi_lpat.h>
 #include "intel_pmic.h"
@@ -36,6 +37,8 @@ struct intel_pmic_opregion {
 	struct intel_pmic_regs_handler_ctx ctx;
 };
 
+static struct intel_pmic_opregion *intel_pmic_opregion;
+
 static int pmic_get_reg_bit(int address, struct pmic_table *table,
 			    int count, int *reg, int *bit)
 {
@@ -304,6 +307,7 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 	}
 
 	opregion->data = d;
+	intel_pmic_opregion = opregion;
 	return 0;
 
 out_remove_thermal_handler:
@@ -319,3 +323,24 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 	return ret;
 }
 EXPORT_SYMBOL_GPL(intel_pmic_install_opregion_handler);
+
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data)
+{
+	struct intel_pmic_opregion_data *d;
+
+	if (!intel_pmic_opregion) {
+		pr_warn("%s: No PMIC registered\n", __func__);
+		return;
+	}
+
+	d = intel_pmic_opregion->data;
+	if (!d->exec_mipi_pmic_seq_element) {
+		pr_warn("%s: Not implemented\n", __func__);
+		return;
+	}
+
+	mutex_lock(&intel_pmic_opregion->lock);
+	d->exec_mipi_pmic_seq_element(intel_pmic_opregion->regmap, data);
+	mutex_unlock(&intel_pmic_opregion->lock);
+}
+EXPORT_SYMBOL_GPL(intel_soc_pmic_exec_mipi_pmic_seq_element);
drivers/acpi/pmic/intel_pmic.h +1 -0
index 095afc96952e..5a7bb33d046a 100644
@@ -15,6 +15,7 @@ struct intel_pmic_opregion_data {
 	int (*update_aux)(struct regmap *r, int reg, int raw_temp);
 	int (*get_policy)(struct regmap *r, int reg, int bit, u64 *value);
 	int (*update_policy)(struct regmap *r, int reg, int bit, int enable);
+	void (*exec_mipi_pmic_seq_element)(struct regmap *r, const u8 *data);
 	struct pmic_table *power_table;
 	int power_table_count;
 	struct pmic_table *thermal_table;
include/linux/mfd/intel_soc_pmic.h +2 -0
index ed1dfba5e5f9..ce04ad7d4b6c 100644
@@ -26,4 +26,6 @@ struct intel_soc_pmic {
 	struct device *dev;
 };
 
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data);
+
 #endif	/* __INTEL_SOC_PMIC_H__ */
Signature · 6 lines
2.19.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH v2 2/3 ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC

Implement the exec_mipi_pmic_seq_element callback for the CHT Whiskey Cove PMIC.

On some CHT devices this fixes the LCD panel not lighting up when it was not initialized by the GOP, because an external monitor was plugged in and the GOP initialized only the external monitor.

---
Changes in v2:
-Interpret data passed to the PMIC MIPI elements according to the docs
instead of my own reverse engineered interpretation

---
 drivers/acpi/pmic/intel_pmic_chtwc.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
drivers/acpi/pmic/intel_pmic_chtwc.c +24 -0
index 078b0448f30a..049c0cf3b9ed 100644
@@ -12,6 +12,7 @@
 #include <linux/mfd/intel_soc_pmic.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
+#include <asm/unaligned.h>
 #include "intel_pmic.h"
 
 #define CHT_WC_V1P05A_CTRL		0x6e3b
@@ -231,6 +232,28 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
 	return regmap_update_bits(regmap, reg, bitmask, on ? 1 : 0);
 }
 
+static void intel_cht_wc_exec_mipi_pmic_seq_element(struct regmap *regmap,
+						    const u8 *data)
+{
+	u32 value, mask, reg_address, address;
+	u16 i2c_client_address;
+
+	/* byte 0 aka PMIC Flag is reserved */
+	i2c_client_address	= get_unaligned_le16(data + 1);
+	reg_address		= get_unaligned_le32(data + 3);
+	value			= get_unaligned_le32(data + 7);
+	mask			= get_unaligned_le32(data + 11);
+
+	if (i2c_client_address > 255 || reg_address > 255) {
+		pr_warn("%s warning addresses too big client 0x%x reg 0x%x\n",
+			__func__, i2c_client_address, reg_address);
+		return;
+	}
+
+	address = (i2c_client_address << 8) | reg_address;
+	regmap_update_bits(regmap, address, mask, value);
+}
+
 /*
  * The thermal table and ops are empty, we do not support the Thermal opregion
  * (DPTF) due to lacking documentation.
@@ -238,6 +261,7 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
 static struct intel_pmic_opregion_data intel_cht_wc_pmic_opregion_data = {
 	.get_power		= intel_cht_wc_pmic_get_power,
 	.update_power		= intel_cht_wc_pmic_update_power,
+	.exec_mipi_pmic_seq_element = intel_cht_wc_exec_mipi_pmic_seq_element,
 	.power_table		= power_table,
 	.power_table_count	= ARRAY_SIZE(power_table),
 };
Signature · 6 lines
2.19.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH v2 2/3] ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC

Quoted 38 lines · Hans de Goede

Implement the exec_mipi_pmic_seq_element callback for the CHT Whiskey Cove PMIC.

On some CHT devices this fixes the LCD panel not lighting up when it was not initialized by the GOP, because an external monitor was plugged in and the GOP initialized only the external monitor.

---
Changes in v2:

(quoted diff) +0 -2
-Interpret data passed to the PMIC MIPI elements according to the docs
 instead of my own reverse engineered interpretation
---
 drivers/acpi/pmic/intel_pmic_chtwc.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
drivers/acpi/pmic/intel_pmic_chtwc.c +7 -0
index 078b0448f30a..049c0cf3b9ed 100644
@@ -12,6 +12,7 @@
 #include <linux/mfd/intel_soc_pmic.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
+#include <asm/unaligned.h>
 #include "intel_pmic.h"
 
 #define CHT_WC_V1P05A_CTRL		0x6e3b
@@ -231,6 +232,28 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
 	return regmap_update_bits(regmap, reg, bitmask, on ? 1 : 0);
 }
 
+static void intel_cht_wc_exec_mipi_pmic_seq_element(struct regmap *regmap,
+						    const u8 *data)
+{
+	u32 value, mask, reg_address, address;
+	u16 i2c_client_address;
+

drivers/acpi/pmic/intel_pmic_chtwc.c static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg, · line 250

Quoted 10 lines
drivers/acpi/pmic/intel_pmic_chtwc.c +10 -0
+	/* byte 0 aka PMIC Flag is reserved */
+	i2c_client_address	= get_unaligned_le16(data + 1);
+	reg_address		= get_unaligned_le32(data + 3);
+	value			= get_unaligned_le32(data + 7);
+	mask			= get_unaligned_le32(data + 11);
+
+	if (i2c_client_address > 255 || reg_address > 255) {
+		pr_warn("%s warning addresses too big client 0x%x reg 0x%x\n",
+			__func__, i2c_client_address, reg_address);
+		return;

Here also return an error code instead.

Quoted 19 lines
drivers/acpi/pmic/intel_pmic_chtwc.c +7 -0
+	}
+
+	address = (i2c_client_address << 8) | reg_address;
+	regmap_update_bits(regmap, address, mask, value);
+}
+
 /*
  * The thermal table and ops are empty, we do not support the Thermal opregion
  * (DPTF) due to lacking documentation.
@@ -238,6 +261,7 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
 static struct intel_pmic_opregion_data intel_cht_wc_pmic_opregion_data = {
 	.get_power		= intel_cht_wc_pmic_get_power,
 	.update_power		= intel_cht_wc_pmic_update_power,
+	.exec_mipi_pmic_seq_element = intel_cht_wc_exec_mipi_pmic_seq_element,
 	.power_table		= power_table,
 	.power_table_count	= ARRAY_SIZE(power_table),
 };
Signature · 1 line
2.19.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: [PATCH v2 2/3] ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC

Hi,

Quoted 43 lines · Mika Westerberg
Quoted 42 lines · Hans de Goede

Implement the exec_mipi_pmic_seq_element callback for the CHT Whiskey Cove PMIC.

On some CHT devices this fixes the LCD panel not lighting up when it was not initialized by the GOP, because an external monitor was plugged in and the GOP initialized only the external monitor.

---
Changes in v2:

(quoted diff) +0 -2
-Interpret data passed to the PMIC MIPI elements according to the docs
  instead of my own reverse engineered interpretation
---
  drivers/acpi/pmic/intel_pmic_chtwc.c | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
drivers/acpi/pmic/intel_pmic_chtwc.c +11 -0
index 078b0448f30a..049c0cf3b9ed 100644
@@ -12,6 +12,7 @@
  #include <linux/mfd/intel_soc_pmic.h>
  #include <linux/platform_device.h>
  #include <linux/regmap.h>
+#include <asm/unaligned.h>
  #include "intel_pmic.h"
 
  #define CHT_WC_V1P05A_CTRL		0x6e3b
@@ -231,6 +232,28 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
  	return regmap_update_bits(regmap, reg, bitmask, on ? 1 : 0);
  }
 
+static void intel_cht_wc_exec_mipi_pmic_seq_element(struct regmap *regmap,
+						    const u8 *data)
+{
+	u32 value, mask, reg_address, address;
+	u16 i2c_client_address;
+
+	/* byte 0 aka PMIC Flag is reserved */
+	i2c_client_address	= get_unaligned_le16(data + 1);
+	reg_address		= get_unaligned_le32(data + 3);
+	value			= get_unaligned_le32(data + 7);
Quoted 8 lines

drivers/acpi/pmic/intel_pmic_chtwc.c static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg, · line 250

Quoted 6 lines
drivers/acpi/pmic/intel_pmic_chtwc.c +6 -0
+	mask			= get_unaligned_le32(data + 11);
+
+	if (i2c_client_address > 255 || reg_address > 255) {
+		pr_warn("%s warning addresses too big client 0x%x reg 0x%x\n",
+			__func__, i2c_client_address, reg_address);
+		return;

Here also return an error code instead.

Done for v3.

Regards,

Hans

Quoted 12 lines
Quoted 12 lines
drivers/acpi/pmic/intel_pmic_chtwc.c +6 -0
+	}
+
+	address = (i2c_client_address << 8) | reg_address;
+	regmap_update_bits(regmap, address, mask, value);
+}
+
  /*
   * The thermal table and ops are empty, we do not support the Thermal opregion
   * (DPTF) due to lacking documentation.
@@ -238,6 +261,7 @@ static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg,
  static struct intel_pmic_opregion_data intel_cht_wc_pmic_opregion_data = {
Quoted 8 lines
Quoted 8 lines
drivers/acpi/pmic/intel_pmic_chtwc.c +1 -0
  	.get_power		= intel_cht_wc_pmic_get_power,
  	.update_power		= intel_cht_wc_pmic_update_power,
+	.exec_mipi_pmic_seq_element = intel_cht_wc_exec_mipi_pmic_seq_element,
  	.power_table		= power_table,
  	.power_table_count	= ARRAY_SIZE(power_table),
  };
Signature · 1 line
2.19.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

PATCH v2 3/3 drm/i915/intel_dsi_vbt: Add support for PMIC mipi sequences

In reply to Hans de Goede

Add support for PMIC mipi sequences using the new intel_soc_pmic_exec_mipi_pmic_seq_element function.

---
 drivers/gpu/drm/i915/intel_dsi_vbt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_dsi_vbt.c +5 -0
index f27af47c6e49..6a2ed1ca72e0 100644
@@ -29,6 +29,7 @@
 #include <drm/drm_edid.h>
 #include <drm/i915_drm.h>
 #include <linux/gpio/consumer.h>
+#include <linux/mfd/intel_soc_pmic.h>
 #include <linux/slab.h>
 #include <video/mipi_display.h>
 #include <asm/intel-mid.h>
@@ -371,7 +372,11 @@ static const u8 *mipi_exec_spi(struct intel_dsi *intel_dsi, const u8 *data)
 
 static const u8 *mipi_exec_pmic(struct intel_dsi *intel_dsi, const u8 *data)
 {
+#ifdef CONFIG_PMIC_OPREGION
+	intel_soc_pmic_exec_mipi_pmic_seq_element(data);
+#else
 	DRM_DEBUG_KMS("Skipping PMIC element execution\n");
+#endif
 
 	return data + 15;
 }
Signature · 6 lines
2.19.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH v2 3/3] drm/i915/intel_dsi_vbt: Add support for PMIC mipi sequences

Quoted 2 lines · Hans de Goede

Add support for PMIC mipi sequences using the new intel_soc_pmic_exec_mipi_pmic_seq_element function.

Please document somewhere which machines you've found to need this (commit msg should be sufficient I suppose). Can make it much easier to respond to bug reports like "my machine X with DSI doesn't work".

Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_dsi_vbt.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_dsi_vbt.c +5 -0
index f27af47c6e49..6a2ed1ca72e0 100644
@@ -29,6 +29,7 @@
 #include <drm/drm_edid.h>
 #include <drm/i915_drm.h>
 #include <linux/gpio/consumer.h>
+#include <linux/mfd/intel_soc_pmic.h>
 #include <linux/slab.h>
 #include <video/mipi_display.h>
 #include <asm/intel-mid.h>
@@ -371,7 +372,11 @@ static const u8 *mipi_exec_spi(struct intel_dsi *intel_dsi, const u8 *data)
 
 static const u8 *mipi_exec_pmic(struct intel_dsi *intel_dsi, const u8 *data)
 {
+#ifdef CONFIG_PMIC_OPREGION
+	intel_soc_pmic_exec_mipi_pmic_seq_element(data);
+#else
 	DRM_DEBUG_KMS("Skipping PMIC element execution\n");
+#endif
 
 	return data + 15;
 }
Signature · 1 line
2.19.2
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

Re: [PATCH v2 3/3] drm/i915/intel_dsi_vbt: Add support for PMIC mipi sequences

Hi,

Quoted 8 lines · Ville Syrjälä
Quoted 2 lines · Hans de Goede

Add support for PMIC mipi sequences using the new intel_soc_pmic_exec_mipi_pmic_seq_element function.

Please document somewhere which machines you've found to need this (commit msg should be sufficient I suppose). Can make it much easier to respond to bug reports like "my machine X with DSI doesn't work".

Ok, I've added this info to the commit message for v3 of the patch-set.

Regards,

Hans

Quoted 29 lines
Quoted 29 lines
---
  drivers/gpu/drm/i915/intel_dsi_vbt.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_dsi_vbt.c +5 -0
index f27af47c6e49..6a2ed1ca72e0 100644
@@ -29,6 +29,7 @@
  #include <drm/drm_edid.h>
  #include <drm/i915_drm.h>
  #include <linux/gpio/consumer.h>
+#include <linux/mfd/intel_soc_pmic.h>
  #include <linux/slab.h>
  #include <video/mipi_display.h>
  #include <asm/intel-mid.h>
@@ -371,7 +372,11 @@ static const u8 *mipi_exec_spi(struct intel_dsi *intel_dsi, const u8 *data)
 
  static const u8 *mipi_exec_pmic(struct intel_dsi *intel_dsi, const u8 *data)
  {
+#ifdef CONFIG_PMIC_OPREGION
+	intel_soc_pmic_exec_mipi_pmic_seq_element(data);
+#else
  	DRM_DEBUG_KMS("Skipping PMIC element execution\n");
+#endif
 
Quoted 5 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi_vbt.c +0 -0
  	return data + 15;
  }
Signature · 1 line
2.19.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

✓ Fi.CI.BAT: success for series starting with [v2,1/3] ACPI / PMIC: Add support for executing PMIC MIPI sequence elements

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] ACPI / PMIC: Add support for executing PMIC MIPI sequence elements
URL : https://patchwork.freedesktop.org/series/53662/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5275 -> Patchwork_11035
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/53662/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_11035 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_mmap_gtt@basic-read:
- fi-glk-dsi: PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]

[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (48 -> 44)
------------------------------

Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

Build changes
-------------

* Linux: CI_DRM_5275 -> Patchwork_11035

CI_DRM_5275: 95dba5a17f86524f31cdc13af7d3238351db9a9c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4743: edb2db2cf2b6665d7ba3fa9117263302f6307a4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11035: 7d47b33cf34569f5768f221174c90ff218af8d2b @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7d47b33cf345 drm/i915/intel_dsi_vbt: Add support for PMIC mipi sequences fab666073ace ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC 8a78de6f985d ACPI / PMIC: Add support for executing PMIC MIPI sequence elements

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11035/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

✓ Fi.CI.IGT: success for series starting with [v2,1/3] ACPI / PMIC: Add support for executing PMIC MIPI sequence elements

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] ACPI / PMIC: Add support for executing PMIC MIPI sequence elements
URL : https://patchwork.freedesktop.org/series/53662/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5275_full -> Patchwork_11035_full
====================================================

Summary
-------

**WARNING**

Minor unknown changes coming with Patchwork_11035_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_11035_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_11035_full:

### IGT changes ###

#### Warnings ####

* igt@tools_test@tools_test:
- shard-glk: SKIP -> PASS

Known issues
------------

Here are the changes found in Patchwork_11035_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@pi-ringfull-vebox:
- shard-skl: NOTRUN -> FAIL [fdo#103158]

* igt@i915_suspend@fence-restore-tiled2untiled:
- {shard-iclb}: PASS -> INCOMPLETE [fdo#107713]

* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-skl: NOTRUN -> FAIL [fdo#106641]

* igt@kms_color@pipe-b-degamma:
- shard-skl: PASS -> FAIL [fdo#104782]

* igt@kms_cursor_crc@cursor-256x256-dpms:
- shard-glk: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-256x85-random:
- {shard-iclb}: NOTRUN -> FAIL [fdo#103232]

* igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic:
- shard-hsw: PASS -> DMESG-WARN [fdo#102614]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-apl: PASS -> FAIL [fdo#103167]
- shard-glk: PASS -> FAIL [fdo#103167] +1

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-move:
- {shard-iclb}: PASS -> FAIL [fdo#103167] +2

* igt@kms_panel_fitting@legacy:
- shard-skl: NOTRUN -> FAIL [fdo#105456]

* {igt@kms_plane@pixel-format-pipe-c-planes-source-clamping}:
- shard-apl: PASS -> FAIL [fdo#108948]

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- {shard-iclb}: PASS -> FAIL [fdo#103166]

* igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
- shard-apl: PASS -> FAIL [fdo#103166]

* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +1

* igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
- {shard-iclb}: NOTRUN -> DMESG-WARN [fdo#107724]

* igt@kms_setmode@basic:
- shard-skl: NOTRUN -> FAIL [fdo#99912]

* igt@pm_rpm@gem-mmap-cpu:
- shard-skl: NOTRUN -> INCOMPLETE [fdo#107807]

* igt@pm_rpm@gem-mmap-gtt:
- shard-skl: PASS -> INCOMPLETE [fdo#107807]

* igt@pm_rpm@legacy-planes:
- shard-skl: PASS -> INCOMPLETE [fdo#105959] / [fdo#107807]

#### Possible fixes ####

* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- {shard-iclb}: DMESG-WARN [fdo#107724] / [fdo#107956] -> PASS

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS

* igt@kms_color@pipe-c-legacy-gamma:
- shard-apl: FAIL [fdo#104782] -> PASS

* igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled:
- shard-skl: FAIL [fdo#103184] -> PASS

* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
- shard-skl: FAIL [fdo#108472] -> PASS

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render:
- shard-glk: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-pwrite:
- shard-skl: FAIL [fdo#103167] / [fdo#105682] -> PASS

* igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack:
- {shard-iclb}: DMESG-FAIL [fdo#107724] -> PASS +2

* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-render:
- shard-skl: FAIL [fdo#103167] -> PASS +2

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- {shard-iclb}: DMESG-WARN [fdo#107724] / [fdo#108336] -> PASS +4

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-move:
- {shard-iclb}: FAIL [fdo#103167] -> PASS +4

* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: INCOMPLETE [fdo#104108] / [fdo#106978] -> PASS

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: FAIL [fdo#108145] -> PASS

* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: FAIL [fdo#107815] / [fdo#108145] -> PASS

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-apl: FAIL [fdo#103166] -> PASS +1

* igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
- {shard-iclb}: FAIL [fdo#103166] -> PASS

* igt@kms_plane_multiple@atomic-pipe-c-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS

* {igt@kms_rotation_crc@multiplane-rotation-cropping-top}:
- shard-glk: DMESG-WARN [fdo#105763] / [fdo#106538] -> PASS

* igt@kms_vblank@pipe-a-ts-continuation-idle:
- {shard-iclb}: DMESG-WARN [fdo#107724] -> PASS +20

* igt@perf@blocking:
- shard-hsw: FAIL [fdo#102252] -> PASS

* igt@pm_rpm@i2c:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS

#### Warnings ####

* igt@kms_ccs@pipe-a-crc-primary-rotation-180:
- {shard-iclb}: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#107725]

* igt@kms_cursor_crc@cursor-64x21-random:
- {shard-iclb}: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#103232]

* {igt@kms_rotation_crc@multiplane-rotation-cropping-top}:
- shard-kbl: DMESG-FAIL [fdo#108950] -> DMESG-WARN [fdo#105604]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102252]: https://bugs.freedesktop.org/show_bug.cgi?id=102252
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105456]: https://bugs.freedesktop.org/show_bug.cgi?id=105456
[fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#105959]: https://bugs.freedesktop.org/show_bug.cgi?id=105959
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108336]: https://bugs.freedesktop.org/show_bug.cgi?id=108336
[fdo#108472]: https://bugs.freedesktop.org/show_bug.cgi?id=108472
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

Build changes
-------------

* Linux: CI_DRM_5275 -> Patchwork_11035

CI_DRM_5275: 95dba5a17f86524f31cdc13af7d3238351db9a9c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4743: edb2db2cf2b6665d7ba3fa9117263302f6307a4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11035: 7d47b33cf34569f5768f221174c90ff218af8d2b @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11035/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw
In reply to Hans de Goede
Quoted 53 lines · Hans de Goede

DSI LCD panels describe an initialization sequence in the Video BIOS Tables using so called MIPI sequences. One possible element in these sequences is a PMIC specific element of 15 bytes.

Although this is not really an ACPI opregion, the ACPI opregion code is the closest thing we have. We need to have support for these PMIC specific MIPI sequence elements somwhere. Since we already instantiate a special platform device for Intel PMICs for the ACPI PMIC OpRegion handler to bind to, with PMIC specific implementations of the OpRegion, the handling of MIPI sequence PMIC elements fits very well in the ACPI PMIC OpRegion code.

This commit adds a new intel_soc_pmic_exec_mipi_pmic_seq_element() function, which is to be backed by a PMIC specific exec_mipi_pmic_seq_element callback. This function will be called by the i915 code to execture MIPI sequence PMIC elements.

---
 drivers/acpi/pmic/intel_pmic.c     | 25 +++++++++++++++++++++++++
 drivers/acpi/pmic/intel_pmic.h     |  1 +
 include/linux/mfd/intel_soc_pmic.h |  2 ++
 3 files changed, 28 insertions(+)
drivers/acpi/pmic/intel_pmic.c +4 -0
index ca18e0d23df9..0d96ca08bb79 100644
@@ -15,6 +15,7 @@
 
 #include <linux/export.h>
 #include <linux/acpi.h>
+#include <linux/mfd/intel_soc_pmic.h>
 #include <linux/regmap.h>
 #include <acpi/acpi_lpat.h>
 #include "intel_pmic.h"
@@ -36,6 +37,8 @@ struct intel_pmic_opregion {
 	struct intel_pmic_regs_handler_ctx ctx;
 };
 
+static struct intel_pmic_opregion *intel_pmic_opregion;
+
 static int pmic_get_reg_bit(int address, struct pmic_table *table,
 			    int count, int *reg, int *bit)
 {
@@ -304,6 +307,7 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 	}
 
 	opregion->data = d;
+	intel_pmic_opregion = opregion;
 	return 0;
 
 out_remove_thermal_handler:

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 326

Quoted 4 lines
drivers/acpi/pmic/intel_pmic.c +1 -0
@@ -319,3 +323,24 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 	return ret;
 }
 EXPORT_SYMBOL_GPL(intel_pmic_install_opregion_handler);
+

Since this is exported, please add kernel-doc here.

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 333

Quoted 7 lines
drivers/acpi/pmic/intel_pmic.c +7 -0
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data)
+{
+	struct intel_pmic_opregion_data *d;
+
+	if (!intel_pmic_opregion) {
+		pr_warn("%s: No PMIC registered\n", __func__);
+		return;

Why not return error codes instead?

Other ops in struct intel_pmic_opregion_data seem to do so.

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 339

Quoted 6 lines
drivers/acpi/pmic/intel_pmic.c +6 -0
+	}
+
+	d = intel_pmic_opregion->data;
+	if (!d->exec_mipi_pmic_seq_element) {
+		pr_warn("%s: Not implemented\n", __func__);
+		return;

Ditto.

Quoted 32 lines
drivers/acpi/pmic/intel_pmic.c +7 -0
+	}
+
+	mutex_lock(&intel_pmic_opregion->lock);
+	d->exec_mipi_pmic_seq_element(intel_pmic_opregion->regmap, data);
+	mutex_unlock(&intel_pmic_opregion->lock);
+}
+EXPORT_SYMBOL_GPL(intel_soc_pmic_exec_mipi_pmic_seq_element);
drivers/acpi/pmic/intel_pmic.h +1 -0
index 095afc96952e..5a7bb33d046a 100644
@@ -15,6 +15,7 @@ struct intel_pmic_opregion_data {
 	int (*update_aux)(struct regmap *r, int reg, int raw_temp);
 	int (*get_policy)(struct regmap *r, int reg, int bit, u64 *value);
 	int (*update_policy)(struct regmap *r, int reg, int bit, int enable);
+	void (*exec_mipi_pmic_seq_element)(struct regmap *r, const u8 *data);
 	struct pmic_table *power_table;
 	int power_table_count;
 	struct pmic_table *thermal_table;
include/linux/mfd/intel_soc_pmic.h +2 -0
index ed1dfba5e5f9..ce04ad7d4b6c 100644
@@ -26,4 +26,6 @@ struct intel_soc_pmic {
 	struct device *dev;
 };
 
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data);
+
 #endif	/* __INTEL_SOC_PMIC_H__ */
Signature · 1 line
2.19.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

Hi,

Quoted 52 lines · Mika Westerberg
Quoted 51 lines · Hans de Goede

DSI LCD panels describe an initialization sequence in the Video BIOS Tables using so called MIPI sequences. One possible element in these sequences is a PMIC specific element of 15 bytes.

Although this is not really an ACPI opregion, the ACPI opregion code is the closest thing we have. We need to have support for these PMIC specific MIPI sequence elements somwhere. Since we already instantiate a special platform device for Intel PMICs for the ACPI PMIC OpRegion handler to bind to, with PMIC specific implementations of the OpRegion, the handling of MIPI sequence PMIC elements fits very well in the ACPI PMIC OpRegion code.

This commit adds a new intel_soc_pmic_exec_mipi_pmic_seq_element() function, which is to be backed by a PMIC specific exec_mipi_pmic_seq_element callback. This function will be called by the i915 code to execture MIPI sequence PMIC elements.

---
  drivers/acpi/pmic/intel_pmic.c     | 25 +++++++++++++++++++++++++
  drivers/acpi/pmic/intel_pmic.h     |  1 +
  include/linux/mfd/intel_soc_pmic.h |  2 ++
  3 files changed, 28 insertions(+)
drivers/acpi/pmic/intel_pmic.c +4 -0
index ca18e0d23df9..0d96ca08bb79 100644
@@ -15,6 +15,7 @@
 
  #include <linux/export.h>
  #include <linux/acpi.h>
+#include <linux/mfd/intel_soc_pmic.h>
  #include <linux/regmap.h>
  #include <acpi/acpi_lpat.h>
  #include "intel_pmic.h"
@@ -36,6 +37,8 @@ struct intel_pmic_opregion {
  	struct intel_pmic_regs_handler_ctx ctx;
  };
 
+static struct intel_pmic_opregion *intel_pmic_opregion;
+
  static int pmic_get_reg_bit(int address, struct pmic_table *table,
  			    int count, int *reg, int *bit)
  {
@@ -304,6 +307,7 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
  	}
 
  	opregion->data = d;
+	intel_pmic_opregion = opregion;
  	return 0;
 
Quoted 8 lines

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 326

Quoted 6 lines
drivers/acpi/pmic/intel_pmic.c +1 -0
  out_remove_thermal_handler:
@@ -319,3 +323,24 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
  	return ret;
  }
  EXPORT_SYMBOL_GPL(intel_pmic_install_opregion_handler);
+

Since this is exported, please add kernel-doc here.

Done for v3.

Quoted 11 lines

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 333

Quoted 8 lines
drivers/acpi/pmic/intel_pmic.c +7 -0
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data)
+{
+	struct intel_pmic_opregion_data *d;
+
+	if (!intel_pmic_opregion) {
+		pr_warn("%s: No PMIC registered\n", __func__);
+		return;

Why not return error codes instead?

Quoted 1 line

Other ops in struct intel_pmic_opregion_data seem to do so.

Ok, I've changed the return-type to int and I'm returning error codes for v3 of this patch-set.

Regards,

Hans

Quoted 37 lines

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 339

Quoted 7 lines
drivers/acpi/pmic/intel_pmic.c +6 -0
+	}
+
+	d = intel_pmic_opregion->data;
+	if (!d->exec_mipi_pmic_seq_element) {
+		pr_warn("%s: Not implemented\n", __func__);
+		return;

Ditto.

Quoted 27 lines
drivers/acpi/pmic/intel_pmic.c +7 -0
+	}
+
+	mutex_lock(&intel_pmic_opregion->lock);
+	d->exec_mipi_pmic_seq_element(intel_pmic_opregion->regmap, data);
+	mutex_unlock(&intel_pmic_opregion->lock);
+}
+EXPORT_SYMBOL_GPL(intel_soc_pmic_exec_mipi_pmic_seq_element);
drivers/acpi/pmic/intel_pmic.h +1 -0
index 095afc96952e..5a7bb33d046a 100644
@@ -15,6 +15,7 @@ struct intel_pmic_opregion_data {
  	int (*update_aux)(struct regmap *r, int reg, int raw_temp);
  	int (*get_policy)(struct regmap *r, int reg, int bit, u64 *value);
  	int (*update_policy)(struct regmap *r, int reg, int bit, int enable);
+	void (*exec_mipi_pmic_seq_element)(struct regmap *r, const u8 *data);
  	struct pmic_table *power_table;
  	int power_table_count;
  	struct pmic_table *thermal_table;
include/linux/mfd/intel_soc_pmic.h +0 -0
index ed1dfba5e5f9..ce04ad7d4b6c 100644
@@ -26,4 +26,6 @@ struct intel_soc_pmic {
  	struct device *dev;
  };
 
Quoted 5 lines
Quoted 5 lines
include/linux/mfd/intel_soc_pmic.h +2 -0
+void intel_soc_pmic_exec_mipi_pmic_seq_element(const u8 *data);
+
  #endif	/* __INTEL_SOC_PMIC_H__ */
Signature · 1 line
2.19.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel