From patchwork Thu May 17 15:34:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10407005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D45660353 for ; Thu, 17 May 2018 15:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B7222818E for ; Thu, 17 May 2018 15:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F1CC2857E; Thu, 17 May 2018 15:35:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BD6722818E for ; Thu, 17 May 2018 15:35:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B7CF6EAA3; Thu, 17 May 2018 15:34:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CFD76EA9C for ; Thu, 17 May 2018 15:34:47 +0000 (UTC) Received: by mail-wr0-x235.google.com with SMTP id o4-v6so6179605wrm.0 for ; Thu, 17 May 2018 08:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0kZkZhhDzjIHMwSZbd0mIK+ECtr9jlXTbq3TyFfnKOo=; b=XdJbzucWsTkKd2LANhe2jhHtbmTnGCpqIFRVxNh1xIiu8x83QQKUudO9yziQpKfnFM SJTtapp0wjFpQKe3+DdP/GqQzyadk6fmM//RnJUE81ZA/YQvvSURYNZjidedFztDBp9G X8jzMj0rQP3VMY8UAA43C0ShKwBCtfTeBLX8TGny9fAF5Zxjlm0K+CcTwiqOAvGiVrsg 2zn7FhAQQqzeq8CTh4XEgxOLrqtOd420xUX/F4/Gh8ypxthfsvxjNVr2mlbSWETGM7oI W1l6COJ0UdcfIESMtsjgJ/IdPAGl4Hy2YwUcqQt0rj3R7cDwQGZ0v6GbQDuJwoZQYybW IiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0kZkZhhDzjIHMwSZbd0mIK+ECtr9jlXTbq3TyFfnKOo=; b=kxj1KX5KmIjelc1L4EyEEEmeYVpHRdxgHc4sRlLSgb1/EmK7UU2Go/b9RgykeGpncn N8I2K5SJxDDmMmB4Q1g0TBZMVEpgZVUaBQNbt7iuS2MEbc+LX5VuqlMVwO10E9H1NaOY 4sehOEOBgKeLWIBM86X0CpMvmmO7zzs3lnwZdM+WgyVxy158p7GRLd5bDM24BcdZPNc4 l2kQYqvSEK3GsuSyxPHBpICZVXY9rO7P/HfUmg6NrxGY8ES1HhyFDT4JY7JdDGPNwSVf id3TuxaDozi1/AGzevdord1wKolI2nTnScFBUGpQfqmttqHHqlFGXzrvVxYf4XV1wgRM qXSA== X-Gm-Message-State: ALKqPweBUjBSz6I7Tq/0h+SmAjv1ivLw/maidGNqE5Qd7+sjX1pZ/rIo NGOUPmBVAbFd7WNG99TdtLmL+w== X-Google-Smtp-Source: AB8JxZogxLPh6MZ0JAFoI7+Lm/dUWSSwfxoON6j65gymtNHs2eUJXrkSWiO2i5MRPSoodfg8pWexsw== X-Received: by 2002:adf:a219:: with SMTP id p25-v6mr4673573wra.19.1526571285991; Thu, 17 May 2018 08:34:45 -0700 (PDT) Received: from localhost (p200300E41F19FC00D958180F3872A5C5.dip0.t-ipconnect.de. [2003:e4:1f19:fc00:d958:180f:3872:a5c5]) by smtp.gmail.com with ESMTPSA id z18-v6sm5880214wrc.36.2018.05.17.08.34.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 08:34:45 -0700 (PDT) From: Thierry Reding To: Thierry Reding Subject: [PATCH 7/7] gpu: host1x: Track client version Date: Thu, 17 May 2018 17:34:30 +0200 Message-Id: <20180517153430.9602-8-thierry.reding@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180517153430.9602-1-thierry.reding@gmail.com> References: <20180517153430.9602-1-thierry.reding@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, Dmitry Osipenko , dri-devel@lists.freedesktop.org, Mikko Perttunen MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding 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 --- 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; + struct host1x_channel *channel; struct host1x_syncpt **syncpts;