<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/msm, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-05-23T01:33:51Z</updated>
<entry>
<title>drm/msm: fix leak in failed get_pages</title>
<updated>2018-05-23T01:33:51Z</updated>
<author>
<name>Prakash Kamliya</name>
<email>pkamliya@codeaurora.org</email>
</author>
<published>2017-12-04T13:40:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c67f1987fdf46cb4083d55ffa7bf8495a893abdb'/>
<id>urn:sha1:c67f1987fdf46cb4083d55ffa7bf8495a893abdb</id>
<content type='text'>
[ Upstream commit 62e3a3e342af3c313ab38603811ecdb1fcc79edb ]

get_pages doesn't keep a reference of the pages allocated
when it fails later in the code path. This can lead to
a memory leak. Keep reference of the allocated pages so
that it can be freed when msm_gem_free_object gets called
later during cleanup.

Signed-off-by: Prakash Kamliya &lt;pkamliya@codeaurora.org&gt;
Signed-off-by: Sharat Masetty &lt;smasetty@codeaurora.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>drm/msm: fix an integer overflow test</title>
<updated>2017-12-07T02:19:54Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-06-30T07:59:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9cc11635340aa4103ccb07fc5e4d29973c582347'/>
<id>urn:sha1:9cc11635340aa4103ccb07fc5e4d29973c582347</id>
<content type='text'>
[ Upstream commit 65e93108891e571f177c202add9288eda9ac4100 ]

We recently added an integer overflow check but it needs an additional
tweak to work properly on 32 bit systems.

The problem is that we're doing the right hand side of the assignment as
type unsigned long so the max it will have an integer overflow instead
of being larger than SIZE_MAX.  That means the "sz &gt; SIZE_MAX" condition
is never true even on 32 bit systems.  We need to first cast it to u64
and then do the math.

Fixes: 4a630fadbb29 ("drm/msm: Fix potential buffer overflow issue")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-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>
</entry>
<entry>
<title>drm/msm: Fix potential buffer overflow issue</title>
<updated>2017-12-07T02:19:54Z</updated>
<author>
<name>Kasin Li</name>
<email>donglil@codeaurora.org</email>
</author>
<published>2017-06-19T21:36:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ab2e16ed810d77380109b9556d0afe5ef126b70'/>
<id>urn:sha1:3ab2e16ed810d77380109b9556d0afe5ef126b70</id>
<content type='text'>
[ Upstream commit 4a630fadbb29d9efaedb525f1a8f7449ad107641 ]

In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.

Signed-off-by: Kasin Li &lt;donglil@codeaurora.org&gt;
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>
</entry>
<entry>
<title>drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set</title>
<updated>2017-09-10T20:35:54Z</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=245f3fe90e5fd0f6325a775650dc5826a411e63f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm: Ensure that the hardware write pointer is valid</title>
<updated>2017-09-10T20:35:53Z</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2016-12-20T15:54:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dc9ba163c38c6f4d858ce86571aab2bc0b170be4'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm: Expose our reservation object when exporting a dmabuf.</title>
<updated>2017-06-08T10:42:00Z</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2017-04-12T19:11:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7e144ca4d77a8866a7b39b1c573230e69488b84b'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm: fix use of copy_from_user() while holding spinlock</title>
<updated>2016-12-22T03:45:42Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2016-08-22T19:15:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e537a0977f3ee837b6c101037c89936348063b2d'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm/mdp5: fix incorrect parameter for msm_framebuffer_iova()</title>
<updated>2015-05-21T04:31:45Z</updated>
<author>
<name>Stephane Viau</name>
<email>sviau@codeaurora.org</email>
</author>
<published>2015-05-20T14:57:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=755c814a7d826257d5488cfaa801ec19377c472a'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm: fix locking inconsistencies in gpu-&gt;destroy()</title>
<updated>2015-05-15T13:28:27Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2015-05-15T13:19:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=774449ebcb18bae146e2b6f6d012b46e64a095b9'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drm/msm/dsi: Simplify the code to get the number of read byte</title>
<updated>2015-05-14T20:57:25Z</updated>
<author>
<name>Hai Li</name>
<email>hali@codeaurora.org</email>
</author>
<published>2015-04-29T15:39:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ec1936eb099bb8c1c7a32b9ac4be128e1e68e2d9'/>
<id>urn:sha1: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>
</entry>
</feed>
