> Subject: [PATCH v2 03/10] drm/i915/alpm: Enable debugfs for DP2.1
> 
> Enable AlPM debug info through lobf debug info.
> 
> Cc: Jouni Högander <[email protected]>
> Signed-off-by: Animesh Manna <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_alpm.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 639941e332f3..779718d0c8dd 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -541,9 +541,15 @@ 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 (connector->base.connector_type ==
> DRM_MODE_CONNECTOR_DisplayPort) {
> +             if (DISPLAY_VER(display) < 35)
> +                     return;
> +     } else if (connector->base.connector_type ==
> DRM_MODE_CONNECTOR_eDP) {
> +             if (DISPLAY_VER(display) < 20)
> +                     return;
> +     } else {
>               return;
> +     }

How about 
if (!((connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort && 
DISPLAY_VER(display) >= 35) ||
      (connector->base.connector_type == DRM_MODE_CONNECTOR_eDP && 
DISPLAY_VER(display) >= 20)))
        return;
Regards,
Suraj Kandpal

> 
>       debugfs_create_file("i915_edp_lobf_debug", 0644, root,
>                           connector, &i915_edp_lobf_debug_fops);
> --
> 2.29.0

Reply via email to