<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpu/drm/msm, branch v4.1.44</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set</title>
<updated>2017-09-10T20:35:54+00:00</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=245f3fe90e5fd0f6325a775650dc5826a411e63f'/>
<id>245f3fe90e5fd0f6325a775650dc5826a411e63f</id>
<content type='text'>
[ Upstream commit a6cb3b864b21b7345f824a4faa12b723c8aaf099 ]

For every submission buffer object one of MSM_SUBMIT_BO_WRITE
and MSM_SUBMIT_BO_READ must be set (and nothing else). If we
allowed zero then the buffer object would never get queued to
be unreferenced.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit a6cb3b864b21b7345f824a4faa12b723c8aaf099 ]

For every submission buffer object one of MSM_SUBMIT_BO_WRITE
and MSM_SUBMIT_BO_READ must be set (and nothing else). If we
allowed zero then the buffer object would never get queued to
be unreferenced.

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: Ensure that the hardware write pointer is valid</title>
<updated>2017-09-10T20:35:53+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.tavy.me/linux-stable.git/commit/?id=dc9ba163c38c6f4d858ce86571aab2bc0b170be4'/>
<id>dc9ba163c38c6f4d858ce86571aab2bc0b170be4</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;
</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;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: Expose our reservation object when exporting a dmabuf.</title>
<updated>2017-06-08T10:42:00+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2017-04-12T19:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7e144ca4d77a8866a7b39b1c573230e69488b84b'/>
<id>7e144ca4d77a8866a7b39b1c573230e69488b84b</id>
<content type='text'>
[ Upstream commit 43523eba79bda8f5b4c27f8ffe20ea078d20113a ]

Without this, polling on the dma-buf (and presumably other devices
synchronizing against our rendering) would return immediately, even
while the BO was busy.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: stable@vger.kernel.org
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Reviewed-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 43523eba79bda8f5b4c27f8ffe20ea078d20113a ]

Without this, polling on the dma-buf (and presumably other devices
synchronizing against our rendering) would return immediately, even
while the BO was busy.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: stable@vger.kernel.org
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Reviewed-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: fix use of copy_from_user() while holding spinlock</title>
<updated>2016-12-22T03:45:42+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2016-08-22T19:15:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e537a0977f3ee837b6c101037c89936348063b2d'/>
<id>e537a0977f3ee837b6c101037c89936348063b2d</id>
<content type='text'>
[ Upstream commit 89f82cbb0d5c0ab768c8d02914188aa2211cd2e3 ]

Use instead __copy_from_user_inatomic() and fallback to slow-path where
we drop and re-aquire the lock in case of fault.

Cc: stable@vger.kernel.org
Reported-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 89f82cbb0d5c0ab768c8d02914188aa2211cd2e3 ]

Use instead __copy_from_user_inatomic() and fallback to slow-path where
we drop and re-aquire the lock in case of fault.

Cc: stable@vger.kernel.org
Reported-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/mdp5: fix incorrect parameter for msm_framebuffer_iova()</title>
<updated>2015-05-21T04:31:45+00:00</updated>
<author>
<name>Stephane Viau</name>
<email>sviau@codeaurora.org</email>
</author>
<published>2015-05-20T14:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=755c814a7d826257d5488cfaa801ec19377c472a'/>
<id>755c814a7d826257d5488cfaa801ec19377c472a</id>
<content type='text'>
The index of -&gt;planes[] array (3rd parameter) cannot be equal to MAX_PLANE.
This looks like a typo that is now fixed.

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The index of -&gt;planes[] array (3rd parameter) cannot be equal to MAX_PLANE.
This looks like a typo that is now fixed.

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.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.tavy.me/linux-stable.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/dsi: Simplify the code to get the number of read byte</title>
<updated>2015-05-14T20:57:25+00:00</updated>
<author>
<name>Hai Li</name>
<email>hali@codeaurora.org</email>
</author>
<published>2015-04-29T15:39:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec1936eb099bb8c1c7a32b9ac4be128e1e68e2d9'/>
<id>ec1936eb099bb8c1c7a32b9ac4be128e1e68e2d9</id>
<content type='text'>
During cmd rx, only new versions of H/W provide register to read back
the real number of byte returned by panel. For the old versions, reading
this register will not get the right number. In fact, we only need to
assume the returned data is the same size as we expected, because later
we will check the data type to detect error.

Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During cmd rx, only new versions of H/W provide register to read back
the real number of byte returned by panel. For the old versions, reading
this register will not get the right number. In fact, we only need to
assume the returned data is the same size as we expected, because later
we will check the data type to detect error.

Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: Attach assigned encoder to eDP and DSI connectors</title>
<updated>2015-05-14T20:56:42+00:00</updated>
<author>
<name>Hai Li</name>
<email>hali@codeaurora.org</email>
</author>
<published>2015-04-23T18:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6f6b287968681f660e151c202765da9f58d3dcba'/>
<id>6f6b287968681f660e151c202765da9f58d3dcba</id>
<content type='text'>
drm_mode_connector_attach_encoder() function call is missing
during eDP and DSI connector initialization. As a result,
no encoder is returned by DRM_IOCTL_MODE_GETCONNECTOR system
call. This change is to fix this issue.

Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drm_mode_connector_attach_encoder() function call is missing
during eDP and DSI connector initialization. As a result,
no encoder is returned by DRM_IOCTL_MODE_GETCONNECTOR system
call. This change is to fix this issue.

Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm: setup vram after component_bind_all()</title>
<updated>2015-05-14T15:50:39+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-07T19:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=13f15565f7887a028b3442bbd763ff6d07b48479'/>
<id>13f15565f7887a028b3442bbd763ff6d07b48479</id>
<content type='text'>
First of all, we don't want -EPROBE_DEFER when trying to bind children
to cause us to forget to free our vram.  And second we don't want vram
allocation fail to trigger _unbind_all() before _bind_all().

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First of all, we don't want -EPROBE_DEFER when trying to bind children
to cause us to forget to free our vram.  And second we don't want vram
allocation fail to trigger _unbind_all() before _bind_all().

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/dsi: use pr_err_ratelimited</title>
<updated>2015-05-14T15:50:38+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-07T19:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff431fa4d96fc34568454aae4cc264a7760636a8'/>
<id>ff431fa4d96fc34568454aae4cc264a7760636a8</id>
<content type='text'>
When things go badly we can get a lot of these error irqs.  Let's not
DoS the user.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When things go badly we can get a lot of these error irqs.  Let's not
DoS the user.

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