<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/i915/intel_fbc.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-06-21T16:45:21Z</updated>
<entry>
<title>drm/i915/fbc: Disable on HSW by default for now</title>
<updated>2016-06-21T16:45:21Z</updated>
<author>
<name>Lyude</name>
</author>
<published>2016-06-09T15:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e3fa0acfec677e915d7de5ac6e1f18cfa4f805b'/>
<id>urn:sha1:1e3fa0acfec677e915d7de5ac6e1f18cfa4f805b</id>
<content type='text'>
&gt;From https://bugs.freedesktop.org/show_bug.cgi?id=96461 :

This was kind of a difficult bug to track down. If you're using a
Haswell system running GNOME and you have fbc completely enabled and
working, playing videos can result in video artifacts. Steps to
reproduce:

- Run GNOME
- Ensure FBC is enabled and active
- Download a movie, I used the ogg version of Big Buck Bunny for this
- Run `gst-launch-1.0 filesrc location='some_movie.ogg' ! decodebin !
  glimagesink` in a terminal
- Watch for about over a minute, you'll see small horizontal lines go
  down the screen.

For the time being, disable FBC for Haswell by default.

Stefan Richter reported kernel freezes (no video artifacts) when fbc
is on.  (E3-1245 v3 with HD P4600; openbox and some KDE and LXDE
applications, thread begins at https://lkml.org/lkml/2016/4/26/813).
We also got reports from Steven Honeyman on openbox+roxterm.

v2 (From Paulo):
  - Add extra information to the commit message
  - Add Fixes tag
  - Rebase

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96461
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96464
Fixes: a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW")
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Signed-off-by: Lyude &lt;cpaul@redhat.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1465487895-7401-1-git-send-email-cpaul@redhat.com
(cherry picked from commit c7f7e2feffb0294302041507dfd5fc15f01afccc)
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Refer to GGTT {,VM} consistently</title>
<updated>2016-03-31T14:55:43Z</updated>
<author>
<name>Joonas Lahtinen</name>
</author>
<published>2016-03-30T13:57:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72e96d6450c067f58b65224bb5e73914e2cc43ab'/>
<id>urn:sha1:72e96d6450c067f58b65224bb5e73914e2cc43ab</id>
<content type='text'>
Refer to the GGTT VM consistently as "ggtt-&gt;base" instead of just "ggtt",
"vm" or indirectly through other variables like "dev_priv-&gt;ggtt.base"
to avoid confusion with the i915_ggtt object itself and PPGTT VMs.

Refer to the GGTT as "ggtt" instead of indirectly through chaining.

As a bonus gets rid of the long-standing i915_obj_to_ggtt vs.
i915_gem_obj_to_ggtt conflict, due to removal of i915_obj_to_ggtt!

v2:
- Added some more after grepping sources with Chris

v3:
- Refer to GGTT VM through ggtt-&gt;base consistently instead of ggtt_vm
  (Chris)

v4:
- Convert all dev_priv-&gt;ggtt-&gt;foo accesses to ggtt-&gt;foo.

v5:
- Make patch checker happy

Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
</content>
</entry>
<entry>
<title>drm/i915: Rename dev_priv-&gt;gtt to dev_priv-&gt;ggtt</title>
<updated>2016-03-18T13:18:15Z</updated>
<author>
<name>Joonas Lahtinen</name>
</author>
<published>2016-03-18T08:42:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62106b4f6b9118073ec59e3e34ec393ed76cf24f'/>
<id>urn:sha1:62106b4f6b9118073ec59e3e34ec393ed76cf24f</id>
<content type='text'>
Refer to Global GTT consistently as GGTT, thus rename dev_priv-&gt;gtt
to dev_priv-&gt;ggtt and struct i915_gtt to struct i915_ggtt.

Fix a couple of whitespace problems while at it.

v2:
- Fix a typo in commit message.

Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/fbc: enable FBC by default on HSW and BDW</title>
<updated>2016-02-19T20:06:16Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-02-16T20:47:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a98ee79317b4091cafb502b4ffdbbbe1335e298c'/>
<id>urn:sha1:a98ee79317b4091cafb502b4ffdbbbe1335e298c</id>
<content type='text'>
These platforms should be fine now.

FBC can allow very significant power savings for screen-on idle
systems, but it is worth mentioning that a lot of people won't get
significant power savings by enabling this feature because they may
have something else preventing the system from getting into the
deepest sleep states. Examples may include a hungry wifi device or a
max_performance SATA link power management policy. You can check your
PC state residencies on the powertop "Idle stats" tab. I recommend
trying to run "sudo powertop --auto-tune" and then seeing if the
residencies improve.

Oh, and in case you - the person reading this commit message - found
this commit through git bisect, please do the following:
 - Check your dmesg and see if there are error messages mentioning
   underruns around the time your problem started happening.
 - Download intel-gpu-tools, compile it, and run:
   $ sudo ./tests/kms_frontbuffer_tracking --run-subtest '*fbc-*' 2&gt;&amp;1 | tee fbc.txt
   Then send us the fbc.txt file, especially if you get a failure.
   This will really maximize your chances of getting the bug fixed
   quickly.
 - Try to find a reliable way to reproduce the problem, and tell us.
 - Boot with drm.debug=0xe, reproduce the problem, then send us the
   dmesg file.

v2: Don't enable by default on SKL.

Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1455655643-2535-1-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: set fbc-&gt;active from the new activation functions</title>
<updated>2016-02-04T16:18:22Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-29T20:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5375ce9f38291c1d725db40519465dfe89c60ea9'/>
<id>urn:sha1:5375ce9f38291c1d725db40519465dfe89c60ea9</id>
<content type='text'>
Now that we have top-level gen-independent hw_activate and
hw_deactivate functions, set fbc-&gt;active directly from them, removing
the duplicated code.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1454101060-23198-3-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: unexport the HW level activation functions</title>
<updated>2016-02-04T16:17:45Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-29T20:57:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c40074cb219f8e5e6122d17fad869bc43c3e9df'/>
<id>urn:sha1:8c40074cb219f8e5e6122d17fad869bc43c3e9df</id>
<content type='text'>
The recent introduction of a new caller of dev_priv-&gt;fbc.deactivate()
is a good example of why we need unexport those functions. Anything
outside intel_fbc.c should only call the functions exported by
intel_fbc.c, so in order to enforce that, kill the function pointers
stored inside dev_priv-&gt;fbc and replace them with functions that can't
be called from outside intel_fbc.c.

This should make it much harder for new code to call these functions
from outside intel_fbc.c.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1454101060-23198-2-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: refactor some small functions called only once</title>
<updated>2016-01-29T20:21:10Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-18T17:56:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e35be23f31c9bd42c342aca519bcedbc34b35da4'/>
<id>urn:sha1:e35be23f31c9bd42c342aca519bcedbc34b35da4</id>
<content type='text'>
The FBC fixes we've been doing in the last months required a lot of
refactor, so functions that were once big and called from different
spots are now small and called only once. IMHO now it's better to just
move the contents of these functions to their only callers since this
reduces the number of indirections while reading the code.

While at it, also improve the related comments a little bit.

Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-26-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: don't store/check a pointer to the FB</title>
<updated>2016-01-29T20:20:39Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-18T17:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b42281f9ddafe459e0b0d91ddf1939fbf84d832'/>
<id>urn:sha1:9b42281f9ddafe459e0b0d91ddf1939fbf84d832</id>
<content type='text'>
We already make sure we run intel_fbc_update_update during modesets
and page flips, and this function takes care of deactivating FBC, so
it shouldn't be possible for us to reach the condition we check at
intel_fbc_work_fn. So instead of grabbing framebuffer references and
adding a lot of code to track when we need to free them, just don't
track anything at all since we shouldn't need to.

v2: Rebase.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-25-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: don't store the fb_id on reg_params</title>
<updated>2016-01-29T20:18:28Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-19T13:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b20d27526cb0e8dd2b7db3b45ec96aecfc02d610'/>
<id>urn:sha1:b20d27526cb0e8dd2b7db3b45ec96aecfc02d610</id>
<content type='text'>
We don't actually use fb_id anywhere. We already compare all
parameters that matter to the hardware: pixel format, stride,
fence_reg and ggtt_offset. The ID shouldn't make a difference.

Besides, we already update the FBC data at every modeset/flip, so this
can't change behind our backs.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-23-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
<entry>
<title>drm/i915/fbc: don't print no_fbc_reason to dmesg</title>
<updated>2016-01-29T20:18:16Z</updated>
<author>
<name>Paulo Zanoni</name>
</author>
<published>2016-01-19T13:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=913a3a6acae3c90e07f96c849c2a071b27a0fc1d'/>
<id>urn:sha1:913a3a6acae3c90e07f96c849c2a071b27a0fc1d</id>
<content type='text'>
Our dmesg messages started being misleading after we converted to the
enable+activate model: we always print "Disabling FBC", even when
we're just deactivating it. So, for example, when I boot my machine
and do "dmesg | grep -i fbc", I see:
  [drm:intel_fbc_enable] Enabling FBC on pipe A
  [drm:set_no_fbc_reason] Disabling FBC: framebuffer not tiled or fenced
but then, if I read the debugfs file, I will see:
  $ sudo cat i915_fbc_status
  FBC enabled
  Compressing: yes
so we can conclude that dmesg is misleading, since FBC is actually
enabled. What happened is that we deactivated FBC due to fbcon not
being tiled, but when we silently reactivated it when the display
manager started. We don't print activation messages since there may be
way too many of these operations per second during normal desktop
usage.

One possible solution would be to change set_no_fbc_reason to
correctly differentiate between disable and deactivation, but we
removed support from printing activation/deactivation messages in the
past because they were too frequent. So instead of doing this, let's
just not print anything on dmesg, and leave the debugfs file if the
user needs to investigate something. We already print when we enable
and disable FBC anyway on a given pipe, so this should already help
triaging bugs.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Paulo Zanoni &lt;paulo.r.zanoni@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-22-git-send-email-paulo.r.zanoni@intel.com
</content>
</entry>
</feed>
