public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v3 0/10] eDP DRRS based on frontbuffer tracking
@ 2015-01-09 20:55 Vandana Kannan
  2015-01-09 20:55 ` [PATCH 1/10] drm/i915: Modifying structures related to DRRS Vandana Kannan
                   ` (9 more replies)
  0 siblings, 10 replies; 64+ messages in thread
From: Vandana Kannan @ 2015-01-09 20:55 UTC (permalink / raw)
  To: intel-gfx; +Cc: paulo.r.zanoni, rodrigo.vivi

This patch series inserts DRRS into frontbuffer tracking mechanism.

1. Previous submission for this feature was designed considering only eDP
DRRS. In this series, apart from following fb tracking, changes have been made
to make structures generic so that it can be of use to any other code
addition to support DRRS with other display types.
2. DRRS support is checked based on VBT setting and panel's capability (if
more than one RR is supported).
3. Based on DRRS support availability, related structures are initialized or
cleaned up through calls from enable/disable DDI respectively.
4. Since flip() indicates busyness, changes have been made to invalidate
DRRS during flip. This changes RR back to preferred mode RR. New work to set
low RR is scheduled after a delay of 1 second.
5. This series includes patches to support RR switching on all platforms.

v2: As discussed with Daniel, discarding the patch which added a module
param to specify the delay before entering DRRS. This delay has been fixed
to 1 second.
The call to invalidate DRRS from page_flip still remains - will be
changed (or kept as is) depending on the behavior on Android..
Right now testing is done using vbltest in libdrm.. But i-g-t for DRRS is WIP.

v3: Removed the call to invalidate DRRS from page flip. If DRRS
transitions dont work on Android, then check by adding back this call.
Added documentation patch and a debugfs entry to know DRRS status (this
would be used in i-g-t). Added an RFC patch for i-g-t.

Durgadoss R (1):
  drm/i915: Enable eDP DRRS for CHV

Vandana Kannan (9):
  drm/i915: Modifying structures related to DRRS
  drm/i915: Initialize DRRS delayed work
  drm/i915: Enable/disable DRRS
  drm/i915: DRRS calls based on frontbuffer
  drm/i915/bdw: Add support for DRRS to switch RR
  drm/i915: Support for RR switching on VLV
  Documentation/drm: DocBook integration for DRRS
  drm/i915: Add debugfs entry for DRRS
  kms_drrs: Test DRRS entry and exit

 Documentation/DocBook/drm.tmpl           |  11 ++
 drivers/gpu/drm/i915/i915_debugfs.c      |  18 ++
 drivers/gpu/drm/i915/i915_drv.h          |  32 +++-
 drivers/gpu/drm/i915/i915_reg.h          |   1 +
 drivers/gpu/drm/i915/intel_ddi.c         |   2 +
 drivers/gpu/drm/i915/intel_display.c     |  13 +-
 drivers/gpu/drm/i915/intel_dp.c          | 303 +++++++++++++++++++++++++++----
 drivers/gpu/drm/i915/intel_drv.h         |  26 +--
 drivers/gpu/drm/i915/intel_frontbuffer.c |   2 +
 9 files changed, 340 insertions(+), 68 deletions(-)

