<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpu/drm/msm/adreno, branch v4.4.103</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>drm/msm: Ensure that the hardware write pointer is valid</title>
<updated>2017-08-07T02:19:44+00:00</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b54e58ccceb794176b37037e76df3a7ed876b360'/>
<id>b54e58ccceb794176b37037e76df3a7ed876b360</id>
<content type='text'>
[ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ]

Currently the value written to CP_RB_WPTR is calculated on the fly as
(rb-&gt;next - rb-&gt;start). But as the code is designed rb-&gt;next is wrapped
before writing the commands so if a series of commands happened to
fit perfectly in the ringbuffer, rb-&gt;next would end up being equal to
rb-&gt;size / 4 and thus result in an out of bounds address to CP_RB_WPTR.

The easiest way to fix this is to mask WPTR when writing it to the
hardware; it makes the hardware happy and the rest of the ringbuffer
math appears to work and there isn't any point in upsetting anything.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
[squash in is_power_of_2() check]
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;

Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ]

Currently the value written to CP_RB_WPTR is calculated on the fly as
(rb-&gt;next - rb-&gt;start). But as the code is designed rb-&gt;next is wrapped
before writing the commands so if a series of commands happened to
fit perfectly in the ringbuffer, rb-&gt;next would end up being equal to
rb-&gt;size / 4 and thus result in an out of bounds address to CP_RB_WPTR.

The easiest way to fix this is to mask WPTR when writing it to the
hardware; it makes the hardware happy and the rest of the ringbuffer
math appears to work and there isn't any point in upsetting anything.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
[squash in is_power_of_2() check]
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;

Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: update generated headers</title>
<updated>2015-10-22T19:39:44+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-10-22T16:36:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8217e97ab9888651f4a5b24c682047457965349a'/>
<id>8217e97ab9888651f4a5b24c682047457965349a</id>
<content type='text'>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: update generated headers</title>
<updated>2015-08-15T22:27:10+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-07-27T23:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d3584eb871da2a6fa72e3d50781f33b0312589a'/>
<id>2d3584eb871da2a6fa72e3d50781f33b0312589a</id>
<content type='text'>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: workaround for missing irq on a306/8x16</title>
<updated>2015-06-11T17:11:01+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-12T15:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d735fdc35b4433abb736e843cfd2d34913344b3a'/>
<id>d735fdc35b4433abb736e843cfd2d34913344b3a</id>
<content type='text'>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: adreno a306 support</title>
<updated>2015-06-11T17:11:01+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-06T17:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de558cd2ae2e9999d0b6328c22c398ff85b6327c'/>
<id>de558cd2ae2e9999d0b6328c22c398ff85b6327c</id>
<content type='text'>
As found in apq8016 (used in DragonBoard 410c) and msm8916.

Note that numerically a306 is actually 307 (since a305c already claimed
306).  Nice and confusing.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As found in apq8016 (used in DragonBoard 410c) and msm8916.

Note that numerically a306 is actually 307 (since a305c already claimed
306).  Nice and confusing.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: clarify downstream bus scaling</title>
<updated>2015-06-11T17:11:01+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-06-04T14:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6490ad47404539b479ca33f96793c4624bef2924'/>
<id>6490ad47404539b479ca33f96793c4624bef2924</id>
<content type='text'>
A few spots in the driver have support for downstream android
CONFIG_MSM_BUS_SCALING.  This is mainly to simplify backporting the
driver for various devices which do not have sufficient upstream
kernel support.  But the intentionally dead code seems to cause
some confusion.  Rename the #define to make this more clear.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A few spots in the driver have support for downstream android
CONFIG_MSM_BUS_SCALING.  This is mainly to simplify backporting the
driver for various devices which do not have sufficient upstream
kernel support.  But the intentionally dead code seems to cause
some confusion.  Rename the #define to make this more clear.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: update generated headers</title>
<updated>2015-06-11T17:11:01+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-20T14:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af6cb4c1a451b0e68a0581a6487f6c0423caeeb3'/>
<id>af6cb4c1a451b0e68a0581a6487f6c0423caeeb3</id>
<content type='text'>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/adreno: dump scratch regs and other info on hang</title>
<updated>2015-06-11T17:11:00+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-04-19T14:14:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=26716185516fc09723833d64f2af87db4e3eae7a'/>
<id>26716185516fc09723833d64f2af87db4e3eae7a</id>
<content type='text'>
Dump a bit more info when the GPU hangs, without having hang_debug
enabled (which dumps a *lot* of registers).  Also dump the scratch
registers, as they are useful for determining where in the cmdstream
the GPU hung (and they seem always safe to read when GPU has hung).

