Enable ALPM debug info through lobf debug info.

v2: cosmetic change. [Suraj]
v3: Use common api instead of DISPLAY_VER check in multiple places. [Jani]
v4: Add display-version check as it dropped for EDP.

Cc: Jouni Högander <[email protected]>
Reviewed-by: Suraj Kandpal <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c 
b/drivers/gpu/drm/i915/display/intel_alpm.c
index 4801fc6bade2..901493bb1448 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -739,8 +739,10 @@ void intel_alpm_lobf_debugfs_add(struct intel_connector 
*connector)
        struct intel_display *display = to_intel_display(connector);
        struct dentry *root = connector->base.debugfs_entry;
 
-       if (DISPLAY_VER(display) < 20 ||
-           connector->base.connector_type != DRM_MODE_CONNECTOR_eDP)
+       if (DISPLAY_VER(display) < 20)
+               return;
+
+       if (!intel_alpm_source_supported(connector))
                return;
 
        debugfs_create_file("i915_edp_lobf_debug", 0644, root,
-- 
2.29.0

Reply via email to