<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpu/drm/ttm, branch linux-3.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm/ttm: Make sure BOs being swapped out are cacheable</title>
<updated>2017-06-20T12:04:27+00:00</updated>
<author>
<name>Michel Dänzer</name>
<email>michel.daenzer@amd.com</email>
</author>
<published>2017-01-25T08:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=51f2df44a30f0d7c32d84d7dc570eda8829291b0'/>
<id>51f2df44a30f0d7c32d84d7dc570eda8829291b0</id>
<content type='text'>
commit 239ac65fa5ffab71adf66e642750f940e7241d99 upstream.

The current caching state may not be tt_cached, even though the
placement contains TTM_PL_FLAG_CACHED, because placement can contain
multiple caching flags. Trying to swap out such a BO would trip up the

	BUG_ON(ttm-&gt;caching_state != tt_cached);

in ttm_tt_swapout.

Signed-off-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;.
Reviewed-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 239ac65fa5ffab71adf66e642750f940e7241d99 upstream.

The current caching state may not be tt_cached, even though the
placement contains TTM_PL_FLAG_CACHED, because placement can contain
multiple caching flags. Trying to swap out such a BO would trip up the

	BUG_ON(ttm-&gt;caching_state != tt_cached);

in ttm_tt_swapout.

Signed-off-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;.
Reviewed-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan().</title>
<updated>2014-10-05T21:54:07+00:00</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2014-08-03T11:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a0fe26d09596ccb84f68603f02c4c78a6394e9f9'/>
<id>a0fe26d09596ccb84f68603f02c4c78a6394e9f9</id>
<content type='text'>
commit 46c2df68f03a236b30808bba361f10900c88d95e upstream.

We can use "unsigned int" instead of "atomic_t" by updating start_pool
variable under _manager-&gt;lock. This patch will make it possible to avoid
skipping when choosing a pool to shrink in round-robin style, after next
patch changes mutex_lock(_manager-&gt;lock) to !mutex_trylock(_manager-&gt;lork).

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.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>
commit 46c2df68f03a236b30808bba361f10900c88d95e upstream.

We can use "unsigned int" instead of "atomic_t" by updating start_pool
variable under _manager-&gt;lock. This patch will make it possible to avoid
skipping when choosing a pool to shrink in round-robin style, after next
patch changes mutex_lock(_manager-&gt;lock) to !mutex_trylock(_manager-&gt;lork).

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Fix possible division by 0 in ttm_dma_pool_shrink_scan().</title>
<updated>2014-10-05T21:54:07+00:00</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2014-08-03T10:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0f90c9c088df9196dbb322175413a79f41f9975f'/>
<id>0f90c9c088df9196dbb322175413a79f41f9975f</id>
<content type='text'>
commit 11e504cc705e8ccb06ac93a276e11b5e8fee4d40 upstream.

list_empty(&amp;_manager-&gt;pools) being false before taking _manager-&gt;lock
does not guarantee that _manager-&gt;npools != 0 after taking _manager-&gt;lock
because _manager-&gt;npools is updated under _manager-&gt;lock.

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.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>
commit 11e504cc705e8ccb06ac93a276e11b5e8fee4d40 upstream.

list_empty(&amp;_manager-&gt;pools) being false before taking _manager-&gt;lock
does not guarantee that _manager-&gt;npools != 0 after taking _manager-&gt;lock
because _manager-&gt;npools is updated under _manager-&gt;lock.

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: don't oops if no invalidate_caches()</title>
<updated>2014-03-24T04:38:13+00:00</updated>
<author>
<name>Rob Clark</name>
<email>rclark@redhat.com</email>
</author>
<published>2014-03-12T14:59:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9804b5d36e7635cb5a11a5209a1ae8b7cd655d74'/>
<id>9804b5d36e7635cb5a11a5209a1ae8b7cd655d74</id>
<content type='text'>
commit 9ef7506f7eff3fc42724269f62e30164c141661f upstream.