Note that the freedreno gallium driver emits increasing counter values
to SCRATCH6 (to identify tile #) and SCRATCH7 (to identify draw #), so
these two in particular can be used to "triangulate" where in the
cmdstream the GPU hung.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dump a bit more info when the GPU hangs, without having hang_debug
enabled (which dumps a *lot* of registers).  Also dump the scratch
registers, as they are useful for determining where in the cmdstream
the GPU hung (and they seem always safe to read when GPU has hung).

Note that the freedreno gallium driver emits increasing counter values
to SCRATCH6 (to identify tile #) and SCRATCH7 (to identify draw #), so
these two in particular can be used to "triangulate" where in the
cmdstream the GPU hung.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: fix locking inconsistencies in gpu-&gt;destroy()</title>
<updated>2015-05-15T13:28:27+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-15T13:19:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=774449ebcb18bae146e2b6f6d012b46e64a095b9'/>
<id>774449ebcb18bae146e2b6f6d012b46e64a095b9</id>
<content type='text'>
In error paths, this was being called without struct_mutex held.
Leading to panics like:

  msm 1a00000.qcom,mdss_mdp: No memory protection without IOMMU
  Kernel panic - not syncing: BUG!
  CPU: 0 PID: 1409 Comm: cat Not tainted 4.0.0-dirty #4
  Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
  Call trace:
  [&lt;ffffffc000089c78&gt;] dump_backtrace+0x0/0x118
  [&lt;ffffffc000089da0&gt;] show_stack+0x10/0x20
  [&lt;ffffffc0006686d4&gt;] dump_stack+0x84/0xc4
  [&lt;ffffffc0006678b4&gt;] panic+0xd0/0x210
  [&lt;ffffffc0003e1ce4&gt;] drm_gem_object_free+0x5c/0x60
  [&lt;ffffffc000402870&gt;] adreno_gpu_cleanup+0x60/0x80
  [&lt;ffffffc0004035a0&gt;] a3xx_destroy+0x20/0x70
  [&lt;ffffffc0004036f4&gt;] a3xx_gpu_init+0x84/0x108
  [&lt;ffffffc0004018b8&gt;] adreno_load_gpu+0x58/0x190
  [&lt;ffffffc000419dac&gt;] msm_open+0x74/0x88
  [&lt;ffffffc0003e0a48&gt;] drm_open+0x168/0x400
  [&lt;ffffffc0003e7210&gt;] drm_stub_open+0xa8/0x118
  [&lt;ffffffc0001a0e84&gt;] chrdev_open+0x94/0x198
  [&lt;ffffffc000199f88&gt;] do_dentry_open+0x208/0x310
  [&lt;ffffffc00019a4c4&gt;] vfs_open+0x44/0x50
  [&lt;ffffffc0001aa26c&gt;] do_last.isra.14+0x2c4/0xc10
  [&lt;ffffffc0001aac38&gt;] path_openat+0x80/0x5e8
  [&lt;ffffffc0001ac354&gt;] do_filp_open+0x2c/0x98
  [&lt;ffffffc00019b60c&gt;] do_sys_open+0x13c/0x228
  [&lt;ffffffc00019b72c&gt;] SyS_openat+0xc/0x18
  CPU1: stopping

But there isn't any particularly good reason to hold struct_mutex for
teardown, so just standardize on calling it without the mutex held and
use the _unlocked() versions for GEM obj unref'ing

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In error paths, this was being called without struct_mutex held.
Leading to panics like:

  msm 1a00000.qcom,mdss_mdp: No memory protection without IOMMU
  Kernel panic - not syncing: BUG!
  CPU: 0 PID: 1409 Comm: cat Not tainted 4.0.0-dirty #4
  Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
  Call trace:
  [&lt;ffffffc000089c78&gt;] dump_backtrace+0x0/0x118
  [&lt;ffffffc000089da0&gt;] show_stack+0x10/0x20
  [&lt;ffffffc0006686d4&gt;] dump_stack+0x84/0xc4
  [&lt;ffffffc0006678b4&gt;] panic+0xd0/0x210
  [&lt;ffffffc0003e1ce4&gt;] drm_gem_object_free+0x5c/0x60
  [&lt;ffffffc000402870&gt;] adreno_gpu_cleanup+0x60/0x80
  [&lt;ffffffc0004035a0&gt;] a3xx_destroy+0x20/0x70
  [&lt;ffffffc0004036f4&gt;] a3xx_gpu_init+0x84/0x108
  [&lt;ffffffc0004018b8&gt;] adreno_load_gpu+0x58/0x190
  [&lt;ffffffc000419dac&gt;] msm_open+0x74/0x88
  [&lt;ffffffc0003e0a48&gt;] drm_open+0x168/0x400
  [&lt;ffffffc0003e7210&gt;] drm_stub_open+0xa8/0x118
  [&lt;ffffffc0001a0e84&gt;] chrdev_open+0x94/0x198
  [&lt;ffffffc000199f88&gt;] do_dentry_open+0x208/0x310
  [&lt;ffffffc00019a4c4&gt;] vfs_open+0x44/0x50
  [&lt;ffffffc0001aa26c&gt;] do_last.isra.14+0x2c4/0xc10
  [&lt;ffffffc0001aac38&gt;] path_openat+0x80/0x5e8
  [&lt;ffffffc0001ac354&gt;] do_filp_open+0x2c/0x98
  [&lt;ffffffc00019b60c&gt;] do_sys_open+0x13c/0x228
  [&lt;ffffffc00019b72c&gt;] SyS_openat+0xc/0x18
  CPU1: stopping

But there isn't any particularly good reason to hold struct_mutex for
teardown, so just standardize on calling it without the mutex held and
use the _unlocked() versions for GEM obj unref'ing

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: update generated headers</title>
<updated>2015-02-01T20:30:33+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2014-12-08T16:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8a264743b767c4c90d51873a5606712544b06bfd'/>
<id>8a264743b767c4c90d51873a5606712544b06bfd</id>
<content type='text'>
Resync from rnndb database, to pull in register defines for:
 * eDP
 * HDMI/HDCP
 * mdp4/mdp5 YUV support
 * mdp5 hw cursor support

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resync from rnndb database, to pull in register defines for:
 * eDP
 * HDMI/HDCP
 * mdp4/mdp5 YUV support
 * mdp5 hw cursor support

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
