From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "C, Ramalingam" <ramalingam.c@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH v2 1/2] drm/i915: Runtime disable for eDP DRRS
Date: Tue, 21 Nov 2017 12:59:33 -0800 [thread overview]
Message-ID: <20171121205933.g2bsj2zkda5bncsr@intel.com> (raw)
In-Reply-To: <3E576CE581B70742841A8994F80CE2EE4C9071D4@BGSMSX104.gar.corp.intel.com>
On Sun, Nov 19, 2017 at 02:55:06PM +0000, C, Ramalingam wrote:
> Thanks for reviewing these changes Rodrigo.
>
> > -----Original Message-----
> > From: Vivi, Rodrigo
> > Sent: Saturday, November 18, 2017 12:24 AM
> > To: C, Ramalingam <ramalingam.c@intel.com>
> > Cc: Zanoni, Paulo R <paulo.r.zanoni@intel.com>; intel-
> > gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: Runtime disable for eDP DRRS
> >
> > On Tue, Nov 07, 2017 at 06:38:23PM +0000, Ramalingam C wrote:
> > > From: "C, Ramalingam" <ramalingam.c@intel.com>
> > >
> > > Debugfs called i915_drrs_ctl is added to enable and disable the eDP
> > > DRRS. Writing 0 will disable the feature, whereas non-zero will enable
> > > the feature.
> > >
> > > Possibility of disabling the DRRS, enables the testing of the
> > > frontbuffer tracking based features (FBC, DRRS and PSR) as standalone
> > > or any combination of the set.
> > >
> > > [v2]: ctl interface is moved from module parameter to debugfs
> > > [Rodrigo]
> >
> > Thanks
> >
> > >
> > > Signed-off-by: C, Ramalingam <ramalingam.c@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/i915_debugfs.c | 43
> > > ++++++++++++++++++++++++++++++++++++-
> > > 1 file changed, 42 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> > > b/drivers/gpu/drm/i915/i915_debugfs.c
> > > index 0bb6e01121fc..0c1501fe4c9f 100644
> > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > @@ -4747,6 +4747,46 @@ static const struct file_operations
> > i915_hpd_storm_ctl_fops = {
> > > .write = i915_hpd_storm_ctl_write
> > > };
> > >
> > > +static int i915_drrs_ctl_set(void *data, u64 val) {
> > > + struct drm_i915_private *dev_priv = data;
> > > + struct drm_device *dev = &dev_priv->drm;
> > > + struct intel_crtc *intel_crtc;
> > > + struct intel_encoder *encoder;
> > > + struct intel_dp *intel_dp;
> > > +
> > > + if (INTEL_GEN(dev_priv) < 7)
> >
> > I believe we need to define a HAS_DRRS(dev_priv) which based on what is on
> > intel_cpu_transcoder_set_m_n would be
> > (IS_CHERRYVIEW(dev_priv) || INTEL_GEN(dev_priv) < 8)
>
> Actually programming of pll divider m and n changes between platforms. Hence this check was there.
> But all the platforms from Gen 7 has the DRRS support. Do we still need a macro for this check?
Ohh! just now I noticed that this was actually "< 8" there...
Yeap, so no more concerns on this patch. Thanks for the explanation.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> -Ram
> >
> > > + return -ENODEV;
> > > +
> > > + drm_modeset_lock_all(dev);
> >
> > my first reaction to this was: "why do you need to lock all modeset?!"
> > But this simplify a lot the logic here...
> > This assure that drrs is really not getting changed from other places.
> >
> > > + for_each_intel_crtc(dev, intel_crtc) {
> > > + if (!intel_crtc->base.state->active ||
> > > + !intel_crtc->config->has_drrs)
> >
> > I was going to say that this check already happens inside enable and disable
> > functions... But I see the reason why to check before the unecessary noise.
> >
> > > + continue;
> > > +
> > > + for_each_encoder_on_crtc(dev, &intel_crtc->base, encoder) {
> > > + if (encoder->type != INTEL_OUTPUT_EDP)
> > > + continue;
> > > +
> > > + DRM_DEBUG_DRIVER("Manually %sabling DRRS.
> > %llu\n",
> > > + val ? "en" : "dis", val);
> > > +
> > > + intel_dp = enc_to_intel_dp(&encoder->base);
> > > + if (val)
> > > + intel_edp_drrs_enable(intel_dp,
> > > + intel_crtc->config);
> > > + else
> > > + intel_edp_drrs_disable(intel_dp,
> > > + intel_crtc->config);
> > > + }
> > > + }
> > > + drm_modeset_unlock_all(dev);
> > > +
> > > + return 0;
> > > +}
> >
> > It seems simple and effective. Simpler than I imagined...
> > My only question is about that HAS_DRRS and when to skip here...
> >
> > > +
> > > +DEFINE_SIMPLE_ATTRIBUTE(i915_drrs_ctl_fops, NULL, i915_drrs_ctl_set,
> > > +"%llu\n");
> > > +
> > > static const struct drm_info_list i915_debugfs_list[] = {
> > > {"i915_capabilities", i915_capabilities, 0},
> > > {"i915_gem_objects", i915_gem_object_info, 0}, @@ -4828,7 +4868,8
> > @@
> > > static const struct i915_debugfs_files {
> > > {"i915_dp_test_active", &i915_displayport_test_active_fops},
> > > {"i915_guc_log_control", &i915_guc_log_control_fops},
> > > {"i915_hpd_storm_ctl", &i915_hpd_storm_ctl_fops},
> > > - {"i915_ipc_status", &i915_ipc_status_fops}
> > > + {"i915_ipc_status", &i915_ipc_status_fops},
> > > + {"i915_drrs_ctl", &i915_drrs_ctl_fops}
> > > };
> > >
> > > int i915_debugfs_register(struct drm_i915_private *dev_priv)
> > > --
> > > 2.7.4
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-21 20:59 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1505724732-17529-1-git-send-email-lohith.bs@intel.com>
2017-09-18 19:54 ` [PATCH] Idleness DRRS: Rodrigo Vivi
2017-09-19 10:46 ` Ramalingam C
2017-09-19 18:12 ` Rodrigo Vivi
2017-10-31 9:20 ` [PATCH 0/2] DRRS coverage in frontbuffer tracking IGT Ramalingam C
2017-10-31 9:20 ` [PATCH 1/2] drm/i915: Runtime disable for eDP DRRS Ramalingam C
2017-10-31 18:57 ` Rodrigo Vivi
2017-11-01 16:44 ` C, Ramalingam
2017-11-07 18:38 ` [PATCH v2 " Ramalingam C
2017-11-17 18:53 ` Rodrigo Vivi
2017-11-19 14:55 ` C, Ramalingam
2017-11-21 20:59 ` Rodrigo Vivi [this message]
2017-10-31 9:20 ` [PATCH 2/2] i915/drrs/debugfs: module param and psr status Ramalingam C
2017-11-07 18:40 ` [PATCH v2 2/2] i915/drrs/debugfs: crtc id " Ramalingam C
2017-11-17 18:56 ` Rodrigo Vivi
2017-11-20 3:39 ` C, Ramalingam
2017-11-20 4:23 ` [PATCH v3] i915/drrs/debugfs: psr status info addition Ramalingam C
2017-11-21 20:56 ` Rodrigo Vivi
2017-10-31 9:20 ` [PATCH i-g-t] tests/kms_frontbuffer_tracking: Idleness DRRS coverage Ramalingam C
2017-11-10 16:22 ` [PATCH i-g-t] Idleness DRRS: Lohith BS
2017-12-06 15:13 ` [PATCH i-g-t v8] tests/kms_frontbuffer_tracking: Including DRRS test coverage Lohith BS
2017-12-06 18:30 ` Paulo Zanoni
2017-12-11 13:12 ` [PATCH i-g-t v9] " Lohith BS
2018-01-01 13:45 ` [PATCH i-g-t v10] " Lohith BS
2018-01-02 20:34 ` Rodrigo Vivi
2018-01-03 16:02 ` Bs, Lohith
2018-01-03 15:02 ` [PATCH i-g-t v11] " Lohith BS
2018-01-03 19:21 ` Rodrigo Vivi
2018-01-03 22:14 ` Ramalingam C
2018-01-05 11:40 ` [PATCH i-g-t v12] " Lohith BS
2018-01-05 17:55 ` Rodrigo Vivi
2018-01-06 10:48 ` Ramalingam C
2018-01-06 13:37 ` Ramalingam C
2018-01-10 14:47 ` [PATCH i-g-t v13] " Lohith BS
2018-01-10 18:15 ` Rodrigo Vivi
2018-01-11 5:27 ` Ramalingam C
2018-01-11 20:22 ` Rodrigo Vivi
2018-01-11 8:40 ` Daniel Vetter
2018-01-17 5:05 ` Ramalingam C
2017-10-31 9:28 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Runtime disable for eDP DRRS Patchwork
2017-10-31 9:48 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-31 10:33 ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage Patchwork
2017-11-08 7:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev3) Patchwork
2017-11-08 8:11 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-10 16:49 ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev2) Patchwork
2017-11-20 4:46 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev4) Patchwork
2017-12-06 16:32 ` ✗ Fi.CI.BAT: warning for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev3) Patchwork
2017-12-11 15:56 ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev4) Patchwork
2017-12-11 17:11 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-28 15:59 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Runtime disable for eDP DRRS (rev4) Patchwork
2017-12-28 16:45 ` ✓ Fi.CI.IGT: " Patchwork
2018-01-02 10:37 ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev5) Patchwork
2018-01-02 13:26 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-03 15:30 ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6) Patchwork
2018-01-03 18:49 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-05 12:04 ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev7) Patchwork
2018-01-05 13:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-10 15:11 ` ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev8) Patchwork
2018-01-10 16:14 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-19 10:14 ` [PATCH] Idleness DRRS: Ramalingam C
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=20171121205933.g2bsj2zkda5bncsr@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=ramalingam.c@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox