Revert "gpu: nvgpu: Enable syncpt reclaim only on gm20b"

This reverts commit 8eefb93c21934b101d7f423c38d9ea384a45fad6.

Bug 1585422

Change-Id: I217e0ffe6c230ee3c63d9aec1c48ce9c41770468
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/659426
This commit is contained in:
Timo Alho
2014-12-04 00:53:17 -08:00
committed by Dan Willemsen
parent 383f176a9d
commit 31a436b3a1
6 changed files with 12 additions and 11 deletions

View File

@@ -318,7 +318,6 @@ static void channel_gk20a_bind(struct channel_gk20a *ch_gk20a)
void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a)
{
struct gk20a *g = ch_gk20a->g;
struct gk20a_platform *platform = gk20a_get_platform(g->dev);
gk20a_dbg_fn("");
@@ -334,7 +333,7 @@ void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a)
* resource at this point
* if not, then it will be destroyed at channel_free()
*/
if (ch_gk20a->sync && platform->sync_aggressive_destroy) {
if (ch_gk20a->sync && ch_gk20a->sync->aggressive_destroy) {
ch_gk20a->sync->destroy(ch_gk20a->sync);
ch_gk20a->sync = NULL;
}
@@ -1470,7 +1469,6 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
{
struct vm_gk20a *vm = c->vm;
struct channel_gk20a_job *job, *n;
struct gk20a_platform *platform = gk20a_get_platform(c->g->dev);
trace_gk20a_channel_update(c);
@@ -1508,7 +1506,7 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
* the sync resource
*/
if (list_empty(&c->jobs)) {
if (c->sync && platform->sync_aggressive_destroy &&
if (c->sync && c->sync->aggressive_destroy &&
gk20a_fence_is_expired(c->last_submit.post_fence)) {
c->sync->destroy(c->sync);
c->sync = NULL;

View File

@@ -305,6 +305,8 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c)
sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline;
sp->ops.destroy = gk20a_channel_syncpt_destroy;
sp->ops.aggressive_destroy = true;
return &sp->ops;
}
#endif /* CONFIG_TEGRA_GK20A */
@@ -642,6 +644,10 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c)
sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline;
sema->ops.destroy = gk20a_channel_semaphore_destroy;
/* Aggressively destroying the semaphore sync would cause overhead
* since the pool needs to be mapped to GMMU. */
sema->ops.aggressive_destroy = false;
return &sema->ops;
clean_up:
gk20a_channel_semaphore_destroy(&sema->ops);

View File

@@ -86,6 +86,9 @@ struct gk20a_channel_sync {
* expired. */
void (*signal_timeline)(struct gk20a_channel_sync *s);
/* flag to set sync destroy aggressiveness */
bool aggressive_destroy;
/* Free the resources allocated by gk20a_channel_sync_create. */
void (*destroy)(struct gk20a_channel_sync *s);
};

View File

@@ -46,7 +46,6 @@ struct gk20a_platform {
/* Should be populated at probe. */
bool has_syncpoints;
bool sync_aggressive_destroy;
/* Should be populated by probe. */
struct dentry *debugfs;

View File

@@ -584,11 +584,6 @@ struct gk20a_platform gk20a_tegra_platform = {
struct gk20a_platform gm20b_tegra_platform = {
.has_syncpoints = true,
/*
* Enable aggressive reclaiming of sync point, becuase we have
* fewer sync points than channels
*/
.sync_aggressive_destroy = true,
/* power management configuration */
.railgate_delay = 500,

View File

@@ -63,7 +63,7 @@ static void vgpu_channel_unbind(struct channel_gk20a *ch)
* resource at this point
* if not, then it will be destroyed at channel_free()
*/
if (ch->sync && platform->sync_aggressive_destroy) {
if (ch->sync && ch->sync->aggressive_destroy) {
ch->sync->destroy(ch->sync);
ch->sync = NULL;
}