A few of the simpler TTM drivers (cirrus, ast, mgag200) do not implement
this function.  Yet can end up somehow with an evicted bo:

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [&lt;          (null)&gt;]           (null)
  PGD 16e761067 PUD 16e6cf067 PMD 0
  Oops: 0010 [#1] SMP
  Modules linked in: bnep bluetooth rfkill fuse ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ip_tables sg btrfs zlib_deflate raid6_pq xor dm_queue_length iTCO_wdt iTCO_vendor_support coretemp kvm dcdbas dm_service_time microcode serio_raw pcspkr lpc_ich mfd_core i7core_edac edac_core ses enclosure ipmi_si ipmi_msghandler shpchp acpi_power_meter mperf nfsd auth_rpcgss nfs_acl lockd uinput sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sr_mod cdrom
   sd_mod usb_storage mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit lpfc drm_kms_helper ttm crc32c_intel ata_piix bfa drm ixgbe libata i2c_core mdio crc_t10dif ptp crct10dif_common pps_core scsi_transport_fc dca scsi_tgt megaraid_sas bnx2 dm_mirror dm_region_hash dm_log dm_mod
  CPU: 16 PID: 2572 Comm: X Not tainted 3.10.0-86.el7.x86_64 #1
  Hardware name: Dell Inc. PowerEdge R810/0H235N, BIOS 0.3.0 11/14/2009
  task: ffff8801799dabc0 ti: ffff88016c884000 task.ti: ffff88016c884000
  RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
  RSP: 0018:ffff88016c885ad8  EFLAGS: 00010202
  RAX: ffffffffa04e94c0 RBX: ffff880178937a20 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: 0000000000240004 RDI: ffff880178937a00
  RBP: ffff88016c885b60 R08: 00000000000171a0 R09: ffff88007cf171a0
  R10: ffffea0005842540 R11: ffffffff810487b9 R12: ffff880178937b30
  R13: ffff880178937a00 R14: ffff88016c885b78 R15: ffff880179929400
  FS:  00007f81ba2ef980(0000) GS:ffff88007cf00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000000000000 CR3: 000000016e763000 CR4: 00000000000007e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Stack:
   ffffffffa0306fae ffff8801799295c0 0000000000260004 0000000000000001
   ffff88016c885b60 ffffffffa0307669 00ff88007cf17738 ffff88017cf17700
   ffff880178937a00 ffff880100000000 ffff880100000000 0000000079929400
  Call Trace:
   [&lt;ffffffffa0306fae&gt;] ? ttm_bo_handle_move_mem+0x54e/0x5b0 [ttm]
   [&lt;ffffffffa0307669&gt;] ? ttm_bo_mem_space+0x169/0x340 [ttm]
   [&lt;ffffffffa0307bd7&gt;] ttm_bo_move_buffer+0x117/0x130 [ttm]
   [&lt;ffffffff81130001&gt;] ? perf_event_init_context+0x141/0x220
   [&lt;ffffffffa0307cb1&gt;] ttm_bo_validate+0xc1/0x130 [ttm]
   [&lt;ffffffffa04e7377&gt;] mgag200_bo_pin+0x87/0xc0 [mgag200]
   [&lt;ffffffffa04e56c4&gt;] mga_crtc_cursor_set+0x474/0xbb0 [mgag200]
   [&lt;ffffffff811971d2&gt;] ? __mem_cgroup_commit_charge+0x152/0x3b0
   [&lt;ffffffff815c4182&gt;] ? mutex_lock+0x12/0x2f
   [&lt;ffffffffa0201433&gt;] drm_mode_cursor_common+0x123/0x170 [drm]
   [&lt;ffffffffa0205231&gt;] drm_mode_cursor_ioctl+0x41/0x50 [drm]
   [&lt;ffffffffa01f5ca2&gt;] drm_ioctl+0x502/0x630 [drm]
   [&lt;ffffffff815cbab4&gt;] ? __do_page_fault+0x1f4/0x510
   [&lt;ffffffff8101cb68&gt;] ? __restore_xstate_sig+0x218/0x4f0
   [&lt;ffffffff811b4445&gt;] do_vfs_ioctl+0x2e5/0x4d0
   [&lt;ffffffff8124488e&gt;] ? file_has_perm+0x8e/0xa0
   [&lt;ffffffff811b46b1&gt;] SyS_ioctl+0x81/0xa0
   [&lt;ffffffff815d05d9&gt;] system_call_fastpath+0x16/0x1b
  Code:  Bad RIP value.
  RIP  [&lt;          (null)&gt;]           (null)
   RSP &lt;ffff88016c885ad8&gt;
  CR2: 0000000000000000

Signed-off-by: Rob Clark &lt;rclark@redhat.com&gt;
Reviewed-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.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>
commit 9ef7506f7eff3fc42724269f62e30164c141661f upstream.

A few of the simpler TTM drivers (cirrus, ast, mgag200) do not implement
this function.  Yet can end up somehow with an evicted bo:

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [&lt;          (null)&gt;]           (null)
  PGD 16e761067 PUD 16e6cf067 PMD 0
  Oops: 0010 [#1] SMP
  Modules linked in: bnep bluetooth rfkill fuse ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ip_tables sg btrfs zlib_deflate raid6_pq xor dm_queue_length iTCO_wdt iTCO_vendor_support coretemp kvm dcdbas dm_service_time microcode serio_raw pcspkr lpc_ich mfd_core i7core_edac edac_core ses enclosure ipmi_si ipmi_msghandler shpchp acpi_power_meter mperf nfsd auth_rpcgss nfs_acl lockd uinput sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sr_mod cdrom
   sd_mod usb_storage mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit lpfc drm_kms_helper ttm crc32c_intel ata_piix bfa drm ixgbe libata i2c_core mdio crc_t10dif ptp crct10dif_common pps_core scsi_transport_fc dca scsi_tgt megaraid_sas bnx2 dm_mirror dm_region_hash dm_log dm_mod
  CPU: 16 PID: 2572 Comm: X Not tainted 3.10.0-86.el7.x86_64 #1
  Hardware name: Dell Inc. PowerEdge R810/0H235N, BIOS 0.3.0 11/14/2009
  task: ffff8801799dabc0 ti: ffff88016c884000 task.ti: ffff88016c884000
  RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
  RSP: 0018:ffff88016c885ad8  EFLAGS: 00010202
  RAX: ffffffffa04e94c0 RBX: ffff880178937a20 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: 0000000000240004 RDI: ffff880178937a00
  RBP: ffff88016c885b60 R08: 00000000000171a0 R09: ffff88007cf171a0
  R10: ffffea0005842540 R11: ffffffff810487b9 R12: ffff880178937b30
  R13: ffff880178937a00 R14: ffff88016c885b78 R15: ffff880179929400
  FS:  00007f81ba2ef980(0000) GS:ffff88007cf00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000000000000 CR3: 000000016e763000 CR4: 00000000000007e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Stack:
   ffffffffa0306fae ffff8801799295c0 0000000000260004 0000000000000001
   ffff88016c885b60 ffffffffa0307669 00ff88007cf17738 ffff88017cf17700
   ffff880178937a00 ffff880100000000 ffff880100000000 0000000079929400
  Call Trace:
   [&lt;ffffffffa0306fae&gt;] ? ttm_bo_handle_move_mem+0x54e/0x5b0 [ttm]
   [&lt;ffffffffa0307669&gt;] ? ttm_bo_mem_space+0x169/0x340 [ttm]
   [&lt;ffffffffa0307bd7&gt;] ttm_bo_move_buffer+0x117/0x130 [ttm]
   [&lt;ffffffff81130001&gt;] ? perf_event_init_context+0x141/0x220
   [&lt;ffffffffa0307cb1&gt;] ttm_bo_validate+0xc1/0x130 [ttm]
   [&lt;ffffffffa04e7377&gt;] mgag200_bo_pin+0x87/0xc0 [mgag200]
   [&lt;ffffffffa04e56c4&gt;] mga_crtc_cursor_set+0x474/0xbb0 [mgag200]
   [&lt;ffffffff811971d2&gt;] ? __mem_cgroup_commit_charge+0x152/0x3b0
   [&lt;ffffffff815c4182&gt;] ? mutex_lock+0x12/0x2f
   [&lt;ffffffffa0201433&gt;] drm_mode_cursor_common+0x123/0x170 [drm]
   [&lt;ffffffffa0205231&gt;] drm_mode_cursor_ioctl+0x41/0x50 [drm]
   [&lt;ffffffffa01f5ca2&gt;] drm_ioctl+0x502/0x630 [drm]
   [&lt;ffffffff815cbab4&gt;] ? __do_page_fault+0x1f4/0x510
   [&lt;ffffffff8101cb68&gt;] ? __restore_xstate_sig+0x218/0x4f0
   [&lt;ffffffff811b4445&gt;] do_vfs_ioctl+0x2e5/0x4d0
   [&lt;ffffffff8124488e&gt;] ? file_has_perm+0x8e/0xa0
   [&lt;ffffffff811b46b1&gt;] SyS_ioctl+0x81/0xa0
   [&lt;ffffffff815d05d9&gt;] system_call_fastpath+0x16/0x1b
  Code:  Bad RIP value.
  RIP  [&lt;          (null)&gt;]           (null)
   RSP &lt;ffff88016c885ad8&gt;
  CR2: 0000000000000000

Signed-off-by: Rob Clark &lt;rclark@redhat.com&gt;
Reviewed-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Fix ttm_bo_move_memcpy</title>
<updated>2013-12-04T18:57:05+00:00</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2013-10-30T10:29:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6c3c00e3f509af95f7ca80492311a3ce485528e2'/>
<id>6c3c00e3f509af95f7ca80492311a3ce485528e2</id>
<content type='text'>
commit da95c788ef0c645378ffccb7060a0df1a33aee38 upstream.

All error paths will want to keep the mm node, so handle this at the
function exit. This fixes an ioremap failure error path.
Also add some comments to make the function a bit easier to understand.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Jakob Bornecrantz &lt;jakob@vmware.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>
commit da95c788ef0c645378ffccb7060a0df1a33aee38 upstream.

All error paths will want to keep the mm node, so handle this at the
function exit. This fixes an ioremap failure error path.
Also add some comments to make the function a bit easier to understand.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Jakob Bornecrantz &lt;jakob@vmware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Handle in-memory region copies</title>
<updated>2013-12-04T18:57:05+00:00</updated>
<author>
<name>Jakob Bornecrantz</name>
<email>jakob@vmware.com</email>
</author>
<published>2013-10-30T09:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f692d2d8bebddeb8c8faedfc41e4732f3dc23e5b'/>
<id>f692d2d8bebddeb8c8faedfc41e4732f3dc23e5b</id>
<content type='text'>
commit 9a0599ddeae012a771bba5e23393fc52d8a59d89 upstream.

Fix the case where the ttm pointer may be NULL causing
a NULL pointer dereference.

Signed-off-by: Jakob Bornecrantz &lt;jakob@vmware.com&gt;
Signed-off-by: Thomas Hellström &lt;thellstrom@vmware.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>
commit 9a0599ddeae012a771bba5e23393fc52d8a59d89 upstream.

Fix the case where the ttm pointer may be NULL causing
a NULL pointer dereference.

Signed-off-by: Jakob Bornecrantz &lt;jakob@vmware.com&gt;
Signed-off-by: Thomas Hellström &lt;thellstrom@vmware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Fix memory type compatibility check</title>
<updated>2013-12-04T18:57:05+00:00</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2013-10-28T09:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4f94b6e4b43ca3a1027803bd3cab21e72bbb991e'/>
<id>4f94b6e4b43ca3a1027803bd3cab21e72bbb991e</id>
<content type='text'>
commit 59c8e66378fb78adbcd05f0d09783dde6fef282b upstream.

Also check the busy placements before deciding to move a buffer object.
Failing to do this may result in a completely unneccessary move within a
single memory type.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Jakob Bornecrantz &lt;jakob@vmware.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>
commit 59c8e66378fb78adbcd05f0d09783dde6fef282b upstream.

Also check the busy placements before deciding to move a buffer object.
Failing to do this may result in a completely unneccessary move within a
single memory type.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Jakob Bornecrantz &lt;jakob@vmware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: fix the tt_populated check in ttm_tt_destroy()</title>
<updated>2013-10-01T16:17:47+00:00</updated>
<author>
<name>Ben Skeggs</name>
<email>bskeggs@redhat.com</email>
</author>
<published>2013-09-17T04:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3614efdf382ea9da5c04ae1f312c441b78a9fafc'/>
<id>3614efdf382ea9da5c04ae1f312c441b78a9fafc</id>
<content type='text'>
commit 182b17c8dc4e83aab000ce86587b6810e515da87 upstream.

After a vmalloc failure in ttm_dma_tt_alloc_page_directory(),
ttm_dma_tt_init() will call ttm_tt_destroy() to cleanup, and end up
inside the driver's unpopulate() hook when populate() has never yet
been called.

On nouveau, the first issue to be hit because of this is that
dma_address[] may be a NULL pointer.  After working around this,
ttm_pool_unpopulate() may potentially hit the same issue with
the pages[] array.

It seems to make more sense to avoid calling unpopulate on already
unpopulated TTMs than to add checks to all the implementations.

Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: Jerome Glisse &lt;jglisse@redhat.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.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>
commit 182b17c8dc4e83aab000ce86587b6810e515da87 upstream.

After a vmalloc failure in ttm_dma_tt_alloc_page_directory(),
ttm_dma_tt_init() will call ttm_tt_destroy() to cleanup, and end up
inside the driver's unpopulate() hook when populate() has never yet
been called.

On nouveau, the first issue to be hit because of this is that
dma_address[] may be a NULL pointer.  After working around this,
ttm_pool_unpopulate() may potentially hit the same issue with
the pages[] array.

It seems to make more sense to avoid calling unpopulate on already
unpopulated TTMs than to add checks to all the implementations.

Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: Jerome Glisse &lt;jglisse@redhat.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm: use vma_pages() to replace (vm_end - vm_start) &gt;&gt; PAGE_SHIFT</title>
<updated>2013-04-16T03:14:00+00:00</updated>
<author>
<name>Libin</name>
<email>huawei.libin@huawei.com</email>
</author>
<published>2013-04-15T12:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=025df7755472dc5ee9ebc5aa7023eba4b4ef3e3b'/>
<id>025df7755472dc5ee9ebc5aa7023eba4b4ef3e3b</id>
<content type='text'>
(*-&gt;vm_end - *-&gt;vm_start) &gt;&gt; PAGE_SHIFT operation is implemented
as a inline funcion vma_pages() in linux/mm.h, so using it.

Signed-off-by: Libin &lt;huawei.libin@huawei.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>
(*-&gt;vm_end - *-&gt;vm_start) &gt;&gt; PAGE_SHIFT operation is implemented
as a inline funcion vma_pages() in linux/mm.h, so using it.

Signed-off-by: Libin &lt;huawei.libin@huawei.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ttm: export functions to allow qxl do its own iomapping</title>
<updated>2013-04-12T03:50:46+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@gmail.com</email>
</author>
<published>2013-01-22T03:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=afe6804c045fbd69a1b75c681107b5d6df9190de'/>
<id>afe6804c045fbd69a1b75c681107b5d6df9190de</id>
<content type='text'>
qxl wants to use io mapping like i915 gem does, for now
just export the symbols so the driver can implement atomic
page maps using io mapping.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qxl wants to use io mapping like i915 gem does, for now
just export the symbols so the driver can implement atomic
page maps using io mapping.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
