提交 ece66891 编写于 作者: A Arto Merilainen 提交者: Thierry Reding

gpu: host1x: Fix client_managed type

client_managed field in syncpoint structure was defined as an
integer. The field holds, however, only a boolean value. This patch
modifies the type to boolean.
Signed-off-by: NArto Merilainen <amerilainen@nvidia.com>
Acked-By: NTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 edeabfcb
...@@ -285,7 +285,7 @@ static int gr2d_probe(struct platform_device *pdev) ...@@ -285,7 +285,7 @@ static int gr2d_probe(struct platform_device *pdev)
if (!gr2d->channel) if (!gr2d->channel)
return -ENOMEM; return -ENOMEM;
*syncpts = host1x_syncpt_request(dev, 0); *syncpts = host1x_syncpt_request(dev, false);
if (!(*syncpts)) { if (!(*syncpts)) {
host1x_channel_free(gr2d->channel); host1x_channel_free(gr2d->channel);
return -ENOMEM; return -ENOMEM;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static struct host1x_syncpt *_host1x_syncpt_alloc(struct host1x *host, static struct host1x_syncpt *_host1x_syncpt_alloc(struct host1x *host,
struct device *dev, struct device *dev,
int client_managed) bool client_managed)
{ {
int i; int i;
struct host1x_syncpt *sp = host->syncpt; struct host1x_syncpt *sp = host->syncpt;
...@@ -332,7 +332,7 @@ int host1x_syncpt_init(struct host1x *host) ...@@ -332,7 +332,7 @@ int host1x_syncpt_init(struct host1x *host)
host1x_syncpt_restore(host); host1x_syncpt_restore(host);
/* Allocate sync point to use for clearing waits for expired fences */ /* Allocate sync point to use for clearing waits for expired fences */
host->nop_sp = _host1x_syncpt_alloc(host, NULL, 0); host->nop_sp = _host1x_syncpt_alloc(host, NULL, false);
if (!host->nop_sp) if (!host->nop_sp)
return -ENOMEM; return -ENOMEM;
...@@ -340,7 +340,7 @@ int host1x_syncpt_init(struct host1x *host) ...@@ -340,7 +340,7 @@ int host1x_syncpt_init(struct host1x *host)
} }
struct host1x_syncpt *host1x_syncpt_request(struct device *dev, struct host1x_syncpt *host1x_syncpt_request(struct device *dev,
int client_managed) bool client_managed)
{ {
struct host1x *host = dev_get_drvdata(dev->parent); struct host1x *host = dev_get_drvdata(dev->parent);
return _host1x_syncpt_alloc(host, dev, client_managed); return _host1x_syncpt_alloc(host, dev, client_managed);
...@@ -354,7 +354,7 @@ void host1x_syncpt_free(struct host1x_syncpt *sp) ...@@ -354,7 +354,7 @@ void host1x_syncpt_free(struct host1x_syncpt *sp)
kfree(sp->name); kfree(sp->name);
sp->dev = NULL; sp->dev = NULL;
sp->name = NULL; sp->name = NULL;
sp->client_managed = 0; sp->client_managed = false;
} }
void host1x_syncpt_deinit(struct host1x *host) void host1x_syncpt_deinit(struct host1x *host)
......
...@@ -36,7 +36,7 @@ struct host1x_syncpt { ...@@ -36,7 +36,7 @@ struct host1x_syncpt {
atomic_t max_val; atomic_t max_val;
u32 base_val; u32 base_val;
const char *name; const char *name;
int client_managed; bool client_managed;
struct host1x *host; struct host1x *host;
struct device *dev; struct device *dev;
...@@ -94,7 +94,7 @@ static inline bool host1x_syncpt_check_max(struct host1x_syncpt *sp, u32 real) ...@@ -94,7 +94,7 @@ static inline bool host1x_syncpt_check_max(struct host1x_syncpt *sp, u32 real)
} }
/* Return true if sync point is client managed. */ /* Return true if sync point is client managed. */
static inline int host1x_syncpt_client_managed(struct host1x_syncpt *sp) static inline bool host1x_syncpt_client_managed(struct host1x_syncpt *sp)
{ {
return sp->client_managed; return sp->client_managed;
} }
...@@ -157,7 +157,7 @@ u32 host1x_syncpt_id(struct host1x_syncpt *sp); ...@@ -157,7 +157,7 @@ u32 host1x_syncpt_id(struct host1x_syncpt *sp);
/* Allocate a sync point for a device. */ /* Allocate a sync point for a device. */
struct host1x_syncpt *host1x_syncpt_request(struct device *dev, struct host1x_syncpt *host1x_syncpt_request(struct device *dev,
int client_managed); bool client_managed);
/* Free a sync point. */ /* Free a sync point. */
void host1x_syncpt_free(struct host1x_syncpt *sp); void host1x_syncpt_free(struct host1x_syncpt *sp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册