From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: clean up LPSP capable
Date: Thu, 02 Sep 2021 14:14:03 +0300 [thread overview]
Message-ID: <87fsun9qmc.fsf@intel.com> (raw)
In-Reply-To: <YS+m0TVfFXrBkcjy@intel.com>
On Wed, 01 Sep 2021, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Mon, Aug 30, 2021 at 03:53:41PM +0300, Jani Nikula wrote:
>> Clean up the LPSP capability printout. No functional changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Thanks, pushed the first two for starters.
BR,
Jani.
>
>> ---
>> .../drm/i915/display/intel_display_debugfs.c | 44 +++++++------------
>> 1 file changed, 17 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> index d2a14a9c6857..a6dcb95cfc1f 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> @@ -2225,14 +2225,12 @@ static int i915_psr_status_show(struct seq_file *m, void *data)
>> }
>> DEFINE_SHOW_ATTRIBUTE(i915_psr_status);
>>
>> -#define LPSP_CAPABLE(COND) (COND ? seq_puts(m, "LPSP: capable\n") : \
>> - seq_puts(m, "LPSP: incapable\n"))
>> -
>> static int i915_lpsp_capability_show(struct seq_file *m, void *data)
>> {
>> struct drm_connector *connector = m->private;
>> struct drm_i915_private *i915 = to_i915(connector->dev);
>> struct intel_encoder *encoder;
>> + bool lpsp_capable = false;
>>
>> encoder = intel_attached_encoder(to_intel_connector(connector));
>> if (!encoder)
>> @@ -2241,35 +2239,27 @@ 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:
>> + if (DISPLAY_VER(i915) >= 13)
>> + lpsp_capable = encoder->port <= PORT_B;
>> + else if (DISPLAY_VER(i915) >= 12)
>> /*
>> * Actually TGL can drive LPSP on port till DDI_C
>> * but there is no physical connected DDI_C on TGL sku's,
>> * even driver is not initilizing DDI_C port for gen12.
>> */
>> - LPSP_CAPABLE(encoder->port <= PORT_B);
>> - break;
>> - case 11:
>> - LPSP_CAPABLE(connector->connector_type == DRM_MODE_CONNECTOR_DSI ||
>> - connector->connector_type == DRM_MODE_CONNECTOR_eDP);
>> - break;
>> - case 10:
>> - case 9:
>> - LPSP_CAPABLE(encoder->port == PORT_A &&
>> - (connector->connector_type == DRM_MODE_CONNECTOR_DSI ||
>> - connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
>> - connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort));
>> - break;
>> - default:
>> - if (IS_HASWELL(i915) || IS_BROADWELL(i915))
>> - LPSP_CAPABLE(connector->connector_type == DRM_MODE_CONNECTOR_eDP);
>> - }
>> + lpsp_capable = encoder->port <= PORT_B;
>> + else if (DISPLAY_VER(i915) == 11)
>> + lpsp_capable = (connector->connector_type == DRM_MODE_CONNECTOR_DSI ||
>> + connector->connector_type == DRM_MODE_CONNECTOR_eDP);
>> + else if (IS_DISPLAY_VER(i915, 9, 10))
>> + lpsp_capable = (encoder->port == PORT_A &&
>> + (connector->connector_type == DRM_MODE_CONNECTOR_DSI ||
>> + connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
>> + connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort));
>> + else if (IS_HASWELL(i915) || IS_BROADWELL(i915))
>> + lpsp_capable = connector->connector_type == DRM_MODE_CONNECTOR_eDP;
>> +
>> + seq_printf(m, "LPSP: %s\n", lpsp_capable ? "capable" : "incapable");
>>
>> return 0;
>> }
>> --
>> 2.20.1
>>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-09-02 11:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 12:53 [Intel-gfx] [PATCH 0/5] drm/i915/display: debugfs cleanups Jani Nikula
2021-08-30 12:53 ` [Intel-gfx] [PATCH 1/5] drm/i915/debugfs: clean up LPSP status Jani Nikula
2021-09-01 16:13 ` Rodrigo Vivi
2021-08-30 12:53 ` [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: clean up LPSP capable Jani Nikula
2021-09-01 16:14 ` Rodrigo Vivi
2021-09-02 11:14 ` Jani Nikula [this message]
2021-08-30 12:53 ` [Intel-gfx] [PATCH 3/5] drm/i915/debugfs: register LPSP capability on all platforms Jani Nikula
2021-09-01 16:19 ` Rodrigo Vivi
2021-08-30 12:53 ` [Intel-gfx] [PATCH 4/5] drm/i915/display: stop returning errors from debugfs registration Jani Nikula
2021-09-01 16:20 ` Rodrigo Vivi
2021-09-01 17:02 ` Jani Nikula
2021-09-02 12:15 ` Vivi, Rodrigo
2021-08-30 12:53 ` [Intel-gfx] [PATCH 5/5] drm/i915/debugfs: pass intel_connector to intel_connector_debugfs_add() Jani Nikula
2021-08-30 14:02 ` [Intel-gfx] [PATCH v2] " Jani Nikula
2021-08-30 20:48 ` [Intel-gfx] [PATCH 5/5] " kernel test robot
2021-08-30 20:48 ` kernel test robot
2021-08-31 16:00 ` kernel test robot
2021-08-31 16:00 ` kernel test robot
2021-09-01 16:09 ` Rodrigo Vivi
2021-09-01 16:11 ` Rodrigo Vivi
2021-09-01 17:03 ` Jani Nikula
2021-08-30 13:31 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/display: debugfs cleanups Patchwork
2021-08-30 14:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: debugfs cleanups (rev2) Patchwork
2021-08-30 16:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsun9qmc.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.