Message ID | 20180517153430.9602-8-thierry.reding@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/17/2018 06:34 PM, Thierry Reding wrote: > From: Thierry Reding <treding@nvidia.com> > > Userspace needs to know the version of the interface implemented by a > client so it can create the proper command streams. Allow individual > drivers to store this version along with the client so that it can be > returned to userspace upon opening a channel. > > Signed-off-by: Thierry Reding <treding@nvidia.com> > --- > include/linux/host1x.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/host1x.h b/include/linux/host1x.h > index 89110d896d72..57d26406bdfd 100644 > --- a/include/linux/host1x.h > +++ b/include/linux/host1x.h > @@ -49,6 +49,7 @@ struct host1x_client_ops { > * @dev: pointer to struct device backing this host1x client > * @ops: host1x client operations > * @class: host1x class represented by this client > + * @version: interface version implemented by this client > * @channel: host1x channel associated with this client > * @syncpts: array of syncpoints requested for this client > * @num_syncpts: number of syncpoints requested for this client > @@ -61,6 +62,8 @@ struct host1x_client { > const struct host1x_client_ops *ops; > > enum host1x_class class; > + unsigned int version; > + It doesn't seem to me that this fits here - Host1x doesn't provide any userspace interface, TegraDRM does. We will (hopefully) have clients in the future that use a different userspace interface, or don't have one at all. So this property should be on TegraDRM side instead. Mikko > struct host1x_channel *channel; > > struct host1x_syncpt **syncpts; >
diff --git a/include/linux/host1x.h b/include/linux/host1x.h index 89110d896d72..57d26406bdfd 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h @@ -49,6 +49,7 @@ struct host1x_client_ops { * @dev: pointer to struct device backing this host1x client * @ops: host1x client operations * @class: host1x class represented by this client + * @version: interface version implemented by this client * @channel: host1x channel associated with this client * @syncpts: array of syncpoints requested for this client * @num_syncpts: number of syncpoints requested for this client @@ -61,6 +62,8 @@ struct host1x_client { const struct host1x_client_ops *ops; enum host1x_class class; + unsigned int version; + struct host1x_channel *channel; struct host1x_syncpt **syncpts;