diff mbox series

drm/i915/debugfs: xelpd lpsp capability

Message ID 20210709115420.25381-1-anshuman.gupta@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/debugfs: xelpd lpsp capability | expand

Commit Message

Gupta, Anshuman July 9, 2021, 11:54 a.m. UTC
Extend i915_lpsp_capability sysfs to xelpd and future platforms.

Cc: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Daniel Vetter July 9, 2021, 3:21 p.m. UTC | #1
On Fri, Jul 9, 2021 at 2:12 PM Anshuman Gupta <anshuman.gupta@intel.com> wrote:
>
> Extend i915_lpsp_capability sysfs to xelpd and future platforms.

You're talking about sysfs but the patch is toucing a _debugfs.c file.
Something is very, very wrong here, either the commit message, or
worse, the code that's there already.

If this is indeed sysfs it must be split out asap, and ideally also
documented and all that, because sysfs is uapi.
-Daniel

>
> Cc: Animesh Manna <animesh.manna@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index af9e58619667..75d991a0707e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -2255,6 +2255,11 @@ static int i915_lpsp_capability_show(struct seq_file *m, void *data)
>         if (connector->status != connector_status_connected)
>                 return -ENODEV;
>
> +       if (DISPLAY_VER(i915) >= 13) {
> +               LPSP_CAPABLE(encoder->port <= PORT_B);
> +               return 0;
> +       }
> +
>         switch (DISPLAY_VER(i915)) {
>         case 12:
>                 /*
> --
> 2.26.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Gupta, Anshuman July 12, 2021, 5:43 a.m. UTC | #2
> -----Original Message-----
> From: Daniel Vetter <daniel@ffwll.ch>
> Sent: Friday, July 9, 2021 8:52 PM
> To: Gupta, Anshuman <anshuman.gupta@intel.com>
> Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/debugfs: xelpd lpsp capability
> 
> On Fri, Jul 9, 2021 at 2:12 PM Anshuman Gupta <anshuman.gupta@intel.com>
> wrote:
> >
> > Extend i915_lpsp_capability sysfs to xelpd and future platforms.
> 
> You're talking about sysfs but the patch is toucing a _debugfs.c file.
> Something is very, very wrong here, either the commit message, or worse, the
> code that's there already.
> 
> If this is indeed sysfs it must be split out asap, and ideally also documented and
> all that, because sysfs is uapi
Thanks for pointing this out.
I will fix the commit log in next version , it is debugfs under /sys/kernel/debug/dri/*
Br,
Anshuman Gupta
> -Daniel
> 
> >
> > Cc: Animesh Manna <animesh.manna@intel.com>
> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > index af9e58619667..75d991a0707e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> > @@ -2255,6 +2255,11 @@ static int i915_lpsp_capability_show(struct seq_file
> *m, void *data)
> >         if (connector->status != connector_status_connected)
> >                 return -ENODEV;
> >
> > +       if (DISPLAY_VER(i915) >= 13) {
> > +               LPSP_CAPABLE(encoder->port <= PORT_B);
> > +               return 0;
> > +       }
> > +
> >         switch (DISPLAY_VER(i915)) {
> >         case 12:
> >                 /*
> > --
> > 2.26.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Manna, Animesh July 12, 2021, 6:58 a.m. UTC | #3
> -----Original Message-----
> From: Gupta, Anshuman <anshuman.gupta@intel.com>
> Sent: Friday, July 9, 2021 5:24 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Gupta, Anshuman <anshuman.gupta@intel.com>; Manna, Animesh
> <animesh.manna@intel.com>
> Subject: [PATCH] drm/i915/debugfs: xelpd lpsp capability

The same change is applicable for both hpg and lpg architecture. Need to modify the subject line to accommodate it.

Regards,
Animesh

> 
> Extend i915_lpsp_capability sysfs to xelpd and future platforms.
> 
> Cc: Animesh Manna <animesh.manna@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index af9e58619667..75d991a0707e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -2255,6 +2255,11 @@ static int i915_lpsp_capability_show(struct seq_file
> *m, void *data)
>  	if (connector->status != connector_status_connected)
>  		return -ENODEV;
> 
> +	if (DISPLAY_VER(i915) >= 13) {
> +		LPSP_CAPABLE(encoder->port <= PORT_B);
> +		return 0;
> +	}
> +
>  	switch (DISPLAY_VER(i915)) {
>  	case 12:
>  		/*
> --
> 2.26.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index af9e58619667..75d991a0707e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -2255,6 +2255,11 @@  static int i915_lpsp_capability_show(struct seq_file *m, void *data)
 	if (connector->status != connector_status_connected)
 		return -ENODEV;
 
+	if (DISPLAY_VER(i915) >= 13) {
+		LPSP_CAPABLE(encoder->port <= PORT_B);
+		return 0;
+	}
+
 	switch (DISPLAY_VER(i915)) {
 	case 12:
 		/*