-- 
2.0.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 64+ messages in thread
* Re: [PATCH 6/6] drm/i915: Add debugfs entry for DRRS
@ 2015-02-20 14:37 Ramalingam C
  2015-02-23 12:05 ` [PATCH] " Ramalingam C
  0 siblings, 1 reply; 64+ messages in thread
From: Ramalingam C @ 2015-02-20 14:37 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, Paulo Zanoni, Vivi, Rodrigo

Hi,

On Friday 20 February 2015 12:15 AM, Rodrigo Vivi wrote:
> On Fri, Feb 13, 2015 at 2:03 AM, Ramalingam C <ramalingam.c@intel.com> wrote:
>> From: Vandana Kannan <vandana.kannan@intel.com>
>>
>> Adding a debugfs entry to determine if DRRS is supported or not
>>
>> V2: [By Ram]: Following details about the active crtc will be filled
>>          in seq-file of the debugfs
>>          1. Encoder output type
>>          2. DRRS Support on this CRTC
>>          3. DRRS current state
>>          4. Current Vrefresh
>> Format is as follows:
>> CRTC 1:  Output: eDP, DRRS Supported: Yes (Seamless), DRRS_State: DRRS_HIGH_RR, Vrefresh: 60
>> CRTC 2:  Output: HDMI, DRRS Supported : No, VBT DRRS_type: Seamless
>> CRTC 1:  Output: eDP, DRRS Supported: Yes (Seamless), DRRS_State: DRRS_LOW_RR, Vrefresh: 40
>> CRTC 2:  Output: HDMI, DRRS Supported : No, VBT DRRS_type: Seamless
>>
>> V3: [By Ram]: Readability is improved.
>>          Another error case is covered [Daniel]
>>
>> V4: [By Ram]: Current status of the Idleness DRRS along with
>>          the Front buffer bits are added to the debugfs. [Rodrigo]
>>
>> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_debugfs.c |   99 +++++++++++++++++++++++++++++++++++
>>   1 file changed, 99 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>> index 164fa82..e08d63f 100644
>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -2869,6 +2869,104 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
>>          return 0;
>>   }
>>
>> +static void drrs_status_per_crtc(struct seq_file *m,
>> +               struct drm_device *dev, struct intel_crtc *intel_crtc)
>> +{
>> +       struct intel_encoder *intel_encoder;
>> +       struct drm_i915_private *dev_priv = dev->dev_private;
>> +       struct i915_drrs *drrs = &dev_priv->drrs;
>> +       int vrefresh = 0;
>> +
>> +       for_each_encoder_on_crtc(dev, &intel_crtc->base, intel_encoder) {
>> +               /* Encoder connected on this CRTC */
> Do you really need this info here?
Better to have the encoder details
>
>> +               switch (intel_encoder->type) {
>> +               case INTEL_OUTPUT_EDP:
>> +                       seq_puts(m, "Output: eDP, ");
>> +                       break;
>> +               case INTEL_OUTPUT_DSI:
>> +                       seq_puts(m, "Output: DSI, ");
>> +                       break;
>> +               case INTEL_OUTPUT_HDMI:
>> +                       seq_puts(m, "Output: HDMI, ");
>> +                       break;
>> +               case INTEL_OUTPUT_DISPLAYPORT:
>> +                       seq_puts(m, "Output: DP, ");
>> +                       break;
>> +               default:
>> +                       seq_printf(m, "Output: Others (id=%d), ",
>> +                                               intel_encoder->type);
>> +               }
>> +       }
>> +
>> +       if (intel_crtc->config->has_drrs) {
>> +               struct intel_panel *panel;
>> +
>> +               panel = &drrs->dp->attached_connector->panel;
>> +               /* DRRS Supported */
>> +               seq_puts(m, "DRRS Supported: Yes (Seamless), ");
> isn't "Yes" enough? Remind that you might want to parse in the future.
Agreed. Yes alone will be simple.
>
>> +               seq_printf(m, "busy_frontbuffer_bits: 0x%X,\n\t",
>> +                                       drrs->busy_frontbuffer_bits);
>> +
>> +               if (drrs->busy_frontbuffer_bits) {
>> +                       seq_puts(m, "Front buffer: busy, ");
>> +                       seq_puts(m, "Idleness Timer: Suspended, ");
>> +               } else {
>> +                       seq_puts(m, "Front buffer: Idle, ");
>> +                       if (drrs->refresh_rate_type == DRRS_HIGH_RR)
>> +                               seq_puts(m, "Idleness Timer: Ticking, ");
>> +                       else
>> +                               seq_puts(m, "Idleness Timer: Suspended, ");
>> +               }
>> +
>> +               if (drrs->refresh_rate_type == DRRS_HIGH_RR) {
>> +                       seq_puts(m, "DRRS_State: DRRS_HIGH_RR, ");
>> +                       vrefresh = panel->fixed_mode->vrefresh;
>> +               } else if (drrs->refresh_rate_type == DRRS_LOW_RR) {
>> +                       seq_puts(m, "DRRS_State: DRRS_LOW_RR, ");
>> +                       vrefresh = panel->downclock_mode->vrefresh;
>> +               } else {
>> +                       seq_printf(m, "DRRS_State: Unknown(%d), ",
>> +                                               drrs->refresh_rate_type);
>> +               }
> I wonder what it is printed when DRRS is supported but is disabled?
It will be printing as "Idleness Timer: Suspended". I will rename this 
to remove this confusions :)
>
> Also why not print some info like enabled/disabled?
Sure we will do it.
>
>> +               seq_printf(m, "Vrefresh: %d", vrefresh);
>> +
>> +       } else {
>> +               /* DRRS not supported. Print the VBT parameter*/
> Why? Should be better a dmesg when enabling DRRS and print why not supported?
>
> Is VBT only reason for not being supported? Is is information useless
> when drrs is supported?
VBT details and also the lower refresh rate from EDID both are 
controlling factors for DRRS.
If DRRS is not supported only then VBT details are added so that modes 
can be verified along with. Its understood that VBT supports seamless 
type when DRRS is supported

>
>> +               seq_puts(m, "DRRS Supported : No, ");
>> +               if (dev_priv->vbt.drrs_type == STATIC_DRRS_SUPPORT)
>> +                       seq_puts(m, "VBT DRRS_type: Static");
>> +               else if (dev_priv->vbt.drrs_type == SEAMLESS_DRRS_SUPPORT)
>> +                       seq_puts(m, "VBT DRRS_type: Seamless");
>> +               else if (dev_priv->vbt.drrs_type == DRRS_NOT_SUPPORTED)
>> +                       seq_puts(m, "VBT DRRS_type: None");
>> +               else
>> +                       seq_puts(m, "VBT DRRS_type: Unrecognized Value");
>> +       }
>> +       seq_puts(m, "\n");
>> +}
>> +
>> +static int i915_drrs_status(struct seq_file *m, void *unused)
>> +{
>> +       struct drm_info_node *node = m->private;
>> +       struct drm_device *dev = node->minor->dev;
>> +       struct intel_crtc *intel_crtc;
>> +       int active_crtc_cnt = 0;
>> +
>> +       for_each_intel_crtc(dev, intel_crtc) {
>> +               if (intel_crtc->active) {
>> +                       active_crtc_cnt++;
> isn't a bool enough?
> why do you need a counter?
Actually we are disabling the DRRS in case of clone mode on Android.
So I added a counter for active CRTCs. So that we can inform about 
cloned mode.
But here it doesn't make any sense.
>
>> +                       seq_printf(m, "CRTC %d:  ", active_crtc_cnt);
>> +
>> +                       drrs_status_per_crtc(m, dev, intel_crtc);
> Since you are doing this for all active crtcs, have you considered
> indenting all other information per crtc to be more clean when having
> more than one active crtc?
Sure. we can make more presentable.
>
>> +               }
>> +       }
>> +
>> +       if (!active_crtc_cnt)
>> +               seq_puts(m, "No active crtc found\n");
>> +
>> +       return 0;
>> +}
>> +
>>   struct pipe_crc_info {
>>          const char *name;
>>          struct drm_device *dev;
>> @@ -4483,6 +4581,7 @@ static const struct drm_info_list i915_debugfs_list[] = {
>>          {"i915_dp_mst_info", i915_dp_mst_info, 0},
>>          {"i915_wa_registers", i915_wa_registers, 0},
>>          {"i915_ddb_info", i915_ddb_info, 0},
>> +       {"i915_drrs_status", i915_drrs_status, 0},
>>   };
>>   #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
>>
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
I will submit a patch for this by monday.

-- 
Ram

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-03-05 13:03 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 20:55 [PATCH v3 0/10] eDP DRRS based on frontbuffer tracking Vandana Kannan
2015-01-09 20:55 ` [PATCH 1/10] drm/i915: Modifying structures related to DRRS Vandana Kannan
2015-01-14  1:27   ` Rodrigo Vivi
2015-01-22  6:48     ` Daniel Vetter
2015-01-22 11:35       ` Ramalingam C
2015-01-09 20:55 ` [PATCH 2/10] drm/i915: Initialize DRRS delayed work Vandana Kannan
2015-01-11 12:52   ` Chris Wilson
2015-01-21 11:04     ` Ramalingam C
2015-01-22  9:44       ` [PATCH] " Ramalingam C
2015-01-23 23:24         ` Rodrigo Vivi
2015-01-09 20:55 ` [PATCH 3/10] drm/i915: Enable/disable DRRS Vandana Kannan
2015-01-15 22:46   ` Rodrigo Vivi
2015-01-21 11:15     ` Ramalingam C
2015-01-22  9:47       ` [PATCH] " Ramalingam C
2015-01-23 23:25         ` Rodrigo Vivi
2015-01-26  7:31         ` Daniel Vetter
2015-01-26 19:00           ` Rodrigo Vivi
2015-01-09 20:55 ` [PATCH 4/10] drm/i915: DRRS calls based on frontbuffer Vandana Kannan
2015-01-15 22:49   ` Rodrigo Vivi
2015-01-26  7:44     ` Daniel Vetter
2015-02-11 12:43   ` [PATCH 1/6] drm/i915: Add support for DRRS in intel_dp_set_m_n Ramalingam C
2015-02-11 12:58     ` Ramalingam C
2015-01-09 20:56 ` [PATCH 5/10] drm/i915/bdw: Add support for DRRS to switch RR Vandana Kannan
2015-01-15 23:00   ` Rodrigo Vivi
2015-01-21 11:19     ` Ramalingam C
2015-01-22  9:50       ` [PATCH] " Ramalingam C
2015-01-22 16:40         ` Ramalingam C
2015-01-24  0:00           ` Rodrigo Vivi
2015-02-11 12:48             ` Ramalingam C
2015-01-09 20:56 ` [PATCH 6/10] drm/i915: Support for RR switching on VLV Vandana Kannan
2015-01-15 23:06   ` Rodrigo Vivi
2015-01-09 20:56 ` [PATCH 7/10] drm/i915: Enable eDP DRRS for CHV Vandana Kannan
2015-01-15 23:11   ` Rodrigo Vivi
2015-01-21 12:13     ` Ramalingam C
2015-01-21 15:03       ` Rodrigo Vivi
2015-01-22 10:54         ` Ramalingam C
2015-01-24  0:05   ` Rodrigo Vivi
2015-01-09 20:56 ` [PATCH 8/10] Documentation/drm: DocBook integration for DRRS Vandana Kannan
2015-01-15 23:16   ` Rodrigo Vivi
2015-01-20  9:12     ` Daniel Vetter
2015-01-09 20:56 ` [PATCH 9/10] drm/i915: Add debugfs entry " Vandana Kannan
2015-01-11 12:40   ` Chris Wilson
2015-01-15 23:18     ` Rodrigo Vivi
2015-01-21 12:26       ` Ramalingam C
2015-01-22 16:45         ` [PATCH] " Ramalingam C
2015-01-23 16:03           ` Daniel Vetter
2015-01-23 17:47             ` Ramalingam C
2015-01-23 17:52               ` Ramalingam C
2015-01-24  0:13                 ` Rodrigo Vivi
2015-02-11 12:52                   ` Ramalingam C
2015-01-09 20:56 ` [PATCH 10/10] kms_drrs: Test DRRS entry and exit Vandana Kannan
2015-01-15 23:24   ` Rodrigo Vivi
2015-01-20  9:11     ` Daniel Vetter
2015-01-21 12:31       ` Ramalingam C
  -- strict thread matches above, loose matches on Subject: below --
2015-02-20 14:37 [PATCH 6/6] drm/i915: Add debugfs entry for DRRS Ramalingam C
2015-02-23 12:05 ` [PATCH] " Ramalingam C
2015-02-23 18:19   ` Rodrigo Vivi
2015-03-03 12:20     ` Ramalingam C
2015-02-24  0:39   ` Daniel Vetter
2015-02-27 13:59     ` Ramalingam C
2015-03-03 15:23       ` Ramalingam C
2015-03-04 23:00         ` Rodrigo Vivi
2015-03-05 11:18           ` Daniel Vetter
2015-03-05 11:22             ` Ramalingam C
2015-03-05 13:04               ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox