<div dir="ltr"><br><br>On Thu, Feb 26, 2015 at 2:48 PM, Joe Konno <<a href="mailto:joe.konno@linux.intel.com" target="_blank">joe.konno@linux.intel.com</a>> wrote:<br>><br>> From: Joe Konno <<a href="mailto:joe.konno@intel.com" target="_blank">joe.konno@intel.com</a>><br>><br>> In instances where cursor sizes change, as in Chromium Ozone/Freon,<br>> watermarks should be recomputed. There should be no hard-coded<br>> assumptions about cursor widths. This was corrected originally here:<br>><br>>     commit 64f962e3e38bf6f40bbd2462f8380dee0369e1bf<br>>     Author: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>><br>>     Date:   Wed Mar 26 12:38:15 2014 +0000<br>><br>>         drm/i915: Recompute WM when the cursor size changes<br>><br>> However, it seems the recompute logic got lost in refactoring.<br>> Re-introduce the relevant WM re-compute code from the original patch.<br>><br>> Cc: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>><br>> Cc: Matt Roper <<a href="mailto:matthew.d.roper@intel.com" target="_blank">matthew.d.roper@intel.com</a>><br>> Fixes: 32b7eeec4d1e ("drm/i915: Refactor work that can sleep out of commit (v7)")<br>> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=89346" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=89346</a><br>> Signed-off-by: Joe Konno <<a href="mailto:joe.konno@intel.com" target="_blank">joe.konno@intel.com</a>><br>> ---<br>>  drivers/gpu/drm/i915/intel_display.c | 7 ++++++-<br>>  1 file changed, 6 insertions(+), 1 deletion(-)<br>><br>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c<br>> index b0f113d9daab..c5cbfea0551e 100644<br>> --- a/drivers/gpu/drm/i915/intel_display.c<br>> +++ b/drivers/gpu/drm/i915/intel_display.c<br>> @@ -12234,6 +12234,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,<br>>         struct intel_plane *intel_plane = to_intel_plane(plane);<br>>         struct drm_i915_gem_object *obj = intel_fb_obj(state->base.fb);<br>>         uint32_t addr;<br>> +       unsigned old_width;<br>><br>>         crtc = crtc ? crtc : plane->crtc;<br>>         intel_crtc = to_intel_crtc(crtc);<br>> @@ -12243,6 +12244,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,<br>>         crtc->cursor_y = state->base.crtc_y;<br>><br>>         intel_plane->obj = obj;<br>> +       old_width = intel_crtc->cursor_width;<br>><br>>         if (intel_crtc->cursor_bo == obj)<br>>                 goto update;<br>> @@ -12260,8 +12262,11 @@ update:<br>>         intel_crtc->cursor_width = state->base.crtc_w;<br>>         intel_crtc->cursor_height = state->base.crtc_h;<br>><br>> -       if (intel_crtc->active)<br>> +       if (intel_crtc->active) {<br>> +               if (old_width != intel_crtc->cursor_width)<br>> +                       intel_update_watermarks(crtc);<br>>                 intel_crtc_update_cursor(crtc, state->visible);<br>> +       }<br>>  }<br>><br>>  static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,<br>> --<br>> 2.3.0<br>><div><br></div><div>Tested-by: James Ausmus <<a href="mailto:james.ausmus@intel.com" target="_blank">james.ausmus@intel.com</a>></div><div><br></div><div><br>> _______________________________________________<br>> Intel-gfx mailing list<br>> <a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>> <a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br><br><br><br><br>--<br><br><br>James Ausmus<br>Sr. Software Engineer<br>SSG-OTC ChromeOS Integration</div></div>