<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt.git/drivers/gpu/drm/msm, branch master</title>
<subtitle>The LITMUS^RT kernel.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/'/>
<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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.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>
<entry>
<title>drm/msm: fix unbalanced DRM framebuffer init/destroy</title>
<updated>2015-05-14T15:48:54+00:00</updated>
<author>
<name>Stephane Viau</name>
<email>sviau@codeaurora.org</email>
</author>
<published>2015-05-05T13:47:57+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=7194b62c8c99727e3f145b00b8390a905252370e'/>
<id>7194b62c8c99727e3f145b00b8390a905252370e</id>
<content type='text'>
When msm_framebuffer_init() fails before calling drm_framebuffer_init(),
drm_framebuffer_cleanup() [called in msm_framebuffer_destroy()]
is still being called even though drm_framebuffer_init() was not
called for that buffer. Thus a NULL pointer derefencing:

[  247.529691] Unable to handle kernel NULL pointer dereference at virtual address 0000027c
...
[  247.563996] PC is at __mutex_lock_slowpath+0x94/0x3a8
...
[  247.823025] [&lt;c07c3c78&gt;] (__mutex_lock_slowpath) from [&lt;c07c3fac&gt;] (mutex_lock+0x20/0x3c)
[  247.831186] [&lt;c07c3fac&gt;] (mutex_lock) from [&lt;c0347cf0&gt;] (drm_framebuffer_cleanup+0x18/0x38)
[  247.839520] [&lt;c0347cf0&gt;] (drm_framebuffer_cleanup) from [&lt;c036d138&gt;] (msm_framebuffer_destroy+0x48/0x100)
[  247.849066] [&lt;c036d138&gt;] (msm_framebuffer_destroy) from [&lt;c036d580&gt;] (msm_framebuffer_init+0x1e8/0x228)
[  247.858439] [&lt;c036d580&gt;] (msm_framebuffer_init) from [&lt;c036d630&gt;] (msm_framebuffer_create+0x70/0x134)
[  247.867642] [&lt;c036d630&gt;] (msm_framebuffer_create) from [&lt;c03493ec&gt;] (internal_framebuffer_create+0x67c/0x7b4)
[  247.877537] [&lt;c03493ec&gt;] (internal_framebuffer_create) from [&lt;c034ce34&gt;] (drm_mode_addfb2+0x20/0x98)
[  247.886650] [&lt;c034ce34&gt;] (drm_mode_addfb2) from [&lt;c034071c&gt;] (drm_ioctl+0x240/0x420)
[  247.894378] [&lt;c034071c&gt;] (drm_ioctl) from [&lt;c011df7c&gt;] (do_vfs_ioctl+0x4e4/0x5a4)
...

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
[plus initialize msm_fb to NULL to -Rob]
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When msm_framebuffer_init() fails before calling drm_framebuffer_init(),
drm_framebuffer_cleanup() [called in msm_framebuffer_destroy()]
is still being called even though drm_framebuffer_init() was not
called for that buffer. Thus a NULL pointer derefencing:

[  247.529691] Unable to handle kernel NULL pointer dereference at virtual address 0000027c
...
[  247.563996] PC is at __mutex_lock_slowpath+0x94/0x3a8
...
[  247.823025] [&lt;c07c3c78&gt;] (__mutex_lock_slowpath) from [&lt;c07c3fac&gt;] (mutex_lock+0x20/0x3c)
[  247.831186] [&lt;c07c3fac&gt;] (mutex_lock) from [&lt;c0347cf0&gt;] (drm_framebuffer_cleanup+0x18/0x38)
[  247.839520] [&lt;c0347cf0&gt;] (drm_framebuffer_cleanup) from [&lt;c036d138&gt;] (msm_framebuffer_destroy+0x48/0x100)
[  247.849066] [&lt;c036d138&gt;] (msm_framebuffer_destroy) from [&lt;c036d580&gt;] (msm_framebuffer_init+0x1e8/0x228)
[  247.858439] [&lt;c036d580&gt;] (msm_framebuffer_init) from [&lt;c036d630&gt;] (msm_framebuffer_create+0x70/0x134)
[  247.867642] [&lt;c036d630&gt;] (msm_framebuffer_create) from [&lt;c03493ec&gt;] (internal_framebuffer_create+0x67c/0x7b4)
[  247.877537] [&lt;c03493ec&gt;] (internal_framebuffer_create) from [&lt;c034ce34&gt;] (drm_mode_addfb2+0x20/0x98)
[  247.886650] [&lt;c034ce34&gt;] (drm_mode_addfb2) from [&lt;c034071c&gt;] (drm_ioctl+0x240/0x420)
[  247.894378] [&lt;c034071c&gt;] (drm_ioctl) from [&lt;c011df7c&gt;] (do_vfs_ioctl+0x4e4/0x5a4)
...

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
[plus initialize msm_fb to NULL to -Rob]
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/mdp5: Fix iteration on INTF config array</title>
<updated>2015-05-14T15:29:20+00:00</updated>
<author>
<name>Stephane Viau</name>
<email>sviau@codeaurora.org</email>
</author>
<published>2015-04-30T17:45:52+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=fe34464df5e8bd4b09db170477f32db4eade0444'/>
<id>fe34464df5e8bd4b09db170477f32db4eade0444</id>
<content type='text'>
The current iteration in get_dsi_id_from_intf() is wrong:
instead of iterating until hw_cfg-&gt;intf.count, we need to iterate
until MDP5_INTF_NUM_MAX here.

Let's take the example of msm8x16:

 hw_cfg-&gt;intf.count = 1
 intfs[0] = INTF_Disabled
 intfs[1] = INTF_DSI

If we stop iterating once i reaches hw_cfg-&gt;intf.count (== 1),
we will miss the test for intfs[1].

Actually, this hw_cfg-&gt;intf.count entry is quite confusing and is not
(or *should not be*) used anywhere else; let's remove it.

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current iteration in get_dsi_id_from_intf() is wrong:
instead of iterating until hw_cfg-&gt;intf.count, we need to iterate
until MDP5_INTF_NUM_MAX here.

Let's take the example of msm8x16:

 hw_cfg-&gt;intf.count = 1
 intfs[0] = INTF_Disabled
 intfs[1] = INTF_DSI

If we stop iterating once i reaches hw_cfg-&gt;intf.count (== 1),
we will miss the test for intfs[1].

Actually, this hw_cfg-&gt;intf.count entry is quite confusing and is not
(or *should not be*) used anywhere else; let's remove it.

Signed-off-by: Stephane Viau &lt;sviau@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/dsi: Fixup missing *break* statement during cmd rx</title>
<updated>2015-05-14T15:28:58+00:00</updated>
<author>
<name>Hai Li</name>
<email>hali@codeaurora.org</email>
</author>
<published>2015-04-29T15:38:59+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=651ad3f52b9d0b11b8ebe94c3810ac89f9f75653'/>
<id>651ad3f52b9d0b11b8ebe94c3810ac89f9f75653</id>
<content type='text'>
Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Hai Li &lt;hali@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/msm/dp: fix error return code</title>
<updated>2015-05-14T15:28:41+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-04-05T12:06:31+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=6128f1bec447cdaa42b61093e351697dbe1c72ed'/>
<id>6128f1bec447cdaa42b61093e351697dbe1c72ed</id>
<content type='text'>
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
</pre>
</div>
</content>
</entry>
</feed>
