All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [RFC PATCH 0/5] Dual LFP/EDP enablement
@ 2022-06-02 14:18 Animesh Manna
  2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 1/5] drm/i915/bios: calculate drrs mode using panel index for dual LFP Animesh Manna
                   ` (10 more replies)
  0 siblings, 11 replies; 37+ messages in thread
From: Animesh Manna @ 2022-06-02 14:18 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

This patch series read the separate entry for each
LFP from VBT and populate the structure, which will be used
for enablement of the respective panel.

Port sync implementation is not part of this patch series.
Will be taken up later as per requrement.

This patch series do the initial enablement of dual EDP panel as
per the data provided through VBT.

Animesh Manna (3):
  drm/i915/bios: calculate drrs mode using panel index for dual LFP
  drm/i915/display: Use panel index to parse panel timing for dual EDP
  drm/i915/display: Use panel index to parse lfp backlight

Arun R Murthy (1):
  drm/i915/display: prepend connector name to the backlight

Nischal Varide (1):
  drm/i915/display/tgl+: Use PPS index from vbt

 drivers/gpu/drm/i915/display/icl_dsi.c        |  2 +-
 .../gpu/drm/i915/display/intel_backlight.c    |  2 +
 drivers/gpu/drm/i915/display/intel_bios.c     | 92 +++++++++++++------
 drivers/gpu/drm/i915/display/intel_bios.h     |  3 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |  3 +-
 drivers/gpu/drm/i915/display/intel_lvds.c     |  3 +-
 drivers/gpu/drm/i915/display/intel_pps.c      |  3 +-
 drivers/gpu/drm/i915/display/intel_sdvo.c     |  2 +-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h |  4 +
 drivers/gpu/drm/i915/display/vlv_dsi.c        |  2 +-
 10 files changed, 79 insertions(+), 37 deletions(-)

-- 
2.29.0


^ permalink raw reply	[flat|nested] 37+ messages in thread
* [Intel-gfx] [PATCHv3] drm/i915/display: add support for dual panel backlight
@ 2022-08-03  8:20 Arun R Murthy
  2022-08-03  8:41 ` Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Arun R Murthy @ 2022-08-03  8:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

The patch with commit 20f85ef89d94 ("drm/i915/backlight: use unique
backlight device names") already adds support for dual panel backlight
but with error prints. Since the patch tried to create the backlight
device with the same name and upon failure will try with a different
name it leads to failure logs in dmesg inturn getting caught by CI.

This patch alternately will check if the backlight class of same name
exists, will use a different name.

v2: reworked on top of the patch 20f85ef89d94 ("drm/i915/backlight: use
unique backlight device names")
v3: fixed the ref count leak(Jani N)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 .../gpu/drm/i915/display/intel_backlight.c    | 24 ++++++++-----------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
index 110fc98ec280..1e550d048e86 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -971,26 +971,22 @@ int intel_backlight_device_register(struct intel_connector *connector)
 	if (!name)
 		return -ENOMEM;
 
-	bd = backlight_device_register(name, connector->base.kdev, connector,
-				       &intel_backlight_device_ops, &props);
-
-	/*
-	 * Using the same name independent of the drm device or connector
-	 * prevents registration of multiple backlight devices in the
-	 * driver. However, we need to use the default name for backward
-	 * compatibility. Use unique names for subsequent backlight devices as a
-	 * fallback when the default name already exists.
-	 */
-	if (IS_ERR(bd) && PTR_ERR(bd) == -EEXIST) {
+	if (backlight_device_get_by_name(name)) {
+		/*
+		 * Using the same name independent of the drm device or connector
+		 * prevents registration of multiple backlight devices in the
+		 * driver. However, we need to use the default name for backward
+		 * compatibility. Use unique names for subsequent backlight devices as a
+		 * fallback when the default name already exists.
+		 */
 		kfree(name);
 		name = kasprintf(GFP_KERNEL, "card%d-%s-backlight",
 				 i915->drm.primary->index, connector->base.name);
 		if (!name)
 			return -ENOMEM;
-
-		bd = backlight_device_register(name, connector->base.kdev, connector,
-					       &intel_backlight_device_ops, &props);
 	}
+	bd = backlight_device_register(name, connector->base.kdev, connector,
+				       &intel_backlight_device_ops, &props);
 
 	if (IS_ERR(bd)) {
 		drm_err(&i915->drm,
-- 
2.25.1


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

end of thread, other threads:[~2022-08-22  9:24 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 14:18 [Intel-gfx] [RFC PATCH 0/5] Dual LFP/EDP enablement Animesh Manna
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 1/5] drm/i915/bios: calculate drrs mode using panel index for dual LFP Animesh Manna
2022-06-02 15:07   ` Jani Nikula
2022-06-02 15:11     ` Jani Nikula
2022-06-03  9:43       ` Manna, Animesh
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 2/5] drm/i915/display: Use panel index to parse panel timing for dual EDP Animesh Manna
2022-06-02 15:12   ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 3/5] drm/i915/display: Use panel index to parse lfp backlight Animesh Manna
2022-06-02 15:13   ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 4/5] drm/i915/display: prepend connector name to the backlight Animesh Manna
2022-06-02 15:16   ` Jani Nikula
2022-06-03  3:34     ` Murthy, Arun R
2022-06-03  7:02       ` Jani Nikula
2022-06-21  6:01         ` Murthy, Arun R
2022-06-21  7:17           ` Jani Nikula
2022-07-13  8:17   ` [Intel-gfx] [PATCHv2] drm/i915/display: add support for dual panel backlight Arun R Murthy
2022-08-02 15:00     ` Jani Nikula
2022-08-03  8:10       ` Murthy, Arun R
2022-08-03  8:08     ` [Intel-gfx] [PATCHv3] " Arun R Murthy
2022-08-03  8:19       ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 5/5] drm/i915/display/tgl+: Use PPS index from vbt Animesh Manna
2022-06-02 15:32   ` Jani Nikula
2022-06-03 10:29     ` Manna, Animesh
2022-06-02 16:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Dual LFP/EDP enablement Patchwork
2022-06-02 16:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-06-02 16:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-02 19:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-07-13  9:27 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Dual LFP/EDP enablement (rev2) Patchwork
2022-08-03  8:42 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Dual LFP/EDP enablement (rev3) Patchwork
2022-08-03  8:20 [Intel-gfx] [PATCHv3] drm/i915/display: add support for dual panel backlight Arun R Murthy
2022-08-03  8:41 ` Jani Nikula
2022-08-03 10:09 ` Arun R Murthy
2022-08-03 13:33   ` Jani Nikula
2022-08-08  3:55     ` Murthy, Arun R
2022-08-08  3:57 ` Arun R Murthy
2022-08-22  3:34   ` Murthy, Arun R
2022-08-22  9:23   ` Jani Nikula

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.