drm-intel-collector - review request
Subsystems (2)
cover drm-intel-collector - review request
This is another drm-intel-collector push for review:
http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=drm-intel-collector
Here goes the list in order for better reviewers assignment:
Patch drm/i915: Asynchronously perform the set-base for a simple modeset - Reviewed
Patch drm/i915: Initialise min/max frequencies before updating RPS registers - Reviewer: Ville Syrjälä <[email protected]>
Overall Process:
drm-intel-collector - review request
1. Daniel pushs drm-intel-testing (every 2 weeks)
2. I rebase drm-intel-collector onto drm-intel-testing
3. Add Reviewer: tag with voluntered reviewers. If you don't believe you should be assigned on a particular patch please don't get mad just tell you wont review or volunteer someone else.
4. I resubmit remaining patches for review without picking any new (drm-intel-collector - review request)
drm-intel-collector - updated
5. One week later I collect all simple (1-2) patches that wasn't yet reviewed and not queued by Daniel from one testing update until another.
6. Request automated QA's PRTS automated i-g-t tests comparing drm-intel-testing x drm-intel-collector
7. If tests are ok I send the update notification or the patches as a series to intel-gfx mailing list for better tracking and to be reviewed. (drm-intel-collector - updated)
8. Let me know volunteers for review new patches and also let me know if I've picked any patch that I shouldn't.
There are some reasons that some patches can be left behind:
1. Your patch didn't applied cleanly and I couldn't easily solve the conflicts.
2. Kernel didn't compiled with your patch.
3. I simply missed it. If you believe this is the case please warn me.
Please help me to get these patches reviewed and queued by Daniel.
Also, please let me know if you have further ideas how to improve this process.
Thanks in advance,
Rodrigo.
Chris Wilson (2):
drm/i915: Asynchronously perform the set-base for a simple modeset drm/i915: Initialise min/max frequencies before updating RPS registers
drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_sysfs.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_display.c | 11 +++++++---- drivers/gpu/drm/i915/intel_pm.c | 19 +++++-------------- 4 files changed, 21 insertions(+), 27 deletions(-)
Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915: Asynchronously perform the set-base for a simple modeset
From: Chris Wilson <[email protected]>
A simple modeset, where we only wish to switch over to a new framebuffer such as the transition from fbcon to X, takes around 30-60ms. This is due to three factors:
1. We need to make sure the fb->obj is in the display domain, which incurs a cache flush to ensure no dirt is left on the scanout.
2. We need to flush any pending rendering before performing the mmio so that the frame is complete before it is shown.
3. We currently wait for the vblank after the mmio to be sure that the old fb is no longer being shown before releasing it.
(1) can only be eliminated by userspace preparing the fb->obj in advance to already be in the display domain. This can be done through use of the create2 ioctl, or by reusing an existing fb->obj.
However, (2) and (3) are already solved by the existing page flip mechanism, and it is surprisingly trivial to wire them up for use in the set-base fast path. Though it can be argued that this represents a subtle ABI break in that the set_config ioctl now returns before the old framebuffer is unpinned. The danger is that userspace will start to modify it before it is no longer being shown, however we should be able to prevent that through proper domain tracking.
By combining all of the above, we can achieve an instaneous set_config:
[ 6.601] (II) intel(0): switch to mode [email protected] on pipe 0 using DP2, position (0, 0), rotation normal [ 6.601] (II) intel(0): Setting screen physical size to 677 x 381
v2 (by Vivi): page_flip_flag was added to intel_crtc_page_flip
in a previous commit. using 0.
--- drivers/gpu/drm/i915/intel_display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -4
@@ -9629,10 +9629,13 @@ static int intel_crtc_set_config(struct drm_mode_set *set) ret =intel_set_mode (set->crtc, set->mode, set->x, set->y, set->fb); }else if (config->fb_changed) { -intel_crtc_wait_for_pending_flips (set->crtc); - - ret =intel_pipe_set_base (set->crtc, - set->x, set->y, set->fb); +if (to_intel_framebuffer (set->fb)->obj->ring ==NULL || + save_set.x != set->x || save_set.y != set->y || +intel_crtc_page_flip (set->crtc, set->fb,NULL ,0 )) { +intel_crtc_wait_for_pending_flips (set->crtc); + ret =intel_pipe_set_base (set->crtc, + set->x, set->y, set->fb); + } }if (ret) {
Signature · 1 line
1.8.1.4
PATCH 2/2 drm/i915: Initialise min/max frequencies before updating RPS registers
In reply to Rodrigo ViviFrom: Chris Wilson <[email protected]>
The RPS register writing routines use the current value of min/max to set certain limits and interrupt gating. If we set those afterwards, we risk setting up the hw incorrectly and losing power management events, and worse, trigger some internal assertions.
Reorder the calling sequences to be correct, and remove the then unrequired clamping from inside set_rps(). And for a bonus, fix the bug of calling gen6_set_rps() from Valleyview.
Reviewer: Ville Syrjälä <[email protected]>
CC: Ville Syrjälä <[email protected]>
--- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_sysfs.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_pm.c | 19 +++++-------------- 3 files changed, 14 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -2474,7 +2474,7 @@ i915_max_freq_set(void *data, u64 val)if (IS_VALLEYVIEW (dev)) { val =vlv_freq_opcode (dev_priv->mem_freq, val); dev_priv->rps.max_delay = val; -gen6_set_rps (dev, val); +valleyview_set_rps (dev, val); }else {do_div (val,GT_FREQUENCY_MULTIPLIER ); dev_priv->rps.max_delay = val;
drivers/gpu/drm/i915/i915_sysfs.c +8 -8
@@ -342,15 +342,15 @@ static ssize_t gt_max_freq_mhz_store(struct device *kdev,DRM_DEBUG ("User requested overclocking to %d\n" , val *GT_FREQUENCY_MULTIPLIER ); + dev_priv->rps.max_delay = val; +if (dev_priv->rps.cur_delay > val) { -if (IS_VALLEYVIEW (dev_priv->dev)) -valleyview_set_rps (dev_priv->dev, val); +if (IS_VALLEYVIEW (dev)) +valleyview_set_rps (dev, val);else -gen6_set_rps (dev_priv->dev, val); +gen6_set_rps (dev, val); } - dev_priv->rps.max_delay = val; -mutex_unlock (&dev_priv->rps.hw_lock);return count;
@@ -411,15 +411,15 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev,return -EINVAL ; } + dev_priv->rps.min_delay = val; +if (dev_priv->rps.cur_delay < val) {if (IS_VALLEYVIEW (dev))valleyview_set_rps (dev, val);else -gen6_set_rps (dev_priv->dev, val); +gen6_set_rps (dev, val); } - dev_priv->rps.min_delay = val; -mutex_unlock (&dev_priv->rps.hw_lock);return count;
drivers/gpu/drm/i915/intel_pm.c +5 -14
@@ -3413,26 +3413,19 @@ static void ironlake_disable_drps(struct drm_device *dev)* ourselves, instead of doing a rmw cycle (which might result in us clearing * all limits and the gpu stuck at whatever frequency it is at atm). */ -static u32 gen6_rps_limits (struct drm_i915_private *dev_priv,u8 *val) +static u32 gen6_rps_limits (struct drm_i915_private *dev_priv,u8 val) {u32 limits; - limits =0 ; - -if (*val >= dev_priv->rps.max_delay) - *val = dev_priv->rps.max_delay; - limits |= dev_priv->rps.max_delay <<24 ; -/* Only set the down limit when we've reached the lowest level to avoid * getting more interrupts, otherwise leave this clear. This prevents a * race in the hw when coming out of rc6: There's a tiny window where * the hw runs at the minimal clock before selecting the desired * frequency, if the down threshold expires in that window we will not * receive a down interrupt. */ -if (*val <= dev_priv->rps.min_delay) { - *val = dev_priv->rps.min_delay; + limits = dev_priv->rps.max_delay <<24 ; +if (val <= dev_priv->rps.min_delay) limits |= dev_priv->rps.min_delay <<16 ; - }return limits; }
@@ -3532,7 +3525,6 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)void gen6_set_rps (struct drm_device *dev,u8 val) {struct drm_i915_private *dev_priv = dev->dev_private; -u32 limits =gen6_rps_limits (dev_priv, &val);WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock));WARN_ON (val > dev_priv->rps.max_delay);
@@ -3555,7 +3547,8 @@ void gen6_set_rps(struct drm_device *dev, u8 val)/* Make sure we continue to get interrupts * until we hit the minimum or maximum frequencies. */ -I915_WRITE (GEN6_RP_INTERRUPT_LIMITS , limits); +I915_WRITE (GEN6_RP_INTERRUPT_LIMITS , +gen6_rps_limits (dev_priv, val));POSTING_READ (GEN6_RPNSWREQ );
@@ -3619,8 +3612,6 @@ void valleyview_set_rps(struct drm_device *dev, u8 val) {struct drm_i915_private *dev_priv = dev->dev_private; -gen6_rps_limits (dev_priv, &val); -WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock));WARN_ON (val > dev_priv->rps.max_delay);WARN_ON (val < dev_priv->rps.min_delay);
Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx