<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c, branch v4.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-07-25T20:06:19Z</updated>
<entry>
<title>drm/scheduler: modify API to avoid redundancy</title>
<updated>2018-07-25T20:06:19Z</updated>
<author>
<name>Nayan Deshmukh</name>
<email>nayan26deshmukh@gmail.com</email>
</author>
<published>2018-07-20T12:21:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdc50176597cb44ce25eb7331c450058775b8d2a'/>
<id>urn:sha1:cdc50176597cb44ce25eb7331c450058775b8d2a</id>
<content type='text'>
entity has a scheduler field and we don't need the sched argument
in any of the functions where entity is provided.

Signed-off-by: Nayan Deshmukh &lt;nayan26deshmukh@gmail.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/scheduler: modify args of drm_sched_entity_init</title>
<updated>2018-07-13T19:46:05Z</updated>
<author>
<name>Nayan Deshmukh</name>
<email>nayan26deshmukh@gmail.com</email>
</author>
<published>2018-07-13T09:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa16b6c6b4d979234f830a48add47d02c12bb569'/>
<id>urn:sha1:aa16b6c6b4d979234f830a48add47d02c12bb569</id>
<content type='text'>
replace run queue by a list of run queues and remove the
sched arg as that is part of run queue itself

Signed-off-by: Nayan Deshmukh &lt;nayan26deshmukh@gmail.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Rename entity cleanup finctions.</title>
<updated>2018-07-05T21:38:46Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2018-06-05T16:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c49d82800bbf04a6d7d6843c6f2c2ea5746eb26e'/>
<id>urn:sha1:c49d82800bbf04a6d7d6843c6f2c2ea5746eb26e</id>
<content type='text'>
Everything in the flush code path (i.e. waiting for SW queue
to become empty) names with *_flush()
and everything in the release code path names *_fini()

Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/scheduler: Rename cleanup functions v2.</title>
<updated>2018-07-05T21:38:45Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2018-06-05T16:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=180fc134d712a93a2bbc3d11ed657b5208e6f90f'/>
<id>urn:sha1:180fc134d712a93a2bbc3d11ed657b5208e6f90f</id>
<content type='text'>
Everything in the flush code path (i.e. waiting for SW queue
to become empty) names with *_flush()
and everything in the release code path names *_fini()

This patch also effect the amdgpu and etnaviv drivers which
use those functions.

v2:
Also pplay the change to vd3.

Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: move amdgpu_ctx_mgr_entity_fini to f_ops flush hook (V4)</title>
<updated>2018-06-15T17:20:33Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2018-05-30T19:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48ad368a8a3ab2fd3c2bc2ccccc6e29b1acda1bb'/>
<id>urn:sha1:48ad368a8a3ab2fd3c2bc2ccccc6e29b1acda1bb</id>
<content type='text'>
With this we can now terminate jobs enqueue into SW queue the moment
the task is being killed instead of waiting for last user of
drm file to release it.

Also stop checking for kref_read(&amp;ctx-&gt;refcount) == 1 when
calling drm_sched_entity_do_release since other task
might still hold a reference to this entity but we don't
care since KILL means terminate job submission regardless
of what other tasks are doing.

v2:
Use returned remaining timeout as parameter for the next call.
Rebase.

v3:
Switch to working with jiffies.
Streamline remainder TO usage.
Rebase.

v4:
Rebase.

Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Skip drm_sched_entity related ops for KIQ ring.</title>
<updated>2018-05-18T21:08:16Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2018-05-15T18:12:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20b6b7885df58b86d9b2768852bb2c81081e2c93'/>
<id>urn:sha1:20b6b7885df58b86d9b2768852bb2c81081e2c93</id>
<content type='text'>
Following change 75fbed2 we never initialize or use the GPU
scheduler for KIQ and hence we need to skip KIQ ring when iterating
amdgpu_ctx's scheduler entites.

Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/scheduler: remove unused parameter</title>
<updated>2018-05-15T18:44:27Z</updated>
<author>
<name>Nayan Deshmukh</name>
<email>nayan26deshmukh@gmail.com</email>
</author>
<published>2018-03-29T17:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8344c53f57057b42a5da87e9557c40fcda18fb7a'/>
<id>urn:sha1:8344c53f57057b42a5da87e9557c40fcda18fb7a</id>
<content type='text'>
this patch also effect the amdgpu and etnaviv drivers which
use the function drm_sched_entity_init

Signed-off-by: Nayan Deshmukh &lt;nayan26deshmukh@gmail.com&gt;
Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Switch to interruptable wait to recover from ring hang.</title>
<updated>2018-05-15T18:44:18Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2018-04-30T14:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=719a39a1e9b2dfbfb86f17a8da696b714a3b885d'/>
<id>urn:sha1:719a39a1e9b2dfbfb86f17a8da696b714a3b885d</id>
<content type='text'>
v2:
Use dma_fence_wait instead of dma_fence_wait_timeout(...,MAX_SCHEDULE_TIMEOUT)
Avoid printing error message for ERESTARTSYS

Originally-by: David Panariti &lt;David.Panariti@amd.com&gt;
Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/gpu-sched: fix force APP kill hang(v4)</title>
<updated>2018-05-15T18:43:17Z</updated>
<author>
<name>Emily Deng</name>
<email>Emily.Deng@amd.com</email>
</author>
<published>2018-04-16T02:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ee3a52e3f35e064a3bf82f21dc74ddaf9843648'/>
<id>urn:sha1:8ee3a52e3f35e064a3bf82f21dc74ddaf9843648</id>
<content type='text'>
issue:
there are VMC page fault occurred if force APP kill during
3dmark test, the cause is in entity_fini we manually signal
all those jobs in entity's queue which confuse the sync/dep
mechanism:

1)page fault occurred in sdma's clear job which operate on
shadow buffer, and shadow buffer's Gart table is cleaned by
ttm_bo_release since the fence in its reservation was fake signaled
by entity_fini() under the case of SIGKILL received.

2)page fault occurred in gfx' job because during the lifetime
of gfx job we manually fake signal all jobs from its entity
in entity_fini(), thus the unmapping/clear PTE job depend on those
result fence is satisfied and sdma start clearing the PTE and lead
to GFX page fault.

fix:
1)should at least wait all jobs already scheduled complete in entity_fini()
if SIGKILL is the case.

2)if a fence signaled and try to clear some entity's dependency, should
set this entity guilty to prevent its job really run since the dependency
is fake signaled.

v2:
splitting drm_sched_entity_fini() into two functions:
1)The first one is does the waiting, removes the entity from the
runqueue and returns an error when the process was killed.
2)The second one then goes over the entity, install it as
completion signal for the remaining jobs and signals all jobs
with an error code.

v3:
1)Replace the fini1 and fini2 with better name
2)Call the first part before the VM teardown in
amdgpu_driver_postclose_kms() and the second part
after the VM teardown
3)Keep the original function drm_sched_entity_fini to
refine the code.

v4:
1)Rename entity-&gt;finished to entity-&gt;last_scheduled;
2)Rename drm_sched_entity_fini_job_cb() to
drm_sched_entity_kill_jobs_cb();
3)Pass NULL to drm_sched_entity_fini_job_cb() if -ENOENT;
4)Replace the type of entity-&gt;fini_status with "int";
5)Remove the check about entity-&gt;finished.

Signed-off-by: Monk Liu &lt;Monk.Liu@amd.com&gt;
Signed-off-by: Emily Deng &lt;Emily.Deng@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm: move amd_gpu_scheduler into common location</title>
<updated>2017-12-07T16:51:56Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2017-12-06T16:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b1f42d8fde4fef1ed7873bf5aa91755f8c3de35'/>
<id>urn:sha1:1b1f42d8fde4fef1ed7873bf5aa91755f8c3de35</id>
<content type='text'>
This moves and renames the AMDGPU scheduler to a common location in DRM
in order to facilitate re-use by other drivers. This is mostly a straight
forward rename with no code changes.

One notable exception is the function to_drm_sched_fence(), which is no
longer a inline header function to avoid the need to export the
drm_sched_fence_ops_scheduled and drm_sched_fence_ops_finished structures.

Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Tested-by: Dieter Nützel &lt;Dieter@nuetzel-hh.de&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
